Allegro.cc - Online Community

Allegro.cc Forums » Off-Topic Ordeals » Eagle - looking for coders

This thread is locked; no one can reply to it. rss feed Print
 1   2 
Eagle - looking for coders
Edgar Reynaldo
Major Reynaldo
May 2007
avatar

EDIT 05/19/2017
Updated bounties.

Hello all,

I'm looking for experienced C++ coders to help me with my gui. Or CMake users, or Doxygen commenters, or MSVC users. Anything would be good.

Starting in September, I'm planning to offer bounties for different work on my library, as I see it's something I can't always get done myself.

Or if you're interested in becoming an Eagle developer, PM me. Or both. Whatever tickles your fancy.

But I was thinking something along the lines of this :

(Prices US, payable via Paypal)

$50 - Small widget - lots of widgets still need to be written
$50-100 Layout
$125 Well designed Flow layout
$250 - SDL2 driver
$200 - Working CMake build system
$150 - Working MSVC library
$100+ Working Linux port
$1/function - Documenting code

$300 - $500 Working scripting system for GUI and user code. Should be able to easily bind script to C++ functions. Ruby + SWIG is my initial best guess at a choice of scripting language and binding to use. Open to suggestions.

Also, I was planning on writing a GUI editor as part of the first release. You can already define your gui in a script. A co-writer of the gui editor would be invaluable. This one is negotiable.

I can guide you through every phase of the library as I know it myself. Best way to see it is to look at the main functions in the test folder. Then read the headers. There's the core Eagle library, where all the abstraction is, and then there's the Allegro 5 driver which really does everything.

You can check out the repository on BitBucket here :

https://bitbucket.org/bugsquasher/eaglegui.git

https://bitbucket.org/bugsquasher/eaglegui

;D

Eric Johnson
Member #14,841
January 2013
avatar

Sounds promising. I'm not sure I have the proper experience, but I'll definitely take a look at the source code throughout the week.

A few questions:

1. Why Bitbucket and not GitHub?
2. What do you hope to accomplish with EAGLE that hasn't been done in other GUI libraries?

Best of luck.

GullRaDriel
Member #3,861
September 2003
avatar

A pity I'm only a C experienced developer.

"Code is like shit - it only smells if it is not yours"
Allegro Wiki, full of examples and articles !!

Edgar Reynaldo
Major Reynaldo
May 2007
avatar

Thanks anyway Gull!

1. Why Bitbucket and not GitHub?

Originally I was on SF using SVN, but then I migrated to BitBucket and GIT. I may import my library onto GitHub. It seems to have a few more features these days.

Quote:

2. What do you hope to accomplish with EAGLE that hasn't been done in other GUI libraries?

Well for one I don't like immediate mode guis. They eat up CPU restating the obvious frame after frame. I much prefer stateful guis. I wanted to be able to create a simple, easy way to define and declare widgets and layouts. I wanted to take all the work of setting up an entire system over and over again out of the way. Instead of rewriting startup code you just create a system driver, initialize it, taking care of all the setup for you, create a window, create a gui and add layouts and widgets to it, and then setup your program loop drawing, waiting for events, and responding. It's all event based, and instead of Java's horrendous approach to listeners, there's only one kind of listener, and they all accept an eagle event. Sources emit events, and listeners respond to events.

Most GUIs and Visual designers are static, and whether it's Android, or Visual C# Forms, you can't easily customize your layouts and widgets. You're forced to work with what you've got. In my library, it us uber simple to write a new widget. All you do is overload HandleEvent, CheckInput, Display, and Update if you need animation or timing. Everything else is done for you. Widgets have backgrounds, and margins, and frames. It's really easy to write a new layout as well if you need custom positioning. There's already several good layouts available, with more on the way.

jmasterx
Member #11,410
October 2009

I would for sure move to GitHub if only to encourage easier collaboration, increase visibility, be more MainStream, etc.

If it were a couple years ago I would be glad to contribute but I'm too busy these days.

