Complete Guide to Making a Spring Game

Complete Guide to Making a Spring Game

Resources to get you going on your new project, or to help you over some emergent problems during your development cycle.

Moderator: Moderators

Post Reply
User avatar
PTSnoop
Posts: 97
Joined: 09 Sep 2009, 19:05

Complete Guide to Making a Spring Game

Post by PTSnoop »

...is now on the Wiki.

After looking at this thread, I had a look around the existing tutorials, and realised that most of them were spread across the wiki, the forums, and a few external sites, and that pretty much all of them were using tdf and BOS/COB rather than the newer lua. So I wrote my own.

Hope this helps someone somewhere. It still needs neatening up a bit, though; does anyone know how to get source code to show up properly?
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6240
Joined: 29 Apr 2005, 01:14

Re: Complete Guide to Making a Spring Game

Post by FLOZi »

One quick note - COB is not parsed back into lua by Spring, and is not necessarily any slower than LUS.
User avatar
Wombat
Posts: 3379
Joined: 15 Dec 2008, 15:53

Re: Complete Guide to Making a Spring Game

Post by Wombat »

Image

im gonna use it for sure <3
coolfile
Posts: 6
Joined: 17 Oct 2009, 11:51

Re: Complete Guide to Making a Spring Game

Post by coolfile »

PTSnoop wrote:...It still needs neatening up a bit, though; does anyone know how to get source code to show up properly?
Thanks a lot! It's so coooooooool!
You could write source code in <code> tags. For more info, please read the wiki manual.
User avatar
FireStorm_
Posts: 666
Joined: 19 Aug 2009, 16:09

Re: Complete Guide to Making a Spring Game

Post by FireStorm_ »

Great stuff!!
I'm right in the middle of learning this stuff, And this is very close to what i think would have been very helpful when i started. And since i don't know everything i need yet, i'm sure it'll still be helpful.

I think the commentary in the scripts is an especially good idea. I think a lot of people get stuck there, scripting i mean. I certainly was for quite some time.

I did notice a reclaim-button for the builder ingame, but no such tag in the Unit-file. (CanReclaim or CanReclamate).
(also open to this kind of feedback?)
User avatar
exciter
Posts: 65
Joined: 13 Jun 2010, 16:47

Re: Complete Guide to Making a Spring Game

Post by exciter »

PTSnoop wrote:...is now on the Wiki.

After looking at this thread, I had a look around the existing tutorials, and realised that most of them were spread across the wiki, the forums, and a few external sites, and that pretty much all of them were using tdf and BOS/COB rather than the newer lua. So I wrote my own.

Hope this helps someone somewhere. It still needs neatening up a bit, though; does anyone know how to get source code to show up properly?
Very nice stuff...! Thanks a lot :D

Now I will give creating my own game a try.


Very useful! Big deal! :D

Jipppiiie :D
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6240
Joined: 29 Apr 2005, 01:14

Re: Complete Guide to Making a Spring Game

Post by FLOZi »

FireStorm_ wrote: I did notice a reclaim-button for the builder ingame, but no such tag in the Unit-file. (CanReclaim or CanReclamate).
(also open to this kind of feedback?)
From UnitDefHandler.cpp:

Code: Select all

	builder = udTable.GetBool("builder", false);

	canRestore = udTable.GetBool("canRestore", builder);
	canRepair  = udTable.GetBool("canRepair",  builder);
	canReclaim = udTable.GetBool("canReclaim", builder);
	canAssist  = udTable.GetBool("canAssist",  builder);
i.e. Reclaim and other 'nano' abilities default to true for builders.
User avatar
FireStorm_
Posts: 666
Joined: 19 Aug 2009, 16:09

Re: Complete Guide to Making a Spring Game

Post by FireStorm_ »

I thought the builder did not execute its reclaim order when ordered to, and thought it might have something to do with a missing tag.

After checking the builder again the reclaim action is visually hidden...until the reclaimed object is disappeared.

So i stand corrected. apologies for my mistake.
User avatar
PTSnoop
Posts: 97
Joined: 09 Sep 2009, 19:05

Re: Complete Guide to Making a Spring Game

Post by PTSnoop »

Thanks for the responses, guys!

What I really need now is as much feedback as possible.
People familiar with the engine, please point out all the factual errors (I've fixed the COB lua one, but I'm sure there are plenty more).
People less familiar with the engine, please point out things that are unclear or don't explain things properly.

Everyone, what other things are worth saying? Is it worth adding a bit more about how to write Gadgets, or using GIMP, or CEGs, or LUPS? Or is the whole thing too long already and needs trimming down? What do you think?
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: Complete Guide to Making a Spring Game

Post by knorke »

where did my post go?
anyway, very nice guide :)
you could maybe chop it into more "chapters" and link them add the top:
1.8 Putting the Unit in a Mod
1.8.1 UnitDef
1.8.2 Animation Script
1.8.3 Weapon

Maybe also briefly say that Lua is a scripting language also used outside spring and that FBI files came from TA (i think)
And mention the #moddev #lua channels on lobby.

If you need more stuff to write about, I would like something about CEG (using .lua files)
http://springrts.com/wiki/CEG This explains some tags and things but some (commentated) examples maybe even with pictures would be cool.
8611
XTA Developer
Posts: 242
Joined: 29 Dec 2014, 08:22

Re: Complete Guide to Making a Spring Game

Post by 8611 »

PTSnoop wrote:...is now on the Wiki.
yes it is
Post Reply

Return to “Game Development Tutorials & Resources”