Author Topic: Basic Transport Units  (Read 7185 times)

hailstone

  • Local Moderator
  • Battle Machine
  • ********
  • Posts: 1,568
    • View Profile
Basic Transport Units
« on: 16 June 2010, 11:56:29 »
This is a feature that is requested frequently. Search for transport unit or garrison.

There's a lot that can be done with this but this will only be the basics.

This is the plan so far:
1. The player will select the units they want to transport and right click on the container unit.
2. The selected units will move towards the container unit.
3. When the selected units are in range they will disappear from view and be disabled. They are added to the list of units that the container unit is carrying which will be visible in the display panel (like the selection portraits). The container unit will have a max amount of units that it is able to carry (regardless of size).
4. The container unit will be able to move around as normal. If it dies all the units it holds will also die.
5. The container unit will need a deploy skill which will reposition all the units it holds and make them visible and enabled (possibly one unit at a time). The transport unit should be stopped when the deploy skill is used.

I haven't made a ticket for this yet.

@Silnarm: You said you had an idea at https://forum.megaglest.org/index.php?topic=4469.msg27525#msg27525 but didn't share it.

Edit: Added more to the algorithm.

Edit:
Here are some ideas that people have suggested or mentioned which could be discussed when the basic functionality is finished:
- units inside a transport/building be able to shoot (Wyvern)
- everything should sink and die when the carrier dies, but when on ground, an apc, for example, the units should survive with lowered health (Wyvern, Omega)
- some have a combination of units and transport moving where they try to meet in the middle (John.d.h)
- control how fast the deploy speed is, not all at the same time (Gabbe, ChupaReaper)
- adjust the movement speed based on how many units are carried (ChupaReaper)
- set which units are able to be carried (Omega)
- flag to prevent nested transports (ChupaReaper)
- visible carried units, such as a horse mount [maybe have positions with usable guns, ie attach to symbiotic pets] (ChupaReaper)
- allow units to modify the carrier's stats when carried (like an inventory system in other RTS games)
« Last Edit: 7 July 2010, 06:57:18 by hailstone »
Glest Advanced Engine - Admin/Programmer
https://sourceforge.net/projects/glestae/

Gabbe

  • Guest
Re: Basic Transport Units
« Reply #1 on: 16 June 2010, 12:37:09 »
Then the basics are covered, would like a deploy that units deploys gradually and not all at the same time.

wyvern

  • Guest
Re: Basic Transport Units
« Reply #2 on: 16 June 2010, 15:41:39 »
Great idea but I think that if the container is a ship and is carrying ground units for example, everything should sink and die when it dies, but when on ground, an apc for example the units should survive with lowered health

-Archmage-

  • Moderator
  • Dragon
  • ********
  • Posts: 5,887
  • Make it so.
    • View Profile
    • My Website
Re: Basic Transport Units
« Reply #3 on: 16 June 2010, 16:37:12 »
This would be great for Military!
He could have VTOLs!

I'll mention this topic next time I post in Military. :)
Egypt Remastered!

Proof: Owner of glest@mail.com

wyvern

  • Guest
Re: Basic Transport Units
« Reply #4 on: 16 June 2010, 18:07:44 »
Oh I never mentioned this other then to hypercube but this was an idea I had to cheat the transport system, say I'm playing a map and  I need to get on an island, I build transports and these tranports get there ep recharged at the dock and have no self ep recharge, lets say that the tranport has 100ep and can produce three units an armored car, a field gun and an infantryman, now once full it heads out and once it reaches the island it can produce any of the mentioned units, these units are produced instantly and each unit costs different amounts of ep, so armored car is 100 ep, field guns cost 50 ep, and infantrymen cost 10 ep, all of these have the unit resource cost on top of the ep requirements, this way the transport can deploy 10 infantrymen, 2 field guns or one armored car, then it has to go back to the dock to reload.

hailstone

  • Local Moderator
  • Battle Machine
  • ********
  • Posts: 1,568
    • View Profile