But I would look at the Agui codebase anyways to see if there are Widgets you could copy or port.

My TextField/TextBox/ExtendedTextBox in particular have a lot of functionality that's a lot of work to replicate that you will not find in other libs. If you have questions on the code, let me know!

Chris Katko
Member #1,881
January 2002
avatar

You know, this is a pretty interesting incentive system. Please let me know how it goes because that may be a great system for "hiring" extra coding work for my games. Part-time, action item / deliverable-based payment system. Perhaps with good work moving toward full-time compensation.

-----sig:
“Programs should be written for people to read, and only incidentally for machines to execute.” - Structure and Interpretation of Computer Programs
"Political Correctness is fascism disguised as manners" --George Carlin

bamccaig
Member #7,536
July 2006
avatar

I'm not sure the incentive is enough though. If you estimate the hours it would take you to do the work then the pay is pretty terrible. I can understand that the OP can't afford to pay a fair wage for the work, and anything is better than nothing, but I wonder if you'd get more contributors by other means. I certainly don't think the money alone will be enough.

Eric Johnson
Member #14,841
January 2013
avatar

I think whomever commits to this project will likely have a predilection for contributing their time and knowledge to open source projects to begin with, so the cash, no matter the amount, is a worthwhile incentive.

Neil Roy
Member #2,229
April 2002
avatar

This reminds me of the old C64 cracking group: Eagle Soft. :)

