Author Topic: Merging Glest 3.2.2  (Read 16794 times)

silnarm

  • Local Moderator
  • Behemoth
  • ********
  • Posts: 1,373
    • View Profile
Re: Merging Glest 3.2.2
« Reply #50 on: 17 July 2009, 13:32:23 »
Is it possible to exclude tags like 'unitCreated' though, especially since most scenarios produce some units at the start, and the rest are controlled by deaths. Also, can we have multiple 'unitDied' tags? Now that I see how they work, I take back my objection to using a tag for the timer.
You don't need multiple unitDied event handlers, one is enough... it fires when any and every unit dies, so you need to be careful with your logic, see below...
Quote
However, you have two unneccessary lines in your code. You check the faction of the last dead unit, which is unneccessary, because there can only be one unit with that ID, which will be the faction that you stated (0). Checking the faction isn't neccessary when checking for the last dead unit by an id. No biggy though.
True, but eliminating the 'apparently' redundant if means you need one for the old else clause...
Code: [Select]
<unitDied>
if ( lastDeadUnit () == mySpecialUnit ) then
  -- It was an important unit, whose ID I stored in 'mySpecialUnit' in the <startup> script
  -- this might end the game with loss, or trigger some other action...
end
if ( unitFaction ( lastDeadUnit () ) > 0 ) then
  -- Unit belonged to one of Player's 2-4
  -- check victory conditions and/or respond according here
end
</unitDied>

The logic is identical, it's just expressed slightly differently. That version probably is 'cleaner' looking code than the first I will admit :)  But in a real life script, you'd probably be doing more, so it will actually make more sense (when more code is inserted) to split the event handler up first based on faction... then do any 'special' checks and victory condition checks where needed, for each faction...
Code: [Select]
<unitDied>
if ( unitFaction ( lastDeadUnit () ) == 0 ) then
  -- check if it was a special unit, and respond
  -- check any other victory conditions we have for player 1
elseif ( unitFaction ( lastDeadUnit () ) == 1 ) then
  -- do similar stuff for player 2
elseif ( unitFaction ( lastDeadUnit () ) == 2 ) then
  -- and for player 3
end
</unitDied>
Glest Advanced Engine - Code Monkey

Timeline | Downloads

Platyhelminth

  • Guest
Re: Merging Glest 3.2.2
« Reply #51 on: 20 July 2009, 12:11:24 »
I have noticed that GAE use less processor power than normal glest. I know it is not the only difference, but I hope this will be kept.
« Last Edit: 21 July 2009, 17:42:19 by Platyhelminth »

silnarm

  • Local Moderator
  • Behemoth
  • ********
  • Posts: 1,373
    • View Profile
Re: Merging Glest 3.2.2
« Reply #52 on: 21 July 2009, 03:17:52 »
I've just committed bug fixes for the last few issues that I knew about on trunk.

If anyone with SVN and a compiler wants to give it a spin...
It has:

+ Scenarios & LUA from Glest 3.2.2, but you have to (for now) create a directory called 'gae_scenarios' and and then create directories within that directory for categories, I, for example, have three directories in my gae_scenarios directory, 'tutorial', 'battle', and 'megapack'. The actual scenario folders then go in these category folders.

+ A shiny new path finder, and your choice of algorithm and node limit [These options will disappear one day, if/when multiplayer is fixed all players will need the same settings].  If it is compiled with _GAE_DEBUG_EDITION_ defined, extra options to draw pretty pictures on the map will be made available, all to do with the new path finder.

+ Support for additional fields of movement. [Though this is somewhat hindered by the lack of mechanism to build structures over different fields, so no shipyards yet, but a mechanism has been devised and is currently being worked on].

New binaries should be available within a week or so, barring any last minute discovery of particularly nasty bugs...

Glest Advanced Engine - Code Monkey

Timeline | Downloads

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
Re: Merging Glest 3.2.2
« Reply #53 on: 21 July 2009, 09:28:09 »
Cool 8) !
One question: since GAE will now use a separate scenarios directory, can it still play normal glest scenarios?

This support for new fields, how is it defined in the XML? I take it it is simply called 'water'.

Hoping for win32 binaries soon! Will there be a simpler way to find the pathfinding debugging than recompiling it? Suppose an ini setting?
Edit the MegaGlest wiki: http://docs.megaglest.org/

My personal projects: http://github.com/KatrinaHoffert

silnarm

  • Local Moderator
  • Behemoth
  • ********
  • Posts: 1,373
    • View Profile
Re: Merging Glest 3.2.2
« Reply #54 on: 21 July 2009, 10:25:09 »
One question: since GAE will now use a separate scenarios directory, can it still play normal glest scenarios?
Yes, and I'm hoping to add a (very basic!) 'wizard' to setup the directories for you and copy your existing scenarios into them.

Quote from: omega
This support for new fields, how is it defined in the XML? I take it it is simply called 'water'.
Accepted values will be "land", "air", "any_water", "deep_water" & "amphibious". As I mentioned, there'll be no buildings hanging out over the water just yet, so they won't be that useful. "amphibious" should be working, but I haven't actually tested any of the new fields in a while... so it probably doesn't! Something I should check.

