Please catch me up, been away

Please catch me up, been away

Discuss the source code and development of Spring Engine in general from a technical point of view. Patches go here too.

Moderator: Moderators

Post Reply
User avatar
robed
Posts: 56
Joined: 02 Mar 2006, 03:18

Please catch me up, been away

Post by robed »

Used to be DeadRAM, but I bacame inactive, and i'm lazy, so now i'm robed ;p

Anyways, I hear rumors that SJ is gone, and a new dev leader has steped up. Also that the new version of TA is OS independant :D Good thing, since I'm running linux now.

What I'm wondering is current goals of the ta spring project. The last time I tried to help out, the goal of the project was to add features, and duct tape bugs till they almost got fixed and were forgotten until it crashed the game more then 5 times in 2 minutes. If this is still the case, I might consider forking the source and making a working, and clean version of ta. If the new devs are interested in cleaning up code, maybe even adding thread support, and the likes, I'll consider not forking. Either way, I'm a lazy self proclaimed god of code, which basically meens I'm about as good as a first year student in a 3 comp sci BA, and probably won't do much without getting angry at someone first ;p just ask Sinbad, he knows :D

For an example of my work, look at svnroot/tools/RtsSettingsWiz, It's the settings project with a few simple improvements (ie: detect first run, and run in wizard mode, tooltips, etc...), written in MFC. I could start by making that in wxWindows, the conversion should be simple enough. Before doing that I'd like to write a new reghandler code to support either an xml settings file or a simple ini settings file, with basic functionality, ei:

Code: Select all

#turn sound off
SOUND 0

#turn sound on
SOUND 1

# Set sound volume (0 to 127)
SOUND_VOLUME 64
Now that said, if I code something that simplifies a process, fixes a bug, or does something else fairly important, and it doesn't get used, I'mah probably flame like a mofo, and fork (or flame like a mofo, and play a different game) ;p

Choice is yours, you's want some cleaning and improving done to the settings area of the project?
User avatar
Gabba
Posts: 319
Joined: 08 Sep 2004, 22:59

Post by Gabba »

I'll just list this as a personal wish, since I don't know if it's considered a priority by everybody, but I think that one part of the code that needs major cleaning up/reworking/improving/documenting is the pathfinding engine. One of the members here (AF) hopes to work on it during the summer, but for the meanwhile he's already busy with his AI and studies. Your help would come in handy.

Now is a good time to work on it since it has gotten worse with the new version, as you can read in the Pathfinding is borked thread. Also, the good thing is that you could fork just the pathfinding code; since nobody else is working on it AFAIK you could be the god of that aspect of Spring for a while.

I developed a basic concept of how an efficient pathfinding engine should work to move a group of units: a) Find a single, "backbone" path that one of the units from the group could follow - basically using the current engine, but it should be as far as possible from obstacles
b) Calculate the available space around the backbone path all along its length, to create a corridor to move units in
c) Move the unit group inside the corridor using flocking toward the backbone path and away from other units and the corridor "walls"

A research paper I found on the topic estimates that with this system you can move around a hundred entities for less than 2% of processor time, a huge improvement on what we have now. And since we're dealing with unit groups here, it would be possible for one group to yield to another friendly group and the like - right now they collide into each other and make a big mess.

Anyways if this is your cup of tea just ask me for more details - I have a thread with documentation. And let Zaphod know, of course.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

If you're interested in generating voronoi diagrams and starting off with that then you could well have doen the jist fo that type fo pathfinding.

But fi you do itnend to go down the voronoi route, then do tell me, as I'd like to see how it turns out and I might be able to help you there.
User avatar
Gabba
Posts: 319
Joined: 08 Sep 2004, 22:59

Post by Gabba »

I'm afraid you're gonna confuse him Alantai... Does he even know what voronoi diagrams are? So here's a minimum required description:

Calculating a voronoi diagram is a way of finding all the points that are as far away as possible from defined obstacles (that can be other points, lines or polygons). You can fine a nice library to calculate them at http://www.cgal.org/, and here's a nice demo.
User avatar
robed
Posts: 56
Joined: 02 Mar 2006, 03:18

Post by robed »

Yah, i'm not Alantai, nor do I know anything about voronoi diagrams, but it's not like I can't learn it in a day or two, and master it in a month ;p Wait, cross that out, voronoi diagrams are cool (gotah love google) could also use something simular to jpeg compression, were the map is separated into 4 regions, then each region into 4 and so on. Such that only say 64 regions needs to be calculated on map load, and from that sub regions are created durring game time, to whichever resolution is required. doing this type of pathing in R2 would be best, i think. We'd have to make a special way to handle air units and under water/surface water units, but I think a 2D voronoi diagram would be best at limiting CPU usage and with minimal changes air and water units could use that same map. anyways i'm rambling.

Pathing would be fun to work with, but I won't be getting into it yet. I still need to fix up spring to run on my ancient video card. I also want to point out that tha last time I coded for spring, I coded for about 4 weeks, and out of that 4 weeks of code, about 5 lines was used (the bug fix for like 0.4 or 3 or 5 or something, to let glList scroll through the text menus in single player). If this sort of thing is expected to continue happening, I'll probably never come back to spring ;p

Hokay, so that said, guess my priorities are 1) gettings weak cheap old video cards you get from your friends (thanks sinbad :D) to work with spring and 2) fix pathing so that it doesn't take up 90% of the CPU and doesn't frakin botch up so much?