Re: Basic Transport Units
« Reply #5 on: 17 June 2010, 02:49:43 »
Keep in mind I'm only doing a basic transport unit. I don't want to have extra logic to write or test than I've already mentioned. Keep your ideas though because they might be used later on, but here isn't the place to put them. I only want comments for a basic transport unit, ie load, go from one place to another, unload.

Something I just thought of: The transport unit should be stopped when the deploy skill is used.

Then the basics are covered, would like a deploy that units deploys gradually and not all at the same time.
What do you mean by gradually? I'm not going to allow the user be able to select individual units this iteration. I might have them appear one at a time, I'll decide when I go to code it.
« Last Edit: 17 June 2010, 02:52:45 by hailstone »
Glest Advanced Engine - Admin/Programmer
https://sourceforge.net/projects/glestae/

John.d.h

  • Moderator
  • Airship
  • ********
  • Posts: 3,757
  • I have to go now. My planet needs me.
    • View Profile
Re: Basic Transport Units
« Reply #6 on: 17 June 2010, 02:59:05 »
Hmm... well, there's the issue of moving to the transport to load into it.  Some games have the units go to the transport, some have the transport come to the units, and some have a combination where they try to meet in the middle... and somehow end up miles apart on opposite sides of the screen.  Good luck finding a system that works. ;D

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
Re: Basic Transport Units
« Reply #7 on: 17 June 2010, 03:34:18 »
Oh oh oh!!! Me want!

Heh, been waiting for something like this for a while. Good luck implimenting it. Since you're looking for a basic implimentation, perhaps you can simply put an xml value that states either to kill all carried units or execute the unloading code (the equivilant of the user choosing to manually unload at the destination).

Can't wait to see this. Will this be a 0.3.0 milestone?
Edit the MegaGlest wiki: http://docs.megaglest.org/

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

Gabbe

  • Guest
Re: Basic Transport Units
« Reply #8 on: 17 June 2010, 06:37:55 »
You know...I think military should be one of GAE factions...I mean, it is probably the best GAE mod, so I think GAE could optimize the engine for shooter RTSes...I don`t know much thouygh but...

wciow

  • Behemoth
  • *******
  • Posts: 968
    • View Profile
Re: Basic Transport Units
« Reply #9 on: 17 June 2010, 07:43:03 »
Hmm... well, there's the issue of moving to the transport to load into it.  Some games have the units go to the transport, some have the transport come to the units, and some have a combination where they try to meet in the middle... and somehow end up miles apart on opposite sides of the screen.  Good luck finding a system that works. ;D

Units should move to the transport. Having the transport move to multiple destinations for pick up would be more difficult.
Check out my new Goblin faction - https://forum.megaglest.org/index.php?topic=9658.0

silnarm

  • Local Moderator
  • Behemoth
  • ********
  • Posts: 1,373
    • View Profile
Re: Basic Transport Units
« Reply #10 on: 17 June 2010, 14:24:36 »
@Silnarm: You said you had an idea at https://forum.megaglest.org/index.php?topic=4469.msg27525#msg27525 but didn't share it.

That was Zone::SURFACE_PROP, which I mentioned in more detail in the water topic ('ahoy there') and had more detail still on the bugzilla tracker... we'll need that for open top transports and units on walls, so they can still be targeted as per other surface units. For what you propose this is not a problem that needs to be dealt with.

The only thing I can think of that you haven't covered is how the Gui with display this, but that's getting re-implemented soon enough anyway, so we'll figure something out.

Sounds like a good plan, hack away!
Glest Advanced Engine - Code Monkey

Timeline | Downloads

ChupaReaper

  • Guest
Re: Basic Transport Units
« Reply #11 on: 17 June 2010, 14:26:41 »
Should be able to control how fast the deploy speed is, also have a move skill when carrying units maybe and make it so these can be altered using upgrades/effects, etc.

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
Re: Basic Transport Units
« Reply #12 on: 18 June 2010, 01:52:36 »
You know...I think military should be one of GAE factions...I mean, it is probably the best GAE mod, so I think GAE could optimize the engine for shooter RTSes...I don`t know much thouygh but...
I disagree. While there's no denying its the most complete GAE mod, and uses the most of GAE's features, I hope to bring FPM back into the light sometime in the (near/distant?) future. Of course, transport units are also needed for FPM.