Quote from: omega
Hoping for win32 binaries soon! Will there be a simpler way to find the pathfinding debugging than recompiling it? Suppose an ini setting?
The 'debug edition' allows you to turn them on/off, but even with them off there is some added overhead in the path finder, so for performance reasons, it will never be in an 'official' build.  I will make binaries of the debug edition available though.
Glest Advanced Engine - Code Monkey

Timeline | Downloads

wciow

  • Behemoth
  • *******
  • Posts: 968
    • View Profile
Re: Merging Glest 3.2.2
« Reply #55 on: 21 July 2009, 10:28:06 »
New binaries should be available within a week or so, barring any last minute discovery of particularly nasty bugs...

Hooray, I've been waiting for the compiled binarys  :) . Although I can (and have) compiled stuff in the past its much easier to wait for someone with experience to do it. Saves alot of headaches and error posts.

I have some holiday coming up so I'll put some extra time into testing and report any bugs!
Check out my new Goblin faction - https://forum.megaglest.org/index.php?topic=9658.0

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
Re: Merging Glest 3.2.2
« Reply #56 on: 21 July 2009, 11:12:14 »
For a wizard, why not have the binaries in one of those install wizards? Just like how we install 99% of windows programs these days. For linux, they can't even use the binaries, and need to use the source or a precompiled thing-a-ma-ging, of which I got no knowledge of.

Besides, it may be a good idea to start getting into the idea of using installers, since GAE is pretty much ready to replace vanilla glest, and it would be easier for people to download one installer than an installer for vanilla glest, and then put in the GAE. It would also make GAE easier for newbies.

I dunno how installers work, but there is a lot of third party programs for them. I'm not sure if there is any easy ways to make them, but API's are supposedly very effective, and the vast majority of programs these days, free, demo, or commercial, have installers.

