Jump to content

Search the Community

Showing results for tags 'OOP'.

More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


    • Vigor
    • DAYZ
    • ARMA 3
    • ARMA 2
    • YLANDS
    • ARGO
  • ArmA Toolmakers's Releases
  • ArmA Toolmakers's General
  • Die Hard OFP Lovers' Club's Topics
  • Japan in Arma's Topics
  • Arma 3 Photography Club's Discussions
  • The Order Of the Wolfs- Unit's Topics
  • 4th Infantry Brigade's Recruitment
  • 11th Marine Expeditionary Unit OFFICIAL | 11th MEU(SOC)'s 11th MEU(SOC) Recruitment Status - OPEN
  • Legion latina semper fi's New Server Legion latina next wick
  • Legion latina semper fi's https://www.facebook.com/groups/legionlatinasemperfidelis/
  • Legion latina semper fi's Server VPN LEGION LATINA SEMPER FI
  • Team Nederland's Welkom bij ons club
  • Team Nederland's Facebook
  • [H.S.O.] Hellenic Special Operations's Infos


PlayStation PSN














Found 8 results

  1. This is an OOP implementation for SQF which is hugely inspired by a similar project, OOP.h . Why another one? I like OOP.h but as I found out, it has a big impact on performance, which lies deep in how it is done. I don't mean to say that OOP.h is bad, it just has one limitation which I was forced to work around. Then it's better to share code than not, right? So, I decided to reinvent it, but with the aim of minimizing performance impact, and here is what we have: Based on SQF preprocessor, so you need to #include a single file. Supports member variables, methods, static variables, static methods and class inheritance(no multiple inheritance yet). With a single preprocessor flag (#define OOP_ASSERT in OOP_Light.h) you can enable or disable run-time error checks, which verify most common errors, like attempts to access a non-existent member or class. If enabled, it will output errors in a human-readable way. Good performance. Really, with debug disabled, a macro like GETV(_veh, "varName"); gets expanded into "missionNamespace getVariable (_veh+"_"+"varName");", which is typically not such a great performance loss. No support for public/private/protected keywords yet, so all members are public. Currently it is in 'beta' state. It seems to work and I don't see any major game-breaking issues with it as I have tried to do a little development with it. Also there is no documentation but you can examine the example files and classes and see how it works. As an example, the project contains a few useful classes written with OOP-Light: MessageLoop, MessageReceiver and Timer. An example of how to use them is located in Example.sqf file. MessageLoop and MessageReceiver can help you easily create a message loop, a useful construction which lets you manage processing of some events in a fixed amount of SQF threads, or helps you pass data between threads. Timer class just generates messages at fixed time intervals and sends them to the specified MessageReceiver. Github link: https://github.com/Sparker95/OOP-Light I hope someone finds this useful!
  2. Hello, OOP macro File : https://github.com/code34/oop.h Today i wanna share with you my gui editor. This is the link https://github.com/minipopov/GuiEditor Why new editor? -Based on layer with ctrlGroup -You could use your own style control directly from mission -You could export HPP (with EVH link for oop user) -You could export OOP file which is load on createDialog and delete variable on closeDialog -OOP file will contain all functions associate with your dialog. You could set from editor a name for each control which is the name of variable inside class and add init function Press F1 in mission you will see all shortcut. Let's talk about other thing. In initPlayerLocal.sqf you could set OOP_GuiEditor_ListControl which is an array of control avaible. You could remove all, add yours. The only thing that you have to do for add your control is to fill the file styles/customStyle.hpp with your style. Let's create together a new simple dialog. I named it shop with idd 8600. I create a simple dialog with 1 layer. Inside my layer i would create 1 LB which i named "itemList" and 2 button btnClose, btnOK. On my LB i check in event "Init" "OnLBSelChanged". Screenshot:http://prntscr.com/i2r1zj Let's look hpp file generated: Have a look for people who doesn't use OOP. All Event call static function to OOP class that you don't have. You need to change the call AND remove onLoad/unLoad event on display. Hpp contain string to reimport later your dialog Now let's generate oop class First there is standard function Init that it executed at openning your display. For ours BUTTONS We have 2 buttons on our hpp, so 2 functions btnAction_btnOK and btnAction_btnClose. They are call on click For Listbox We have Init function that you could call like this ["static",["onLBSelChanged_itemList", _whateveryouwant] call oo_shop. You could passed to the function anything you wan't and do your job... We have this function cause we check Init There is onLBSelChanged_itemList that is called on selected element on LB. EVH functions are auto fill. Now in-game how to use that? Just by using createDialog "shop", this gonna call our constructor function and get/set all controls, exec standard init. How to delete all vars & clear memory? closeDialog 0; Gonna set all variable to nil and clear memory Hope that i don't let but inside my code ^^. We're on beta version but, it's seems work well
  3. OOP LANGUAGE version : 0.5 Release: https://github.com/code34/oop.h/releases/ Wiki : https://github.com/code34/oop.h/wiki reference : Initial project Hi Guys, As certainly a part of you know, it's a long time i develop now in OO way with ARMA and OOP. It is definitely great and allowed me to develop a large number of projects that would have been complicated to realize with simply sqf. This type of language will certainly be used more and more in arma in the years to come As the original author of preprocessor file no longer maintain it since end of 2013, and totaly delete its project since a while, and i still to use and improve it, i fork it now. I just create a GIT PROJECT under GPL3 (original licence when i retrieve oop.h in RBS project). All contributions are welcome :) I also create a Wiki that explains how to use OOP Features Human-readable syntax that closely resembles PHP's OOP integration. Extensively documented source-code for ease-of-use. Only one header file, and it's fully macro-based, and only executed by the preprocessor. Implements full class-based object inheritance. Compiles to full-speed SQF code, so no need for run-time interpretation! Allows for public, protected, and private class members, for instituting complex objects and inheritance. Full support for polymorphism (to the limits of the SQF syntax). Small memory footprint - all functions are static, and no code is unnecessarily duplicated. Support for constructors and deconstructors. Completely recursive via the MEMBER macro. Allows for static variables, which are persistent to all classes of the same type. Note: Objects cannot be copied to other machines just by sending the object variable - all data members (object variables) need to be serialized (preferably to an array), transferred, and then added to a new object on the remote machine.
  4. Hello, I just release one class which use RscHTML to interact with API REST throw GET. You could check my code on: https://github.com/minipopov/WebService Don't forget to add ip from your webservice to in allowedHTMLLoadURIs (inside CfgCommands) like this exemple https://community.bistudio.com/wiki/CfgCommands Don't forget to add oop.h to your mission : https://github.com/code34/oop.h How to use instantiate class? private _webservice = ["new", "http://localhost:8080/"] call oo_WebService; Then put some args : private _arr = [ ["action", "update"], ["table", "users"], ["id", getPlayerUID] ]; ["putParam", _arr] call _webservice; And finally call it: private _index = "call" _webservice; It return index of request. You could get request state from index by getStatus private _data = ["getStatus", _index] call _webservice; Which is an array that contain in 0, the status of request "waiting"/"complete"/"timeout"(if request goes to timeout ofc..)/"undefine" if you give bad index. And at 1 the diag_ticktime when request was executed. So, as you could see there is timeout for request that you could set like this ["setTimeOut", 10] call _webservice; //time in second Old request are delete, you could set default time that script keep in memory request ["setKeepInMemory", 500] call _webservice; //Keep all request 500s after there exec Sadly, i didn't find any way to get the output of RscHTML... If anyone know the way to do it.. Hope it could be done to do something a bit more complex like get something in database or something like that.. Im so sorry for my fucking english.. ^^ Here:Exemple of usage:
  5. Hello, Link for OOP:https://github.com/code34/oop.h Link: https://github.com/minipopov/HelperGUI I just release a OOP Class that i use in my GUI Editor to manage control, which it be easier for me cause there is lot of log if you re doing something wrong... This class contain many function that help me to set Listbox, edit text, text... there is also some getter.. AND i use this class also to make some verification on string like "is my string contain space? is it numeric?..." How do i use this class? First of all is instantiate this where you want. Personnaly i add it into initPlayerLocal.sqf HelperGui = "new" call oo_HelperGui; There is a function to set display where you wan't manage control. ["setDisplay", (findDisplay 1500)] call HelperGui; And now many function.. Setter: And Getter: And there is some functions that i use in special case This is not fully optimised but at this the moment it's works well for what i'm doing. May be you should read file one time before use it
  6. As exemple for this topic:https://forums.bohemia.net/forums/topic/213192-release-oo_webservice-class-using-oop/ I create a bot discord:https://github.com/minipopov/DiscordBotExemple I create BaseFnc class, which have 2 antiflood system, one per user, one per call by everyone. i add a function named "sendGlobal" which send a text main channel on my discord: const globalMessage = new BaseFnc("sendGlobal", 10) // name of my function, time for antiflood globalMessage.setFloodProtection("perUser") // antiflood system perUser/perCall globalMessage.setCallback((params, steamID) => { // My callback chanGeneral.send(params.text) }); Then i import to my mission oo_Webservice and i create a class oo_Discord which use Webservice. You could check my mission:https://github.com/minipopov/Discord oo_Discord have 1 function "sendGlobal" which send httpRequest with those args: action => name of function to exec steamID => Who execute this call text => message to display on discord Now i make call private _discord = ["new", "http://localhost:8080/"] call oo_Discord; ["sendGlobal","Hello world!"] call _discord; I get this on my discord: http://prntscr.com/i1trv6 Make your own function function and imagine may be some new game/ interaction with people.
  7. Hello, BOHEMIA INTERACTIVE a.s., independent developer of video games, is looking for a Senior Engine Programmer to join the production team in our company. RequirementsRoutine C++ knowledge Strong OOP design understanding Math and linear algebra skills Teamwork and communication skills Good spoken and written English Experience with game development Welcomed SkillsExperience of working in large engines / projects Ability to adapt to and work with a large codebase Passion for video games We OfferOpportunity to work on a popular game franchise Nice atmosphere in a smaller team Possibilities for skill-development and growth Flexible working hours Competitive salary & benefits
  8. SQF Classes for ArmA 3 Edited - release updated with a couple of bugfixes - if you downloaded prior to 6pm GMT on 29 October then please re-download to get the corrected files. "If . . . [the] fact [that brutes abstract not] be made the distinguishing property of that sort of animal, I fear a great many of those that pass for men must be reckoned into their number." -- George Berkeley Many times when scripting in SQF it may occur that implementing object-oriented techniques can simplify or enhance certain abstractions. The technique of using getVariable/setVariable on a unit or gamelogic to store function code or references specific to that unit's situation is a common pattern found in many missions and modules. Here, that idea is taken one step farther: instead of storing functions on game objects, we store an array of class names (representing a chain of inheritance or a mixture of interfaces). Meanwhile, a master Classes array holds a subarray for each defined class, containing a function definition for each class method. With this arrangement and just a handful of primitive functions, an unlimited variety of classes and methods can be declared on-the-fly while a mission is running. Release (.zip): https://github.com/dwringer/a3system/releases/tag/v1.0 Code: http://github.com/dwringer/a3system/tree/master/ClassDemo.Tanoa This is a selection of modules drawn from a larger repository I keep at http://www.github.com/dwringer/a3system/. There, more recent versions of these modules can often be found. I also placed other modules I created over the years, which are of variable quality and may or may not be worth a look. Class layout Lambda Macros Example overview This will demonstrate how to create abstract instances and send messages (method calls) to them. The included example is a mission with four men (crew_1..crew_4) and two vehicles (car_1, car_2). You may easily duplicate it in a different map if you don't have Tanoa available. There is a single Radio Alpha trigger, upon whose activation the following scripts are executed: CG = ["CrewUnitGroup"] call fnc_new; [CG, "assign", crew_1, "driver"] call fnc_tell; [CG, "assign", crew_2, "gunner"] call fnc_tell; [CG, "assign", crew_3, "driver"] call fnc_tell; [CG, "assign", crew_4, "gunner"] call fnc_tell; [CG, "assign", car_1, "vehicle"] call fnc_tell; [CG, "assign", car_2, "vehicle"] call fnc_tell; [CG, "board_instant"] call fnc_tell; Here, fnc_new is how we create a new instance. It accepts the class name and any init parameters appended to it (here there are none). We could also put a Game Logic in the editor instead of using fnc_new, and in its init use the following: _nil = this spawn { waitUntil {not isNil "ClassesInitialized"}; [_this, "CrewUnitGroup"] call fnc_instance; .. rest of code .. }; The method calls are actually made with fnc_tell, which takes as parameters the class instance, method name, and subsequently each method parameter. Thus, all methods to all classes are defined and called using a standardized syntax and set of functions which have been precompiled. Since fnc_instance makes an instance out of an existing object, we can also use it for creating class inheritance. Consider the following: DEFCLASS("MySubClass") ["_self"] DO { [_self, "SuperClass"] call fnc_instance; .. rest of code .. _self } ENDCLASS; Now, MySubClass inherits all the methods from SuperClass. Each game object keeps an ordered list of its class assignments, so if a method is not found on MySubClass it will be looked up on SuperClass. I have provided the macros SUPER and SUPER_ARGS in include\classes.hpp to facilitate subclassing from within classdef header files. If you want to create a subclass method that implements a superclass method under a different name, that can be done by looking up the class alist in the Classes global alist and using the function contained there as a new method. In classdef files, this has a macro called ALIAS(subclass, subclass_method, superclass, superclass_method). Another example Without further ado, the link to the repository containing the above example mission folder and all required modules is: Release (.zip): https://github.com/dwringer/a3system/releases/tag/v1.0 Code: http://github.com/dwringer/a3system/tree/master/ClassDemo.Tanoa Good luck, and if anyone creates some useful classes or a cool class tree, I'd love to hear about it. Even if this just serves as an example of what can be done to (ab)use SQF, I am satisfied. "No point in mentioning these bats, I thought. Poor bastard will see them soon enough." -- Raoul Duke Edited - release updated with a couple of bugfixes - if you downloaded prior to 6pm GMT on 29 October then please redownload to get the corrected files. There were changes made to fnc_tell and fnc_filter related to nil values being passed as parameters. Edited - added another example section