Game Development Community

Action - RTS switching

by Marvin Hawkins · in RTS Starter Kit · 10/24/2005 (9:38 pm) · 11 replies

Okay I'm trying to get an FPS switch in my game demo. In short, I want the player to be able to press a button and gain standard FPS controls. If they press that same button again they regain the standard RTS controls as outlined in the RTS engine.

Question 1: So as a total newbie, Which files should I look at to modify?

Based on my experience: Here's what I've come up with so far.

- I need to make a player.cs (or import it fromt the fps.starter kit)
-I need to include a keybinding somewhere that switiches the datablock that is in the player control
- I probably need to do something with the camera


Note: I'm also pretty sure that since this is gameplay stuff I should handle most of the functions in the server directories.

As you can see it's really vague which means I've got no clue.

Question 2: Does anyone know of any resources/forums that have touched on issues such as control type switiching, datablock swithing. I appreicate any and all help.

Thanks,

Marvin H

#1
10/27/2005 (10:29 am)
Anyone?
#2
11/07/2005 (1:52 am)
Honestly, it would be easier to just backport the RTSUnit class into TGE.
#3
11/07/2005 (2:19 am)
The RTSUnit class is already backported into TGE. How do you think it works in the RTS Kit? :)

The thing to consider for your game is that the RTS kit and the FPS code run very different physics and networking models, as well as using different classes. An RTSUnit is light on the networking and extremely light on the physics. A normal player is heavy on both.

There might be some resources out there, but it basically comes down to one of two options: either make an FPS that looks like an RTS at times, or an RTS that looks like an FPS at times - making something that can transition robustly between the two states is almost certainly more effort than it's worth (if you ever complete the task at all...).
#4
11/07/2005 (2:28 am)
Ok, I stand corrected.
#5
11/07/2005 (7:41 am)
Thanks for answering the question Ben and Dreamer. Another member is answering this in another forum.

He basically echoed what you two said. So my plan now is to import the stuff from the RTS SK and take it from there.
#6
11/10/2005 (8:29 pm)
I've been giving some thought to what you said Ben? What exactly did you mean when you say make it look like an FPS.

I was going to originally design the game as a standard 3d RTS and have certain levels that featured the gameplay of 3rd person shooters.

My original thought was that I would have to create two different levels (one for the rts and and another for the fps) Now I think I just have to switch between the two controls. so is it a good idea to switch between the cameras (fps and rts in the same level or should i just load a new level for the fps part?)



After trying to do the switching on the fly it seems tough to do and may not neccessarily add much to the end gameplay.
#7
11/11/2005 (8:31 am)
Sorry I forgot to get back to you marvin, I'll send you the gameconnection file tonight.
#8
11/11/2005 (8:53 am)
That's fine robert. You're more than helpful so what game are you making anyway?
#9
11/11/2005 (9:00 am)
Well I'm developing a game called http://futurelands-thegame.com
At the moment I'm trying to get it ready for the alpha test Nov 20
After that I'm going to be working on the more hardware specific version of the game (Windows/DirectX and Xbox), it will be used on next gen hardware.
#10
11/12/2005 (11:21 am)
Marvin, I think it would be best for you to start with a new set of gameconnection.cc/.h files. Then just move over all the functions from RTSConnection.cc/.h, othen than that I cant really help as much as I thought. My GameConnection.cc/.h are using the 1.4 code base and I have made too many changes. Once you get the hang of programming in c++(I assume you dont already), then it should be fairly easy to merge RTSConnection with GameConnection. Maybe if you want you can get ahold of me on MSN. and I can kinda step you through it better. Just email me for my msn if you want.
#11
11/12/2005 (7:35 pm)
Word of encouragement, its not that hard if you're persistant, and its cool as! we ditched the rtsunits as we dont need very many units.