Author Topic: locally stored resources + airplanes  (Read 4589 times)

Idanwin

  • Guest
locally stored resources + airplanes
« on: 4 December 2008, 19:44:44 »
At this moment there's only hp and ep.
If you had to define all these integers in the techtree you could add more and rename them.
Also the possibility to "heal" these.
(you could refuel planes, give them more ammunition...)
« Last Edit: 5 December 2008, 11:09:03 by Idanwin »

daniel.santos

  • Guest
Re: hp, ep and others
« Reply #1 on: 4 December 2008, 22:02:58 »
Yea, that's mostly implemented already in 0.3 with the "replenish" skills (formerly named "repair").  The "locally stored resources" aren't implemented yet, but that was the idea for them, they could be fuel, ammunition, etc. and with auto-repair/auto-replenish, you would just have to get near a replenishing unit and they would automatically start replenishing ("refuelling", whatever).  With skills having the added ability to have a "cost" other than EPs (i.e., HPs and locally or globally stored resources), they could be used, in effect, to transfer globally stored fuel (as an example resource) to a unit that stores it locally and uses it to move around.

But this is still in development, so it's not ready yet.

Idanwin

  • Guest
Re: locally stored resources + airplanes
« Reply #2 on: 5 December 2008, 11:26:04 »
I would like to add airplanes to my mod.
And there are some things that aren't possible yet.

1) Landing, planes should only be able to land on airports, or maybe (this is difficult) on a long, flat surface ! without i obstacles.
2) When low on fuel they should return to closest airport.
3) When no fuel left they should crash with a nice huge damaging explosion which wipes out all units below. Or should be able to do a forced landing in which case there could be some survivors that climb out. To make it even more realistic they would already have lost some health.
4) Two or more commands at once (drop bombs, paratrooper or ammunition while flying).
5) Make it possible to only have 2-3 planes in one airport (only 2-3 can land there at the same time and you can only build 2-3 for every airport)

modman

  • Guest
Re: locally stored resources + airplanes
« Reply #3 on: 6 December 2008, 03:41:59 »
What you want is very specialized, you have to realize, so it probably will require an entirely new engine.

Idanwin

  • Guest
Re: locally stored resources + airplanes
« Reply #4 on: 6 December 2008, 09:34:13 »
I do,
I'm just saying what can't be done yet, not all of them are necessary.
I'm also looking at the code myself but it's a lot.
I understand most of the things now, how ai works and the game stats and other things.
But the pathfinding seems like one of the most difficult ones. (I didn't look at all files)
Pathfinding also needs a lot of improvements. (not because of airplanes...)

daniel.santos

  • Guest
Re: locally stored resources + airplanes
« Reply #5 on: 6 December 2008, 11:08:28 »
yea, pathfinding needs a lot of help IMO.  I just have one comment on item #4, do you really want to drop paratroopers and bombs at the same time? I'm not sure I would want to be one of those paratroopers, personally.  :)  I was planning on going about as far as Starcraft's Protoss Carrier, and the "flying around" skill I would leave on the back burner (leave un-done until later).  The "flying around" skill skill would have a unit continue to move and have to make passes at their target, much like it sounds like yours will need.

If you are interested in modding the engine, just be aware that I'm working on some performance improvement issues right now, that I'll be releasing with 0.2.11.  The 0.3 branch is where the bulk of new features will end up.  After I'm finished with 0.2.11, I'm going to merge those changes into 0.3 branch (something I haven't done in a month or so).

Idanwin

  • Guest
Re: locally stored resources + airplanes
« Reply #6 on: 6 December 2008, 11:13:58 »
no I meant flying while dropping bombs or paratroopers or ammunition (if ammunition needs refilling)

me helping? I could try, but all I can is deprove the engine.
Serious, I'm only a beginner, but maybe, when I've learned some c++ (at the moment the best I could was a terminal-based civilisation simulator...)

How much does c++ look like AS2? I made some RPG and RTS (not like glest) with it. But lost all of it because it was on my windows which crashed in september and I never made a backup...

I hope I'll be able to help...

PS do you have to compile it again for every change you make? It takes a lot of time, and to make the tb-civsim I had to compile it ten times for every small change.

daniel.santos

  • Guest
Re: locally stored resources + airplanes
« Reply #7 on: 6 December 2008, 11:56:30 »
Ahh, moving while attacking, I get you!  Yea, that would be needed to emulate the starcraft-style carrier as well, and would be done with projectiles just like other attacks in Glest are now being done, so that part isn't much different.  Dropping paratroopers or supplies would be new code though.

I confess that I don't know what AS2 is :(  Also, what are you compiling on?  How many processor cores do you have?  If you are on linux and have a dual core processor, I suggest trying "jam -j3", it will compile faster.  If you have a quad core, use "jam -j5".  I implemented most of pre-compiled headers for gcc, but I don't remember if it works or not (and I haven't been using it).  To enable, you have to add "-DUSE_PCH" to your CPP_FLAGS, but I don't remember if it works or not on gcc (linux/mac/mingw, etc.), but it does work on msvc++.  And yes, I have to compile after every change I make, but it usually doesn't have to compile every single file (I just run "jam" again)

Idanwin

  • Guest
Re: locally stored resources + airplanes
« Reply #8 on: 6 December 2008, 19:53:27 »
ActionScript2

when I just run jam it sais:
failed 25 files
skipped 119 files

(not sure about the numbers)
and nothing has changed

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
Re: locally stored resources + airplanes
« Reply #9 on: 9 December 2008, 15:49:52 »
I think what we just need is a way to set custom ep names and amounts. So we can have ep that is called ammunation, and another seperate thing of ep called what ever you want, such as fuel. This could be edited in the xml, and regen rates would be set the same way. Not perfect, but...
Edit the MegaGlest wiki: http://docs.megaglest.org/

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

daniel.santos

  • Guest
Re: locally stored resources + airplanes
« Reply #10 on: 10 December 2008, 03:06:00 »
No, Ep is Ep.  You can't have separate names for it if you have more than one, even if it made any sense to rename it, which it doesn't.  If I'm going to do something, I'm going to do it right, I don't kludge things.

With locally stored resources, you can specify max amount, initial amount and regen rates.  Skills can have a cost from them so they can *behave* like EP currently does, but they will not *be* Ep, that will still be a separate, optional stat.  It's an added benefit that you can have a harvest skill that will replenish your locally stored resource from a node in a map and then carry and drop them off at a global store.  In fact, perhaps we should change the way harvesting works so that harvesters actually "store" the resources on them locally so there is less redundant behavior. hmm (gives me pause for thought)

I guess the more I think about it omega, you may be on to something.  If we just eliminate EP entirely and have it a locally stored resource then it may clean up some of the code when implementing locally stored resources (maybe it'll need a different name though).  I don't think that's possible with hit points though because there's SO much code surrounding that.  Then again, I'm not sure if this is a good idea after all  :)  lol!!  Either way, they should be able to behave like Eps do.

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
Re: locally stored resources + airplanes
« Reply #11 on: 11 December 2008, 15:36:58 »
Leave EP alone!
I'm just suggesting that the xml could have the option to have units with another ep value that could be named differently.
Edit the MegaGlest wiki: http://docs.megaglest.org/

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

daniel.santos

  • Guest
Re: locally stored resources + airplanes
« Reply #12 on: 12 December 2008, 12:18:28 »
that is precisely what "locally stored resources" are, at least in concept.  If somebody comes up with a better name, then I'll adopt it.

 

anything