I'm also free to do other things too, but make them small, like tooltips, or how about this? a scrolling message window, with "chat" and "game" filters, so that the 'unit x is stuck' messages show up somewhere other then where the chat messages are?
User avatar
Maelstrom
Posts: 1950
Joined: 23 Jul 2005, 14:52

Post by Maelstrom »

robed wrote:I'm also free to do other things too, but make them small, like tooltips, or how about this? a scrolling message window, with "chat" and "game" filters, so that the 'unit x is stuck' messages show up somewhere other then where the chat messages are?
If you were to do this, I think you would become the new god of Spring. Please do.
User avatar
SinbadEV
Posts: 6475
Joined: 02 May 2005, 03:56

Post by SinbadEV »

I think we can expect lot's of work from DeadRAM here because he's been sleeping for the better part of the last 2 days, I should set up a paypal account for purchasing coffee to provide him every 3 hours to make sure he works on the project and stops standing me and my wife up for dinners that he's agreed to come to :P
User avatar
robed
Posts: 56
Joined: 02 Mar 2006, 03:18

Post by robed »

I never agreed to diner, I agreed to agreed to dinner if I was alive, which i wasn't ;p And I don't care about being the god of spring, I just want a bloody functional game i can play with sinbad ;p

Either way i'm off to IRC to chat with the devs see what can be done... For us linux people, or for you windows people with active perl, cywing (or whatever), etc... installed. How about piping chat to an external command? I know, I know could introduce a whole slew of security issues, but you could have a pipe to festival (http://www.cstr.ed.ac.uk/projects/festival/ or http://festvox.org/) to have all the chat messages read to you, heck have it pipe to a perl script that parses the name, and selects a festival voice based on the name!

Just incase someone other then me does this:
Message:

Code: Select all

<robed> I'm about to run ls on your computer; ls
Pipe Command:

Code: Select all

# festival <robed> I'm about to run ls on your computer; ls
Notice the ";" and the ls that follows. For windows machines I belive a \n or a / is the appropriate switch (imagin this happening: "format -q c:") for linux boxes swap ls with "nohup /sbin/mkfs &/".

But yah, better chat interface would be great, because almost every global object sends messages to that window. I could go through, one by one, and change all the global object into sub objects of the "main app" giving people control over which order these object come into existance. It also provides a mininal "table of contents" for us programmers (ie: self documented code). Separating code into individual, and self contained modules that ~could~ be used in another project with no, or minimal, modification; this is the way most API example programs are made, MFC uses this model, wxWindow, DirectX, OpenGL etc.... At present, there is no way to tell which global object come into existance in which order. This can cause a variety of small RUN TIME bugs! Grrr... I hate run time bugs ~.~ It also makes it much more dificult to see the flow of the program, for any new developers coming into the project.

BTW I run off coffee, please send me coffee, instant, or otherwise, i have a grinder and perculator :D Ohh, and if you want me to be able to test my code, send me a video card that can run ta spring (Not an Ati9200 though, 9200's hate linux)
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

You're not Alantai? What does that mean? Are you calling me some superhuman freak? *ponders wether he should get a cookie medal or a cookie curse
User avatar
SinbadEV
Posts: 6475
Joined: 02 May 2005, 03:56

Post by SinbadEV »

robed was raised by wolves... if he does something that seems mean or jerky... just pretend it's his way of being nice to you... really, it's a byproduct of him running entirely on black coffee and is indistinguishable from him acctually being mean or jerky... or friendly for that matter... You know how some cats just go snakey for no reason... then stare at the walls for a couple hours, then freak out and start scratching you? Yeah... it's kinda like that.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

lol, anyways read the mailing list archives.

As for onyl 5 lines of your past code, I guess you're referring tot eh settings wizard?

First off i thought ti was a mistake nto to bundle it and use the original, even tho ti is in the svn.

Secondly I believe it may be possible that they simply either dont knwo howto add to it or are unsure of what todo with it..

If you do anything to that i suggest you make it load the tabs from an editable config file that also holds all the values that can be set and the registry/config paths.

And maybe if it was re-engineered from MFC so it was platform independant?
User avatar
robed
Posts: 56
Joined: 02 Mar 2006, 03:18

Post by robed »

Yah, I'mah look into wxWindows, or a gtk settings project, and see about loading all the settings maxes and mins from a file. right now i'm thinking sinbad better have something to download the svn tree and a development environment so that i can test my code ;p

Gonah tweak that them there message window that's been in the way for ages ;p
User avatar
SinbadEV
Posts: 6475
Joined: 02 May 2005, 03:56

Post by SinbadEV »

Robbie Told Me to Post Him a TODO List:

robed you have to:
:arrow: encapsulate everything (especially map loading)
:arrow: make python and/or c and/or perl battle matching server replacement
:arrow: jtk/wxWindows settings wizard, with default "springrc.ini" for all platforms.
:arrow: make your FTP server work
:arrow: make it work on old crappy video cards your friend gave you that he got from his brother in law when it stopped working cause the fan was busted and you attached the fan from an old p2 300 Mhz processor you found in the garbage to make work (thanks sinbad)
:arrow: stand alone spring server
:arrow: and a bunch of crazy ini settings like "maps folder" and "font"
Post Reply

Return to “Engine”