*hint*
The other thing needed to pursuade me to fix up FPM is the AI being able to use sub factions, which FPM practically revolves around.
Edit the MegaGlest wiki: http://docs.megaglest.org/

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

Gabbe

  • Guest
Re: Basic Transport Units
« Reply #13 on: 18 June 2010, 06:12:27 »
what is FPM? im confused :confused:

hailstone

  • Local Moderator
  • Battle Machine
  • ********
  • Posts: 1,568
    • View Profile
Re: Basic Transport Units
« Reply #14 on: 18 June 2010, 07:21:37 »
Units will move to the transport for now.

The ticket is at https://sourceforge.net/apps/trac/glestae/ticket/141
It currently has very rough functionality for loading a unit into a carrier. I'm using battlemage as a test unit. The units that are being carried are shown at the bottom of the display panel.



I'll do some more work on it next week.

what is FPM? im confused :confused:
This is off topic. You can find out at GAE FAQ.
Glest Advanced Engine - Admin/Programmer
https://sourceforge.net/projects/glestae/

-Archmage-

  • Moderator
  • Dragon
  • ********
  • Posts: 5,887
  • Make it so.
    • View Profile
    • My Website
Re: Basic Transport Units
« Reply #15 on: 18 June 2010, 19:19:38 »
Quote
Units will move to the transport for now.

The ticket is at https://sourceforge.net/apps/trac/glestae/ticket/141
It currently has very rough functionality for loading a unit into a carrier. I'm using battlemage as a test unit. The units that are being carried are shown at the bottom of the display panel.

I'll do some more work on it next week.

Looks like great progress. :thumbup: :)



Quote
Quote from: HyperCube on Today at 03:17:15
what is FPM? im confused Huh?
This is off topic. You can find out at GAE FAQ.

FPM means Four Path Magitech. Gabbe, don't ask any questions about it here, ask in the FPM topic.
Egypt Remastered!

Proof: Owner of glest@mail.com

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
Re: Basic Transport Units
« Reply #16 on: 18 June 2010, 22:30:03 »
Looks great hailstone!

I can't wait to get my hands on it...  ;)

Can you show what the XML looks like for carrier units? Also, will this be a 0.3.0 release or will there be another 0.2.x release (0.2.13b?).

By the way, I assume you've thought of the following (crucial details):
-We can set which units are able to be carried. After all, we don't want an APC carrying a tank. Or a heli. Or anything like that. :P


Quote
Units will move to the transport for now.

The ticket is at https://sourceforge.net/apps/trac/glestae/ticket/141
It currently has very rough functionality for loading a unit into a carrier. I'm using battlemage as a test unit. The units that are being carried are shown at the bottom of the display panel.

I'll do some more work on it next week.

Looks like great progress. :thumbup: :)



Quote
FPM means Four Path Magitech. Gabbe, don't ask any questions about it here, ask in the FPM topic.