Possibly NullSoft (http://nsis.sourceforge.net/Main_Page) or Inno (http://www.jrsoftware.org/isinfo.php). There doesn't seem to be much else really that I could find for free installers. Wonder what all the other programs use?
Edit the MegaGlest wiki: http://docs.megaglest.org/

My personal projects: http://github.com/KatrinaHoffert

silnarm

  • Local Moderator
  • Behemoth
  • ********
  • Posts: 1,373
    • View Profile
Re: Merging Glest 3.2.2
« Reply #57 on: 21 July 2009, 12:15:03 »
For a wizard, why not have the binaries in one of those install wizards?
I don't think GAE is in need of an installer just yet. The 'wizard' will be a message box :) when the game loads it will look for 'gae_scenarios' and if it's not there, offer to create it and populate it with the contents of your scenarios and tutorials folders.

Quote from: omega
Besides, it may be a good idea to start getting into the idea of using installers, since GAE is pretty much ready to replace vanilla glest
I wish I shared your confidence on that one... GAE is 'under development', there'll be bugs for some time, and as new code is added, so too new bugs will be added.  Martiño has done an incredible job developing Glest, and has got it to a very stable state, GAE is unlikely to reach such a state for a good while yet.

Quote from: omega
and it would be easier for people to download one installer than an installer for vanilla glest, and then put in the GAE. It would also make GAE easier for newbies.
This is a valid point. The installer issue will I'm sure be addressed, but I think there is much work to be done yet before GAE is ready for one.
Glest Advanced Engine - Code Monkey

Timeline | Downloads

modman

  • Guest
Re: Merging Glest 3.2.2
« Reply #58 on: 21 July 2009, 23:58:49 »
There is a cool feature that might be useful as an installer.  Alzip is a tool I use to open various compression formats.  It also comes with a feature of zipping a folder into an executable.  Basically, you choose where you want it to install to, and the executable automatically just unzips to that location.

It's not as professional as other programs, but it works. ;)

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
Re: Merging Glest 3.2.2
« Reply #59 on: 22 July 2009, 07:49:57 »
That's a quick and easy way for the team to do 5 minute 'installers'. Would be fine for early releases, but I think that sooner or later, they need a proper installer. Like Vanilla Glest.
Edit the MegaGlest wiki: http://docs.megaglest.org/

My personal projects: http://github.com/KatrinaHoffert

hailstone

  • Local Moderator
  • Battle Machine
  • ********
  • Posts: 1,568
    • View Profile
Re: Merging Glest 3.2.2
« Reply #60 on: 23 July 2009, 09:07:07 »
I've created a topic for trunk testing and one for discussing a GAE installer. I'm not going to lock this topic since the multiplayer and extra crash info wasn't merged and someone might want to do that. But the branch has been reintegrated with trunk so anything that isn't related to the 'stated merge topics' is off topic in my opinion.
Glest Advanced Engine - Admin/Programmer
https://sourceforge.net/projects/glestae/

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
Re: Merging Glest 3.2.2
« Reply #61 on: 23 July 2009, 09:32:07 »
So, how come no win32 binaries yet? Perhaps this is your GAE 3.0 alpha RC? It could qualify for that. By getting more people testing it, you could find bugs easier, as well as get comments that may (or may not) be crucial.
Edit the MegaGlest wiki: http://docs.megaglest.org/

My personal projects: http://github.com/KatrinaHoffert

hailstone

  • Local Moderator
  • Battle Machine
  • ********
  • Posts: 1,568
    • View Profile
Re: Merging Glest 3.2.2
« Reply #62 on: 24 July 2009, 06:02:36 »
You are right. I think at the time I reintegrated, nobody but you showed interest and you were unable to try it because of the computer trouble. I should have uploaded one anyway. I've uploaded a win32 binary of the latest trunk now (see https://forum.megaglest.org/index.php?topic=4471.msg27600#msg27600 ).
Glest Advanced Engine - Admin/Programmer
https://sourceforge.net/projects/glestae/

Heretik

  • Guest
Re: Merging Glest 3.2.2
« Reply #63 on: 30 July 2009, 22:30:47 »
+ Scenarios & LUA from Glest 3.2.2, but you have to (for now) create a directory called 'gae_scenarios' and and then create directories within that directory for categories, I, for example, have three directories in my gae_scenarios directory, 'tutorial', 'battle', and 'megapack'. The actual scenario folders then go in these category folders.

Why didn't you just commit them into data directory ?

By the way, the "scenarios" directory is obsolete compared to Glest 3.2.2 as well, as this version uses one level of directory. So instead of creating a new "gae_scenarios" directory, it could just replace the current "scenarios" directory.

silnarm

  • Local Moderator
  • Behemoth
  • ********
  • Posts: 1,373
    • View Profile
Re: Merging Glest 3.2.2
« Reply #64 on: 30 July 2009, 22:57:10 »
Why didn't you just commit them into data directory ?

By the way, the "scenarios" directory is obsolete compared to Glest 3.2.2 as well, as this version uses one level of directory. So instead of creating a new "gae_scenarios" directory, it could just replace the current "scenarios" directory.

Commit what? An empty directory?

The 'scenarios' directory is not 'obsolete' and is used by Glest 3.2.2.
Glest Advanced Engine - Code Monkey

Timeline | Downloads

Heretik

  • Guest
Re: Merging Glest 3.2.2
« Reply #65 on: 31 July 2009, 09:26:37 »
Commit what? An empty directory?

Commit what you created locally, something like :

scenarios / battle   / anarchy          / anarchy.xml
                                duel                / duel.xml
                  tutorial / basic_tutorial / basic_tutorial.xml
                                                         basic_tutorial_english.lng

The 'scenarios' directory is not 'obsolete' and is used by Glest 3.2.2.

I mean it's obsolete as it is currently.

In GAE trunk it is :

scenarios / anarchy.xml
                  duel.xml
                  etc.xml

whereas in Glest 3.2.2, it is :

scenarios / anarchy   /anarchy.xml
                  duel         / duel.xml
                  storming / storming.xml
                                   storming_english.lng

silnarm

  • Local Moderator
  • Behemoth
  • ********
  • Posts: 1,373
    • View Profile
Re: Merging Glest 3.2.2
« Reply #66 on: 31 July 2009, 22:20:03 »
Err.. Ok.. I didn't know they were there :)
Will sort that out today, thanks!
Glest Advanced Engine - Code Monkey

Timeline | Downloads

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
Re: Merging Glest 3.2.2
« Reply #67 on: 1 August 2009, 11:28:22 »
I don't think we should share the same folder. GAE will have more features in lua than glest, so it is crucial they are separate. No offense, but try not to brainwash silnarm... If that's what your trying to do, world domination is considered evil by hollywood! ;D

Of course, if you happen to be talking about folder structure, then go ahead, but keep the gae folder separate from the glest 3.2.2 one...
Edit the MegaGlest wiki: http://docs.megaglest.org/

My personal projects: http://github.com/KatrinaHoffert

Heretik

  • Guest
Re: Merging Glest 3.2.2
« Reply #68 on: 2 August 2009, 16:17:49 »
keep the gae folder separate from the glest 3.2.2 one...

I don't think it's useful, because Glest scenarios can be migrated very easily (just a directory level to add, as silnarn explained). And when GAE will have completely integrated Glest 3.2.2 and be stable, Glest will be obsolete.

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
Re: Merging Glest 3.2.2
« Reply #69 on: 3 August 2009, 08:41:02 »
I don't think it's useful, because Glest scenarios can be migrated very easily (just a directory level to add, as silnarn explained). And when GAE will have completely integrated Glest 3.2.2 and be stable, Glest will be obsolete.
Except Glest is not obsolete yet. GAE has not yet taken over. Still many people have no clue what GAE is (it should be on the official download page, if you ask me).

Truth be told, I don't really care as long as we can play glest and GAE scenarios in the same computer without having v. glest choke. There are still times you may need to use a stable older version... Never know!
Edit the MegaGlest wiki: http://docs.megaglest.org/

My personal projects: http://github.com/KatrinaHoffert

 

anything