Author Topic: Glest Advanced Engine  (Read 147198 times)

daniel.santos

  • Guest
Glest Advanced Engine
« on: 13 February 2008, 07:04:15 »
Updated Dec 11, 2008 -- For downloads, please visit
Code: [Select]
[url=http://glest.codemonger.org]http://glest.codemonger.org[/url]GAE adds a number of features, most of which cannot be utilized without making a tech tree mod.  While the GAE is tech tree neutral, it was originally created for the purpose of the Four Path Magitech mod.

Features
  • Shift-click command queuing (works in Magitech)
  • Auto-repair (works in Magitech)
  • Units return after auto-attacking (works in Magitech)
  • A patrol command
  • A guard command
  • Temporary effects
  • Improved upgrades & levels
  • Subfactions / faction progressions
  • A minimal pet/owner implementation
  • Emanations
  • Off-screen attack notifications
  • Cross-platform multiplayer (i.e., Windows users can play with Linux users, etc.)
  • And a few extra kb of executable bloat
Documentation can be found here:
Code: [Select]
[url=https://docs.megaglest.org/GAE]https://docs.megaglest.org/GAE[/url].
Sources available from at
Code: [Select]
[url=https://glest.codemonger.org/svn/repos]https://glest.codemonger.org/svn/repos[/url].  From the command line, you would use this command:
Code: [Select]
svn co https://glest.codemonger.org/svn/repos/gae/trunk glest
Command Queuing
Command queuing works by holding down shift while completing any command.  This works with moving, attacking, building, harvesting, etc.  Note that some commands will never end, like patrol, guard or hold position, so it won't help to queue commands after either of these.  The stop command is always discarded once a command is queued (i.e., the queued command is immediately executed).

Patrol & Guard Commands[/b]
There is no skill for either patrol or guard, you just add a command to your unit.  The command requires both a move and attack skill and the guard command requires a max-distance tag (probably patrol should have one too, but oh well).
Code: [Select]
<command>
<type value="guard"/>
<name value="guard"/>
<image path="../../../../placeholders/icon.bmp"/>
<unit-requirements/>
<upgrade-requirements/>
<move-skill value="move_skill"/>
<attack-skill value="attack_skill"/>
<max-distance value="4"/>
</command>

<command>
<type value="patrol"/>
<name value="patrol"/>
<image path="../../../../placeholders/icon.bmp"/>
<unit-requirements/>
<upgrade-requirements/>
<move-skill value="move_skill"/>
<attack-skill value="attack_skill"/>
<max-distance value="4"/>
</command>
Pets[/b]
A minimal pet implementation is in place.  By adding the <pet> tag to a produce skill, units produced with that skill become pets of the creator ("pets", "minions", "familiars", whatever).  A pet will die when the creator dies and will automatically guard their creator when not assigned another command, as long as they have a guard command.  Pets also automatically will attack the position (but not the specific target) of their creator when their creator executes any attack.  (actually, I think it'll crash if the pet doesn't have an attack command now that I think of it :) ). In the future, there should be more options for what happens to a pet when the owner dies.
Code: [Select]
<skill>
<type value="produce"/>
<name value="summon_skel"/>
<ep-cost value="5"/>
<speed value="75"/>
<anim-speed value="100"/>
<animation path="../../../../placeholders/sphere.g3d"/>
<sound enabled="true" start-time="0.3">
<sound-file path="../../../../../magitech/factions/magic/units/summoner/sounds/summoner_summon1.wav"/>
<sound-file path="../../../../../magitech/factions/magic/units/summoner/sounds/summoner_summon2.wav"/>
<sound-file path="../../../../../magitech/factions/magic/units/summoner/sounds/summoner_summon3.wav"/>
<sound-file path="../../../../../magitech/factions/magic/units/summoner/sounds/summoner_summon4.wav"/>
</sound>
<pet value="true" max="4"/>
</skill>
note: this is a snippet from the necromancer unit, so please ignore all of the odd paths to files.

Effects, Emanations & Expanded Upgrades & Levels[/b]
Full details for these enhancements can be found on the documentation wiki page
Code: [Select]
[url=https://docs.megaglest.org/GAE/Guide]https://docs.megaglest.org/GAE/Guide[/url].This has been tested on both Linux x86_64 and Windows XP (32 bit).
« Last Edit: 18 June 2016, 14:16:53 by filux »

Duke

  • Guest
(No subject)
« Reply #1 on: 14 February 2008, 00:51:25 »
It's commin along nicely I see.

I know there is much to be done still, but some clarifications of what is intendet:
Will it be possible to define pets withou attack? I can think of some pets that just emanate. (although for that case the emanation target, could use an owner option.)
Is the amount of pets a unit can have defined per type, total or both?
If total is possilbe, can you kill pets to make room for others?.

Some names:
Glext, Glestention or Glextention, Glexpanded, (Glevolution (; ).
I'd tend to GASH (Glest Advanced Skills Hack).
« Last Edit: 1 January 1970, 00:00:00 by Duke »

enveloop

  • Guest
(No subject)
« Reply #2 on: 14 February 2008, 01:24:47 »
GAP? Glest Advanced Pack :)
« Last Edit: 1 January 1970, 00:00:00 by enveloop »

firedeathbot

  • Draco Rider
  • *****
  • Posts: 264
    • View Profile
(No subject)
« Reply #3 on: 14 February 2008, 01:53:54 »
cool, keep it up
« Last Edit: 1 January 1970, 00:00:00 by firedeathbot »
Back to glest after a few years inactivity.

daniel.santos

  • Guest
(No subject)
« Reply #4 on: 14 February 2008, 04:11:55 »
Thanks for all of the feedback.  I think I like Glest Advanced Pack, or something along those lines.

Duke, yea, I'm going to fix that problem with the attack soon, you should definitely be able to have pets that don't attack.  These are commonly called familiars in fantasy lore.  When we finally get to the path of nature, we're going to have druids and I wanted druids to be able to have a faerie, pixie or sprite as a familiar and neither of those would attack, but cast beneficial spells on friendly units.  This brings up all sorts of AI & issues, this won't really work unless these familiars can be set to autocast, which means they need to know when they should and shouldn't try to do so.

I'm having some performance problems (small delays) somewhere in Game::update() and I haven't figured out how to get the profiling build to actually spit out a gprof log yet so I can figure out what's going on.  I'm suspecting either something in my modifications or the AI.

Oh yea, as far as the way the pet limits work right now, I really don't like it.  It limits by type, but if you use the same skill for producing more than one unit/pet type, that limit will be applied to each type separately.  I was working out a more complex "PetRules" class that would be a part of UnitType rather than being tied to the skill or command type, but I couldn't find a clean paradigm, so I just crammed it into the skill type rather quickly. :)  The idea of a PetRules class would also specify what happens when pets die (for instance, it's common for the death of a familiar to cause damage or something to the owner), when an owner dies because maybe some pets should become wild when an owner dies.  Maybe that wild pet should run off or maybe it should just attack whatever is near.  I also want to use this paradigm for the Lich ability to control other units, and make sure they return to the correct team when the Lich dies.  It may also be important as to rather not the unit that killed the pet owner gets credit for killing his pets as well.  Currently, they do.

So in short, Duke, I guess those are questions of "what should it be?"  One thing I'm not a big fan of is putting in lots of extra code for features that probably won't get used.
« Last Edit: 1 January 1970, 00:00:00 by daniel.santos »

daniel.santos

  • Guest
-
« Reply #5 on: 21 February 2008, 06:48:29 »
Update: Windows executable now available!

Code: [Select]
[url=http://glest.codemonger.org/files/glesty-win32_SSE2-r15.rar]glesty-win32_SSE2-r15.rar[/url] (579 kb)
or for older processors (without SSE2)
[url=http://glest.codemonger.org/files/glesty-win32-r15.rar]glesty-win32-r15.rar[/url] (579 kb)
« Last Edit: 9 April 2016, 13:21:36 by filux »

wciow

  • Behemoth
  • *******
  • Posts: 968
    • View Profile
(No subject)
« Reply #6 on: 21 February 2008, 21:51:27 »
This doesn't work for me  :?
« Last Edit: 1 January 1970, 00:00:00 by wciow »
Check out my new Goblin faction - https://forum.megaglest.org/index.php?topic=9658.0

daniel.santos

  • Guest
-
« Reply #7 on: 21 February 2008, 23:34:21 »
OK, I think this is due to using the latest compiler, it links against newer c runtime libraries.  I'm recompiling to link these statically now, and will post when done.  Alternatively, you can download and install
Code: [Select]
[url=http://www.microsoft.com/downloads/details.aspx?familyid=9b2da534-3e03-4391-8a4d-074b9f2bc1bf&displaylang=en]Microsoft Visual C++ 2008 Redistributable Package[/url] and it will probably fix the problem.  Also, I'm getting some unresolved symbols now, so I'll have to figure that out before I can get a good build.
« Last Edit: 9 April 2016, 13:22:33 by filux »

daniel.santos

  • Guest
-
« Reply #8 on: 22 February 2008, 00:06:16 »
OK, try one of these.  I'm not exactly sure what happens when you run a program that was compiled to use SSE instructions and your processor doesn't support it, I presume it crashes.  But the SSE2 versions *should* be faster if your processor supports it.  I'll gladly take any opinions on this from somebody who's played with this more.

Either way, I found a bug in r15 that cause splash damage (and effects) to not splash, so it's fixed in this revision.

Code: [Select]
[url=http://glest.codemonger.org/files/glesty-win32-static-r17.rar]glesty-win32-static-r17.rar[/url] (673 kb)
[url=http://glest.codemonger.org/files/glesty-win32_SSE2-static-r17.rar]glesty-win32_SSE2-static-r17.rar[/url] (685 kb)
« Last Edit: 9 April 2016, 13:22:56 by filux »

wciow

  • Behemoth
  • *******
  • Posts: 968
    • View Profile
(No subject)
« Reply #9 on: 22 February 2008, 00:17:09 »
I downloaded the package and it works now. I tried a quick game but I'll need to do a bit more testing before I can give any worthy feedback. All I can say so far is that you have done an amazing amount of work. I'll try to get an updated media pack out to you by the end of the week with more models for testing.
« Last Edit: 1 January 1970, 00:00:00 by wciow »
Check out my new Goblin faction - https://forum.megaglest.org/index.php?topic=9658.0

daniel.santos

  • Guest
(No subject)
« Reply #10 on: 22 February 2008, 01:39:27 »
w00t!  Also, you will probably notice that the skeletons are too large and the necromancers are too small.  I'm not personally worried, it'll all work its self out.

I'm going to try to play an actual game 2nite using the magic faction and see how it plays.  I tried the other night, but the Lich's AE effects weren't working.  I'm also thinking that the path of corruption needs better defenses against the tech tree's areal units, they kinda kicked my butt last night and the tech areals have to get some improvements with their expanded subfactions (definitely the path of reason should, maybe armored air units).  I was also thinking that the path of nature could get spy units like owls or something.

Oh, one more thing, do download the r17 executable, it fixes the problem with AEs (splash) not working.
« Last Edit: 1 January 1970, 00:00:00 by daniel.santos »

tux-gamer

  • Guest
(No subject)
« Reply #11 on: 22 February 2008, 18:32:03 »
Wow, it look like interesting, but  i can not svn.
because, my internet conection blok SSL/Https.
Can you give  direct link to linux source code? like daily-svn source code in tar.bz2 ?

Thanks before :D
« Last Edit: 1 January 1970, 00:00:00 by tux-gamer »

Duke

  • Guest
(No subject)
« Reply #12 on: 22 February 2008, 20:57:07 »
you have a strange internet connection if it dosn't allow you to secure it. 0o
« Last Edit: 1 January 1970, 00:00:00 by Duke »

daniel.santos

  • Guest
(No subject)
« Reply #13 on: 23 February 2008, 02:56:25 »
Quote from: "tux-gamer"
Wow, it look like interesting, but  i can not svn.
because, my internet conection blok SSL/Https.
Can you give  direct link to linux source code? like daily-svn source code in tar.bz2 ?

Thanks before :)  All you have to do is determine if the specified coordinates are visible from the GameCamera object and return true or false.  It just returns a hard-coded true for now so you don't get spammed, but that's all I need to finish that part.  This is one of the very few negative consequences I got from not finishing high school :)

Edit: changed link to sources that have win32 build fixed
« Last Edit: 1 January 1970, 00:00:00 by daniel.santos »

daniel.santos

  • Guest
-
« Reply #14 on: 23 February 2008, 03:54:34 »
Update: r24 now supports subfactions (not yet documented in wiki) and almost supports the off-screen attack notification.  If this doesn't work for anybody, please let me know.  I'm guessing that there aren't many computers this will crash on (since it's compiled with SSE2 instructions), but it would help to know and thanks.

win32 static binary:
Code: [Select]
[url=http://glest.codemonger.org/files/glesty-win32-static-r24.rar]glesty-win32-static-r24.rar[/url] (692 kb)
« Last Edit: 9 April 2016, 13:23:29 by filux »

tux-gamer

  • Guest
(No subject)
« Reply #15 on: 23 February 2008, 10:53:21 »
Quote from: "daniel.santos"
Quote from: "tux-gamer"
Wow, it look like interesting, but  i can not svn.
because, my internet conection blok SSL/Https.
Can you give  direct link to linux source code? like daily-svn source code in tar.bz2 ?

Thanks before :)  All you have to do is determine if the specified coordinates are visible from the GameCamera object and return true or false.  It just returns a hard-coded true for now so you don't get spammed, but that's all I need to finish that part.  This is one of the very few negative consequences I got from not finishing high school :lol:

Thanks for the link, i will download and try it.

I'am sory, i'am  just a stupid gamer not a coder, so i canot help you.

ps: i'am sory if my english is bad.
« Last Edit: 1 January 1970, 00:00:00 by tux-gamer »

hardyvoje

  • Guest
Do we have "deploy" skill support by Glest or Gles
« Reply #16 on: 26 February 2008, 02:51:28 »
If not I'll try on it in next month.

By deploy I think:
- make solider to lay on ground for more accurate firing, lower change to get hit
- tank deploys to unmovable cannon
- harvesting unit deploys to mine
...

Original Glest game don't need it as I see, but for some other projects (like my) it will be interesting.

Also:
- coverage

"building" type of object in which unit can enter and fire from it.
« Last Edit: 1 January 1970, 00:00:00 by hardyvoje »

daniel.santos

  • Guest
(No subject)
« Reply #17 on: 26 February 2008, 07:36:55 »
@hardyvoje@, Challenges like that make it fun :)  Also, we're going to put out an alpha 1 or the four path magitech tree soon (with the engine needed to support it).  I'll post another tarball of the code so you can download it and I might try to make a pre-compiled binary for Linux as well.
« Last Edit: 1 January 1970, 00:00:00 by daniel.santos »

daniel.santos

  • Guest
-
« Reply #18 on: 4 March 2008, 09:10:27 »
Unstable (i.e., not all that well tested) release:
Code: [Select]
[url=http://glest.codemonger.org/files/glestadv-win32-r43.rar]glestadv-win32-r43.rar[/url] (win32)
This adds auto repair, which is actually something that effects normal play on the Magitech tech tree.  This probably needs an on & off switch.  Also, when units attack because they see an enemy, they will now very congenially return to their point of origination instead of staying scattered all around.

Here is a complete list of the new features (I think):
  • When units attack an enemy on their own (i.e., because they spotted them), they will now politely return to where they started out after the enemies are gone.
  • Units with repair/heal abilities will now automatically heal/repair damaged units if they are idle.  They too, will also return to where they were before when all units within eyesight have been repaired.
  • Using a repair/heal command on a unit no longer is stopped when the unit moves.  Instead, they will chase the damn thing around until it's either healed or dead.
  • You can now use repair/heal commands on an empty cell.  The unit will travel to that location and heal/repair any damaged ally that it sees along the way, much like the way the attack command works when used on an empty cell or unexplored area.
  • Units no longer attempt to build from the top right (NW) corner of a building.  Instead, the builder unit will progress towards the nearest position that they can begin building from.  If the builder unit resides inside of the location where the target building is supposed to go, he will relocate to outside of that area, unless you have completely blocked him in.
  • Building multiple buildings in a row (units with <multi-build value="true"/>) doesn't break now when one of the units can't be built.  Before, it would cancel them all.  Now, it will build all of the buildings that it is able to.
  • Made major changes to the repair skills (RepairSkillType).  Repair skills can now take an optional amount (to override the default repair amount), a multiplier (to use the default repair amount, but modify it) and max-range.  Additionally you can now have a splash particle system associated with them so that on each iteration of the repair, pretty decorations indicate that the target is getting repaired/healed.
Also, please note that I have not merged with the mainline in about 2 weeks.  This means that the fixes for ATI users (due to ATI's crapped up drivers) are not in the glest advanced engine mod yet.  There was also some minor balancing done in the mainline that hasn't been merged either.

Known Issues
  • Repair (and possibly build) skills can occasionally cheat and work 1 space further away than they should.  This is basically the result of sloppy coding (I'll fix that later) and perhaps partially the result of compiling with -ffast-math and not having good float to int handling when lerping.

EDIT: Changed not to now! :)
« Last Edit: 9 April 2016, 13:23:52 by filux »

Dr.Dixie

  • Guest
(No subject)
« Reply #19 on: 4 March 2008, 19:28:02 »
Yay! Capital! Five star! Thanks, Daniel! Especially the first two...
Quote
Units with repair/heal abilities will not automatically heal/repair damaged units if they are idle.

Are you sure you meant to say that?


!Dr.Dixie!
« Last Edit: 1 January 1970, 00:00:00 by Dr.Dixie »

orion

  • Guest
(No subject)
« Reply #20 on: 4 March 2008, 20:43:21 »
BRAVO Daniel.Santos.

The GAP will be a huge mod to Glest. The Glest Team might actually start using it in future releases.
« Last Edit: 1 January 1970, 00:00:00 by orion »

Duke

  • Guest
(No subject)
« Reply #21 on: 4 March 2008, 21:15:31 »
Quote from: "Dr.Dixie"
Yay! Capital! Five star! Thanks, Daniel! Especially the first two...
Quote
Units with repair/heal abilities will not automatically heal/repair damaged units if they are idle.
Are you sure you meant to say that?


that not was meant to be a now I think
« Last Edit: 1 January 1970, 00:00:00 by Duke »

orion

  • Guest
(No subject)
« Reply #22 on: 4 March 2008, 23:56:53 »
Quote
Using a repair/heal command on a unit no longer is stopped when the unit moves. Instead, they will chase the damn thing around until it's either healed or dead.


That could do more damage than good when you think about it. Let's say you're healing a guards, but then you suddenly have to attack with that guard. The technician, who is healing the guard, will follow the guard into battle.
« Last Edit: 1 January 1970, 00:00:00 by orion »

daniel.santos

  • Guest
(No subject)
« Reply #23 on: 5 March 2008, 02:24:19 »
whoops! yea, that "not" was supposed to be a "now" :-[

Thanks for all of the positive feedback!!

@orion@, true enough, but the point is to try to keep the military units alive.  However, when idle, a technician will choose to attack an enemy rather than auto-heal an ally.  If explicitly ordered, he will dedicate himself to the task of healing until finished.  Again, I think it's worth having a way to toggle this on and off (either globally or at the unit level).  Perhaps units that have one or more repair commands can get a button (near where the cancel button appears) that will toggle auto-heal/repair on and off.  Probably some button with a wrench and a + for the auto-heal on and the same button with a klaxon over it for the auto-heal off.  It would need a similar button for the magic side.
« Last Edit: 1 January 1970, 00:00:00 by daniel.santos »

Dr.Dixie

  • Guest
(No subject)
« Reply #24 on: 5 March 2008, 02:49:42 »
I just realized that when you have multiple buildings being built, a Worker/Initiate starts building whichever building it first hits, not necessarily the one that you are right-clicking. Bug...
I hope you understand.

!Dr. Dixie!
« Last Edit: 1 January 1970, 00:00:00 by Dr.Dixie »

 

anything