Uh oh, don't post there. The topic is both dead and outdated. I've done a bit of work on it, and have a new unit map that includes the paths of enlightenment and nature. PM me if you need information, though there isn't information to give. I've been meaning to start working on this, but lack the motivation from two simple reasons. (One being fixed by hailstone right here, and the other being the fact the bloody AI can't use a subfaction!)

[One of your replies was included with a quote, I fixed it. :) -- Arch]
[Thanks, that's what happens with messy quoting :P -- Omega]
« Last Edit: 20 June 2010, 22:04:47 by Omega »
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: Basic Transport Units
« Reply #17 on: 22 June 2010, 12:44:05 »
I have the units unloading ok now. There's still things to sort out but it is getting there. Hopefully by next week it will be ready for people to test.

Quote from: Omega
Can you show what the XML looks like for carrier units? Also, will this be a 0.3.0 release or will there be another 0.2.x release (0.2.13b?).
The basics are planned for 0.3.0. The trac tickets show when features and bugs are planned to be completed if you ever want to know.

The xml is almost the same as any other skill and command, at least for now.

Code: [Select]
                <skill>
<type value="load"/>
<name value="load_skill"/>
<ep-cost value="0"/>
<speed value="120"/>
<anim-speed value="50"/>
<animation path="models/battlemage_dying.g3d"/>
<sound enabled="true" start-time="0">
<sound-file path="sounds/battlemage_die1.wav"/>
</sound>
                        <max-range value="2"/>
                        <max-load value="10"/>
</skill>
       
                <skill>
<type value="unload"/>
<name value="unload_skill"/>
<ep-cost value="0"/>
<speed value="120"/>
<anim-speed value="50"/>
<animation path="models/battlemage_dying.g3d"/>
<sound enabled="true" start-time="0">
<sound-file path="sounds/battlemage_die1.wav"/>
</sound>
                        <max-range value="2"/>
</skill>

                <command>
<type value="carry"/>
<name value="unload"/>
<image path="images/magic_unload.bmp"/>
<unit-requirements/>
<upgrade-requirements/>
<unload-skill value="unload_skill"/>
</command>

Quote from: Omega
By the way, I assume you've thought of the following (crucial details):
-We can set which units are able to be carried. After all, we don't want an APC carrying a tank. Or a heli. Or anything like that.
I did but I'm not having any checks in the first iteration.
Glest Advanced Engine - Admin/Programmer
https://sourceforge.net/projects/glestae/

ChupaReaper

  • Guest
Re: Basic Transport Units
« Reply #18 on: 22 June 2010, 14:52:33 »
Would it be ok if a transport units could carry another transport unit which is already carrying units, sort of a 'russian nesting doll effect'. So the transport unit would carry it's units and then get carried by a bigger transport units and when unloaded will still have the smaller units inside. Just in case no one's thought about it in case and glitches pop up. i have Arachnotron and Asmodeus which are like giant demon spider tank things and Trites which are little fast pesky things, I want Arachnotron to carry them and Asmodeus to carry them or Arachnotron so you could have an Asmodeus carrying an Arachnotron which is carrying Trites.

Edit: Just thought of something else too, with transport units you can have mounts. Make say a horse unit for example, then a swordsman unit, the horse can carry the swordsman with a new model of both by sending the load skill to a different stop skill (you can do that right?). Only problem is it will still be limited with the horses commands and stats so the swordsman would have to dismount to fight at his best. Perhaps a proper mount feature can be implemented at some point based on transport units?
« Last Edit: 22 June 2010, 14:57:14 by ChupaReaper »

Gabbe

  • Guest
Re: Basic Transport Units
« Reply #19 on: 22 June 2010, 14:55:39 »
"HMV/humvee/hummer" carries "Machine Gunner" "HMV/humvee/hummer" enters "ship"

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
Re: Basic Transport Units
« Reply #20 on: 22 June 2010, 22:40:37 »
Aw, too bad. I'll test it, but there's no practical use, nor any reason to make a unit that can do this until there is a way to choose the units that can be carried (possibly in syntax similar to a build command?)
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: Basic Transport Units
« Reply #21 on: 30 June 2010, 14:11:18 »
I've changed the xml a bit. The load and unload commands are now separate instead of being of type carry with different skills. When you use the load command of the carrier you can select the unit you want to load (still being worked on) in addition to loading by selecting units and right clicking on the carrier.

It currently unloads from the max range in a circle inwards but I hope to change this so it unloads to the closest position of the carrier outwards. There's a bit of a delay for removing selection circle and the last unit to arrive tends to be the first to be loaded so it takes longer than it should. I had a very quick test of loading/unloading air units and it seems ok.

I'll upload an exe and example unit tomorrow.

Edit:
All the basic functionality seems to work ok now. Using a load command and selecting a unit to carry will now move the carrier to the unit, although the animation runs through several times before the carrier reaches the unit (doesn't seem to work with Golem). I found a crash trying to load Golem that could be from trying to load it multiple times since Golem will stop when ep runs out you need to tell it to move again but the load command is already in progress.

When loading multiple units it will run through the load animation for each unit since they are separate queued commands. I'm thinking I could add a pointer to Selection so I can combine it into the one command call (also should be able to make deselection quicker since it can be done in the command update instead of the selection update). If it still loops the animation so it looks strange I might need to implement a progress type system for animations which could also be used for construction.

The Sourceforge download or you can compile the source from trunk. This is only a preview for people who know what they're doing. Uncompress and override the files in a GAE install. If I missed something I'll re-upload next week. There's a list of possible tests at the ticket. I haven't run through them so they'll probably reveal bugs that I haven't mentioned yet. Just a warning that the mouse is rendered underneath the in game GUI which will be fixed when it's replaced with the new GUI.

Please let me know of any bugs so I can fix them and move on to some of the other carrier features you're wanting.
« Last Edit: 1 July 2010, 11:29:00 by hailstone »
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: Basic Transport Units
« Reply #22 on: 1 July 2010, 22:29:52 »
Looks cool. I'm downloading and playing with it.

I doubt I'll get around to putting them into military until an official release, but it is nice to know they're definately there! :D

In the future, will we be able to see an XML option on whether or not the unit's carried are killed (and if not, perhaps an option to reduce HP by x%). After all, we don't want units to survive a water carrier being killed, but might want them to survive (abet, weakened), from a land carrier.

Last question, how's the AI with this?
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: Basic Transport Units
« Reply #23 on: 2 July 2010, 05:33:54 »
Looks cool. I'm downloading and playing with it.
Please do!  Even if you're not going to use it now, the sooner problems with this first iteration are found and solved, the sooner additional features can be added.

Quote
In the future, will we be able to see an XML option on whether or not the unit's carried are killed (and if not, perhaps an option to reduce HP by x%). After all, we don't want units to survive a water carrier being killed, but might want them to survive (abet, weakened), from a land carrier.
Good suggestion.

Quote
Last question, how's the AI with this?
It simply wont use them atm.  This will actually be a bit more tricky than getting them using naval units properly, but I'll at least have a hack at it when I get to fixing it up for boats.

Glest Advanced Engine - Code Monkey

Timeline | Downloads

wciow

  • Behemoth
  • *******
  • Posts: 968
    • View Profile
Re: Basic Transport Units
« Reply #24 on: 2 July 2010, 12:03:54 »
Thanks Hailstone  :thumbup:

Firstly r699 is very unstable on my system (win7). It throws "runtime" errors and refuses to load most tilesets and factions :/ However I know this is just a WIP build so I'm not too worried.

So I've done a bit of testing with transport mage.

Things that work correctly:

Loading transports into other transports - seem okays and keeps each units loaded units correctly.

Unloading near trees -  works okay. If units cannot be placed they simply stay in the transport until it is moved to allow them out.

Unloading - Always seems to work and correctly place all of the units

Dying - Killing the transport unit seems to work correctly including all loaded units.

Things that don't work correctly:

Loading nothing - This is the big one! clicking on the load icon and then click empty, ground causes a total crash of Glest on my system  :o

Multiple loading. - Select 2 transports and tell them to pick up the same unit. Once the first tranport picks up its unit Glest will crash  :o

Loading - The loading command is not always successful and units will often not be loaded and have to be re-selected and loaded again. This tends to happen when loats of units congregate around the transport.

Maximum Loads - Don't seem to be working. I managed to get 11 units into a transport. The XML says maximum of 10.
Check out my new Goblin faction - https://forum.megaglest.org/index.php?topic=9658.0

 

anything