View topic - Turn-Based Mod Feasibility


All times are UTC + 1 hour


Post new topic Reply to topic  [ 14 posts ] 
Author Message
PostPosted: 21 Nov 2011, 22:56 

Joined: 21 Nov 2011, 22:47
Hi all!

I feel like this is a terribly noobish question, but a search of the forum didn't reveal a clear answer for me so here it goes:

I know that Spring is a RTS engine, but would it be terribly difficult to modify it for simultaneous turn based play? To clarify: players would issue orders to their units, end the turn, and then all of the units would execute those orders for a predetermined period of time (something like Flotilla).

I would like to hear your thoughts as to the feasibility of such a modification to to engine. Would it be better to write an engine from scratch? Or is Spring up to this?

Regards,

parallax
Top
 Offline Profile  
 
PostPosted: 21 Nov 2011, 23:03 
User avatar

Joined: 22 Feb 2006, 01:02
Location: cheap kitchen
viewtopic.php?f=67&t=17662&hilit=+turn+based+
and some other threads.
I'd say it is technically possible.
Do you want to make such turn based game?
For start just play a game of BA or whatever with a friend and pause the game every 30 seconds (pause key)
Might give you some ideas what works and what does not.
Top
 Offline Profile  
 
PostPosted: 21 Nov 2011, 23:05 
Content Developer
User avatar

Joined: 13 Jan 2005, 00:46
parallax wrote:
I would like to hear your thoughts as to the feasibility of such a modification to to engine. Would it be better to write an engine from scratch? Or is Spring up to this?

why modify the ENGINE?
Top
 Offline Profile  
 
PostPosted: 22 Nov 2011, 00:03 
Moderator
User avatar

Joined: 23 Nov 2005, 06:16
Location: Dunedin, New Zealand
smoth wrote:
why modify the ENGINE?

He probably means with lua/widgets/etc.
Top
 Offline Profile  
 
PostPosted: 22 Nov 2011, 06:27 

Joined: 21 Nov 2011, 22:47
Thanks for your responses guys!

My primary motivation for looking into this is there is a game I really want to play... The problem is it hasn't been made yet :wink:

Do any of you remember the original Missionforce: Cyberstorm from Sierra (circa 1996)? Or have you played MegaMek (an open source implementation of the Battletech tabletop board game)? Or Mechcommander 2? All three of these games are "mech" games, but that isn't what I love about them. What I love about these games is the depth that exists within the units. Each one is unique, and represents an asset/investment to the player. When you lose that unit, it sucks~ therefore you do your best to keep it alive. Also, you can get down to the nitty gritty and do things like tell your units to fire on specific systems of the enemy units, or allocate more power to shields and such.

Why turn based? The level of tactics/strategy that you can employ when you have a minute to think about what you are going to do adds another dimension to a game. It's not everyone's cup of tea, but I happen to like it. More recently games like Flotilla and Frozen Synapse have introduced another element to turn based games- simultaneous turn execution. This leaves you needing to guess what your opponent is going to do rather than watching their turn and responding to it.

I would love to play a game that combines these elements, and I haven't really found anything lately that fits the bill.

I've been a fan of indie games for a long time, and I read on a developers blog not to long ago something that struck me. When he was asked why he made the game (I'm sure I'm going to botch this) he said something to the effect of "I made the game because I wanted to play it." It inspired me.

So here I am. Most of my experience with games programming is very limited but I am not an inexperienced programmer (when I'm not in classes I'm a research assistant in a robotics lab). I recently worked with the Horde3D graphics engine to prototype a virtual agent (fancy name for avatar) for use in a study. That kind-of got me thinking that I might try my hand at programming for fun for a change.

I came across Spring when I was looking for some examples of open source strategy games to get an idea of where to start. I remember when it was first released... and I am SO impressed as to how far along it has come and what you guys have done with it!

Das Bruce wrote:
smoth wrote:
why modify the ENGINE?

He probably means with lua/widgets/etc.

Honestly I hadn't done enough research into the framework of Spring to know that you wouldn't need to modify the engine to make some of the changes I was thinking of~ I didn't fully realize how versatile it is. I'm a little embarrassed :oops: I will be sure to do some more reading before I ask any more questions.

My main reason for posting was to see what some of the veterans around here thought of the idea before I committed a ton of time learning Spring only to find out it wasn't feasible to do what I wanted to do with it. The fact that nobody's response was "THAT'S CRAZYTALK" may mean that I'm on the right track. Furthermore, other's have worked on this before me (thanks for the point in the right direction, knorke :-) ) so I can learn from them. I know this is a huge undertaking but I'm in no rush to get it done.

Also, please don't get me wrong; I know in this post I am going on about turn-based games, but I do *love* RTS games. One of my two favorite genres :-)

Regards,

-parallax
Top
 Offline Profile  
 
PostPosted: 22 Nov 2011, 07:46 
User avatar

Joined: 28 Jul 2008, 05:51
Location: Australia
You have the ability to pause the simulation and queue orders via the Lua code you ship with your game (gadgets). Really the only thing stopping you is your own commitment to evolving the concept - which means doing the boring stuff like learning Lua, writing the code, and testing it - plus all the additional work of creating game content.

Making the game turn-based is the easiest part of creating your game. The hard part will be the other 99% which is content creation.
Top
 Offline Profile  
 
PostPosted: 22 Nov 2011, 08:59 
User avatar

Joined: 22 Feb 2006, 01:02
Location: cheap kitchen
Quote:
You have the ability to pause the simulation and queue orders via the Lua code
...and you can also prevent players from giving orders when it is not their turn.

If you look at the functions to controll gamestate you can maybe tell by their names that Lua gives you pretty good controll about what happens. In theory you could write your own movement code and make it eg based on grids or even do something completly non-rts like a chess game where you would use basically nothing of the normal physic engine.

What might be pitfalls, for which I see no easy workaround:
-In turn based games you often get some "simulation mode" to try out your actions. That will be hard to pull off as there is only one game state for all players. (Can not have players test out their orders independently) You would basically have to code your own weapon/unit/everything logic for that.
-movement, firing etc is very predictable in turn based games: A unit will move be able to move excactly 100 meters (or "5 grids" or w/e), then be able to fire twice. In Spring that is not so predictable, put two units in same (but slightly different positions) and give them the same orders: the results will differ as small difference grow larger.
That two things might be very hard to get to work.

links:
http://springrts.com/wiki/The_Complete_ ... pring_Game
good start point, covers getting 3d models ingame and make basic units.

http://springrts.com/wiki/SpringTutorialGame
example game that is slightly better than the one linked in above tutorial

There is no good, complete Lua scripting tutorial atm, though try this:
viewtopic.php?f=23&t=16223
Most people learn by examples:
-unpack some games, look at stuff. some games have SVN to browse online
-http://springrts.com/wiki/WidgetDatabaseFAQ
not bad, but the scripts actually used in the games are usually more up to date.

In lobby, type into chat:
/join #moddev
/join #lua
/join #sy (for engine)
Top
 Offline Profile  
 
PostPosted: 22 Nov 2011, 14:20 
Content Developer
User avatar

Joined: 13 Jan 2005, 00:46
Yeah paralax, spring is extremely flexible. Honestly, it is my favorite thing about the engine. Just be sure to work out your concept and try some of the other projects. Not just the ta varients because the spring engine has a lot of power and honestly they mainly just use the built in features.
Top
 Offline Profile  
 
PostPosted: 22 Nov 2011, 15:52 
Kernel Panic Co-Developer
User avatar

Joined: 16 Nov 2004, 13:08
knorke wrote:
-movement, firing etc is very predictable in turn based games: A unit will move be able to move excactly 100 meters (or "5 grids" or w/e), then be able to fire twice. In Spring that is not so predictable, put two units in same (but slightly different positions) and give them the same orders: the results will differ as small difference grow larger.
Yeah, in turn based games, you give an order, and it is carried exactly as given. In Spring, not so much. You may give a move order and the unit will be slowed down from bumping in other units and not reach its destination in the allocated time. The direction it's facing when stopping might be uncontrollable. Etc...
Top
 Offline Profile  
 
PostPosted: 22 Nov 2011, 17:11 
User avatar

Joined: 23 Oct 2004, 00:43
There's two ways you could go about this - first is that you use the Spring engine for actually doing the combat and movement of the units. So you use LUA to lock all units in place except for the one that is receiving an order, then unlock that unit for X amount of time. Then freeze it again when the time is up and wipe the orders and let the other player take his turn.

The alternate is to completely ignore Spring's simulation code (which would be very limiting to your gameplan since Spring's sim is not flexible enough for a tile-based TBS) and you re-write the entire simulation in Lua.

In that case, the Spring engine will be used mostly for providing services external to the core gameplay - it will give you models and explosions, the lobby service, it will synch your state between all the players... but the actual gameplay you're going to have to write from scratch in Lua.

If you feel you could make a turn-based strategy game from scratch using a dynamic programming language, then Spring can provide you with some good services that will make this effort worth your while - you'll get some nice graphics and online multiplayer and a lobby for free.

If you're not looking on coding from-scratch and want a game that will provide boardgame services, you should look elsewhere.
Top
 Offline Profile  
 
PostPosted: 22 Nov 2011, 17:56 

Joined: 21 Nov 2011, 22:47
Thanks again for all of the great information, guys!

I only have a minute to reply then I have to run out the door so I can't be very in depth with this post. I'll be back on tonight.

Just to clarify:

A simultaneous execution turn based game is what I am going for. The flow of gameplay will look like this:

-----------------------------------------------------

Orders phase - This is where you give all of your units orders which are queued for use in the next phase. Much like shift-clicking in RTSs, but with a more depth. No units actually move or fire here: gameplay is frozen. Both players do this at the same time.

Execution Phase- The players lose the ability to control the units as they execute the orders given to them in the previous phase to the best of their ability. This goes on for a predetermined period of time (if other games are a good indicator probably about 15 seconds). At the end of that time, all gameplay freezes and the game returns to the orders phase.

-----------------------------------------------------

So think less of a boardgame and more of a stop motion RTS where you try and guess what your opponent is going to do while he/she does the same to you :-)

Much more dynamic than the traditional Battle Isle type TBS.

Regards,


-parallax
Top
 Offline Profile  
 
PostPosted: 22 Nov 2011, 18:05 
MC: Legacy & Spring 1944 Developer
User avatar

Joined: 29 Apr 2005, 00:14
Location: #moddev - join it!
That sounds perfectly feasible in Spring afaics.
Top
 Offline Profile  
 
PostPosted: 22 Nov 2011, 18:11 
Cursed Zero-K Developer
User avatar

Joined: 07 Nov 2007, 21:48
Location: Horse
zwzsg wrote:
knorke wrote:
-movement, firing etc is very predictable in turn based games: A unit will move be able to move excactly 100 meters (or "5 grids" or w/e), then be able to fire twice. In Spring that is not so predictable, put two units in same (but slightly different positions) and give them the same orders: the results will differ as small difference grow larger.
Yeah, in turn based games, you give an order, and it is carried exactly as given. In Spring, not so much. You may give a move order and the unit will be slowed down from bumping in other units and not reach its destination in the allocated time. The direction it's facing when stopping might be uncontrollable. Etc...

Can turn off unit blocking and etc. There's almost always a solution.

My suggestion is go for it. Join #moddev and #lua in the lobby.
Top
 Offline Profile  
 
PostPosted: 22 Nov 2011, 22:15 
Journeywar Developer & Mapper
User avatar

Joined: 24 Jan 2006, 21:12
Location: Location: Location: In Real Estate as in Bladder Voiding its central.
I want to go to full sarcastic again... but this is not actually a difficult thing to do. Hell its a widget that autopause the game, and resumes once everbody hits the button. Everything is there.

You know normally when such ideas are suggested, new comunity members get some cool greetings. But hey, this is easily acomplished, you can even test with other mods- for example smoths gundam... that way you can refine the gameplay-idea without lots of extra work, before getting the first mechas in.

Spring.SetNoPause
( boolean noPause )

This is the comando to get the engine into pause mode, everything else, deployment and such could be done via knorkes awesome wall that allows for unit movement at the start in a limited square.

Man, listen to that, im rambling like a never grown child. Do you remember Demonwars .. man if we could redo DarkOmen in Spring...

If you got any questions, pm me or join #moddev or #lua for advice. Welcome to the comunity.

PS: Mother u happy noaw?
Top
 Offline Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 14 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group
Site layout created by Roflcopter et al.