{"name":"610888","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/9\/c\/9cc213e3f06eea4fa6a4ed59a0f14a0b.jpg","w":1280,"h":720,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/9\/c\/9cc213e3f06eea4fa6a4ed59a0f14a0b"}610888

---
“I love you too.” - last words of Wanda Roy

Edgar Reynaldo
Major Reynaldo
May 2007
avatar

I updated some of the bounties. I just got contacted about an interview. If all goes well, maybe I can pay some of the bounties sooner than September. See the OP for details.

EDIT 05/19/2017

I added a bounty. $300 - $500 for a working scripting system. This includes scripting the GUI and the users code. Ideally Ruby + SWIG sounds the best, but sounded pretty complicated last I checked. Open to suggestions on language and bindings of choice.

Edgar

Chris Katko
Member #1,881
January 2002
avatar

Seems like Lua is a universally accepted scripting language. I'm thinking of using it for my game for object scripts for easy of modding.

-----sig:
“Programs should be written for people to read, and only incidentally for machines to execute.” - Structure and Interpretation of Computer Programs
"Political Correctness is fascism disguised as manners" --George Carlin

Edgar Reynaldo
Major Reynaldo
May 2007
avatar

LUA doesn't handle C++ without a lot of Glue. Ruby handles inheritance and classes very well, as it's object oriented to begin with. You can change classes at run time. What I need is a way to translate :

#SelectExpand
1 sys->GetSystemTimer()->Start(); 2 3 do { 4 if (test_runner->ShouldStop()) { 5 break; 6 } 7 8 if (redraw) { 9/// win->Clear(EagleColor(0,255,0)); 10/// win->FlipDisplay(); 11 gui.Display(win,0,0); 12 win->FlipDisplay(); 13 redraw = false; 14 } 15 16 do { 17 EagleEvent ee; 18 ee = sys->WaitForSystemEventAndUpdateState(); 19 20 if (ee.type == EAGLE_EVENT_DISPLAY_RESIZE) { 21 win->AcknowledgeResize(); 22 gui.SetWidgetArea(0 , 0 , win->Width() , win->Height()); 23 } 24 25 gui.HandleEvent(ee); 26 27 while (gui.HasMessages()) { 28 WidgetMsg wmsg = gui.TakeNextMessage(); 29 EagleLog() << wmsg << endl; 30 if (wmsg.From() == &b1) { 31 /// Respond to widget message from b1 here 32/// EagleLog() << b1 << endl; 33 } 34 } 35 if (ee.type == EAGLE_EVENT_DISPLAY_CLOSE) { 36 quit = true; 37 } 38 if (ee.type == EAGLE_EVENT_KEY_DOWN && ee.keyboard.keycode == EAGLE_KEY_ESCAPE) { 39 quit = true; 40 } 41 if (ee.type == EAGLE_EVENT_TIMER) { 42 redraw = true; 43 } 44 45 } while(!sys->UpToDate()); 46 } while (!quit); 47 48 return 0; 49};

Into the same thing using Ruby so I can create and run gui's at runtime in an interpreter. Haven't you ever wanted an Allegro interpreter??? OMG that is like the pinnacle of beauty.

Chris Katko
Member #1,881
January 2002
avatar

I think you mean OO, right? Since you're scripting highly inherenting dialogs. I have to admit, I'm a complete novice to Lua since I haven't hit the part where I actually need it--only searching for potential scripting languages for my project. So I don't know enough to know if it meets your requirements or not. I only know that Lua has become The Standard for scripting thanks to many high profile games using it. (Factorio! IIRC, GMOD, and many Valve games)

Another thing I've noticed with Lua is because it's a relatively simple language/interpreter, and popular, it has tons of community support and advancement. So there are Lua bindings for basically every language in existence (including niches like D!), as well as fast JIT compilers.

But again, I think I get what you're saying. You need a more expressive language than a "on-the-metal fast" kind of language.

If you're dead set on C++ (and not C), ChaiScript is pretty cool. It looks mostly like Javascript code, but fits entirely into a C++ header (ab)using tons of template magic that takes forever to compile (unless you separate the code to file that doesn't get modified often, like an interface file) but it executes very fast and supports Javascript'ish complexity.

Some drawbacks are, super-niche so nobody is going to know the language starting off, and support is basically one guy.

My only thinking with Ruby was that it's a completely separate language so it requires a learning curve and a (large?) dependency to add to your project. ala "I want a GUI, so now I need the whole Ruby toolchain." Maybe Ruby is relatively small and super easy to learn, I have no knowledge of it. But that's just what comes to mind. If you want to "sell it" to people, you should definitely stress that "advanced Ruby" knowledge isn't required and tutorials that don't assume the programmer is proficient of Ruby.

-----sig:
“Programs should be written for people to read, and only incidentally for machines to execute.” - Structure and Interpretation of Computer Programs
"Political Correctness is fascism disguised as manners" --George Carlin

Edgar Reynaldo
Major Reynaldo
May 2007
avatar

It could be as simple as using some macro magic to wrap a function call into a string tuple of attribute and value pairs. If you use a function object to expand the function call from stored parameters you can use a base class to derive from and then every scripting command automatically becomes a call to execute(rubyconsole.getline());. Objects in Eagle have a name property that can be used to fetch any object and then dynamic cast it into the full object.

EDIT
To respond fairly about LUA, it's problematic and not inherently compatible with C++ and inheritance. It does good at C, but it makes you pop arguments on and off the stack, and change objects, and it's generally just a pain in the butt. You want to implement a LUA interpreter for me that does what I ask? Then the bounty is yours.

Thomas Fjellstrom
Member #476
June 2000
avatar

If you want to have a simple quick way to bind Lua to c++, there's my luaglue https://github.com/Tomasu/LuaGlue library.

--
Thomas Fjellstrom - [website] - [email] - [Allegro Wiki] - [Allegro TODO]
"If you can't think of a better solution, don't try to make a better solution." -- weapon_S
"The less evidence we have for what we believe is certain, the more violently we defend beliefs against those who don't agree" -- https://twitter.com/neiltyson/status/592870205409353730

Edgar Reynaldo
Major Reynaldo
May 2007
avatar

Tomasu - can you give me a better idea of how it works first?

Ideally, what I want is dynamic dispatch of function calls.

Ie. In Ruby I call

execute(obj.function_call("Parameter string"));

and then the obj object calls it's C++ function method with the given parameters.

I just don't want people to have to recompile their program every time they change one thing in their gui.

As for the bounties? Is anyone here interested? Are they too much, too little, do I need to provide something more to gain interest?

I've decided to move to GitHub as soon as I create a new account there. What I need is a download provider. SF is kind of sucking at this point, although I still use it to upload mingw and allegro binaries.

Thomas Fjellstrom
Member #476
June 2000
avatar

There's an example right on the github page. Provided you expose a sane c++ Ali there's no reason to recompile when you change Lua scripts. You access the c++ Api a lot like you would in c++.

--
Thomas Fjellstrom - [website] - [email] - [Allegro Wiki] - [Allegro TODO]
"If you can't think of a better solution, don't try to make a better solution." -- weapon_S
"The less evidence we have for what we believe is certain, the more violently we defend beliefs against those who don't agree" -- https://twitter.com/neiltyson/status/592870205409353730

relpatseht
Member #5,034
September 2004
avatar

I disagree with Lua on the philosophy that starting indices at 1 breaks math and managing the inconsistency across the c++/lua barrier is error prone.

Use C as your scripting language with TCC as your script compiler.

Edgar Reynaldo
Major Reynaldo
May 2007
avatar

Thomas Fjellstrom
Member #476
June 2000
avatar

There are deffinitely C interpreters. Not sure if theres a full C++ interpreter. You can use LLVM and libclang to do some fancy stuff. Im eventually adding a tool to luaglue that uses libclang/llvm to generate bindings for you.

The only real problem with llvm is the "good" api is always in flux.

--
Thomas Fjellstrom - [website] - [email] - [Allegro Wiki] - [Allegro TODO]
"If you can't think of a better solution, don't try to make a better solution." -- weapon_S
"The less evidence we have for what we believe is certain, the more violently we defend beliefs against those who don't agree" -- https://twitter.com/neiltyson/status/592870205409353730

Edgar Reynaldo
Major Reynaldo
May 2007
avatar

I can't get llvm/clang to work on Windows 10, and there are literally no good guides on how to get it done. I wanted to try and compile some programs with clang but it tries to use MSVC's cl outside the MSVC environment, which obviously fails.

It could be something as simple as :

#SelectExpand
1class Scriptable { 2 3 virtual void DispatchCall(std::string function , std::string function_parameters)=0; 4} 5 6class Script { 7 std::map<std::string object_name , Scriptable*> script_map; 8 9 void Readline() { 10 string s; 11 getline(cin , s); 12 char buf[1024]; 13 memset(buf , 0 , 1024); 14 if (1 == sscanf(s.c_str() , "%s." , buf)) { 15 string obj = buf; 16 Scriptable* scr = script_map[obj]; 17 if (1 == sscanf(s.c_str() + obj.size() + 1 , "%s(" , buf)) { 18 string func = buf; 19 string params = s.substr(obj.size() + 1 + func.size() + 1); 20 params = params.substr(0 , params.size() - 1); 21 22 scr->DispatchCall(func , params); 23 } 24 } 25 } 26}

That simple snippet of code lets you do obj.func("params") as long as your Scriptable object overloads DispatchCall.

Thomas Fjellstrom
Member #476
June 2000
avatar

I was more talking about using the llvm/clang libraries to parse code as scripts.

But yeah, you could always implement your own simple batch/command language if you wanted.

--
Thomas Fjellstrom - [website] - [email] - [Allegro Wiki] - [Allegro TODO]
"If you can't think of a better solution, don't try to make a better solution." -- weapon_S
"The less evidence we have for what we believe is certain, the more violently we defend beliefs against those who don't agree" -- https://twitter.com/neiltyson/status/592870205409353730

bamccaig
Member #7,536
July 2006
avatar

Rule of estimating hours: if you're new to estimating time or a beginner, multiply your estimate by 4. If you think it'll only take a couple of hours, expect it to take more like 8. The less the developer knows about the codebase or technology the more of a penalty you have to give it during estimation. Since most of us probably have no idea how Eagle is structured or how to use it, let alone develop it, we'd also need to spend probably at least 10-20 hours getting familiar with it, including how to build and test it. I don't think these bounties are good enough motivation for anybody to bite. Hopefully I'm wrong for the sake of Eagle. I understand if you can't afford to pay more than this, but I think you'd have better luck trying to mentor a student or something and using the experience as motivation to help out. Offering not enough money just distracts from other potential motivations that people might find to help. The best motivation, and the reason most open source software is contributed to, would be if somebody else wants to use Eagle for their own project, and they need to make it better to fit their needs. That is the developer that is most likely to contribute. So try to find somebody that would benefit from using Eagle on a feasible project now (to put differently, advertise Eagle to somebody that might benefit from it).

Edgar Reynaldo
Major Reynaldo
May 2007
avatar

Part of the point of the bounties is that I wanted to give people an extra incentive to work on the library. Time is not free, and people deserve some kind of reward. Those that find it rewarding to contribute freely will now at least have some kind of compensation for their effort, besides what they get from the use of the library itself. This also gives people incentive to learn the library. I need to drum up interest in the library one way or the other, and at least this way there is some kind of small reward.

The bounties are not set in stone. I just tried to set reasonable estimates on how much each component seemed worth. The bounty on the Linux port goes hand in hand with the CMake bounty. If you get Eagle to build with cmake, then it should build by default in linux with gcc. MSVC is a tougher beast, hence the higher reward. At this point, most of the problem with MSVC is that I don't know all the specifics of building a dll with MSVC, for instance, all functions in the DLL need to be marked as __declspec__dllexport. But I don't know whether that goes for the function definition as well as the function declaration. I kept getting giant lists of warnings, and I didn't know how to fix it. Again, the cmake bounty goes a long way towards getting the MSVC bounty.

For people with experience with these development tools, it wouldn't really take that long. I just don't have any experience with cmake or msvc, and I've got lots of other things to work on atm. ;)

I understand what you're saying about advertising to those who would get the most use out of eagle. What I need is a good demo. Right now I'm working on the windowing and event system. When that's done I'll work on a multi-window example.

Would it help if I made a small guide to writing widgets and layouts? They're really simple. All you do is overload 4 functions and you have a new widget. Overload a few different functions and you have a layout. A nice flow layout shouldn't be that hard I just haven't had time for it.

Eagle really simplifies things for you. It makes working with Allegro so easy and utilizes the diverse talents of Allegro 5. An SDL2 port wouldn't be that hard for an experienced SDL user, but perhaps the reward for that one is too low, considering the effort it would take to write a system, graphics, and input driver for SDL. It would allow us to compare Allegro 5 and SDL2 programs side by side.

Chris Katko
Member #1,881
January 2002
avatar

Check this out:

https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F47&utm_medium=issues&utm_source=github

OpenRA project is using it to tag specific Github "Issues" with financial rewards for community members to do work.

https://github.com/OpenRA/OpenRA/issues/4988

Since Eagle is going to be open source and free (afaik, right?), it seems open-source, transparent "bounties" may be the perfect avenue. (Assuming you can get people to NOTICE the bounties which may require some social networking / casual advertising to Reddit/etc.)

I actually think this would be really cool to integrate into a commercial game project somehow. Like, find a way to make a game either modular/"unit testable" so you don't have share the whole game, or, find some other way to prevent the game being leaked by bounty testers.

Hell, if you're niche enough, you could post the whole damn thing online and anyone who plays the "stolen" version (instead of developing on it) will be ostracized by the community. I would worry, however, about people cruising through the source code and "leaking" new features and even game mechanics formulas so they can "game" the system.

-----sig:
“Programs should be written for people to read, and only incidentally for machines to execute.” - Structure and Interpretation of Computer Programs
"Political Correctness is fascism disguised as manners" --George Carlin

 1   2 


Go to: