Advanced Tutorial

Advanced Tutorial

Discuss game development here, from a distinct game project to an accessible third-party mutator, down to the interaction and design of individual units if you like.

Moderator: Moderators

User avatar
Emyfour
Posts: 13
Joined: 29 Mar 2014, 13:52

Advanced Tutorial

Post by Emyfour »

Hi there, I'm new using the Spring Engine.
I have learnt something about the C++ and followed the Complete Guide by PTSnoop (this one, http://springrts.com/wiki/The_Complete_ ... pring_Game, which is very easy to follow and pretty good for a starter). Then I have played around a bit and made a simple game stealing some LUA files from the Tutorial Game (http://springrts.com/wiki/SpringTutorialGame).
But when I try to script my units or do anything more advanced, I get lost in the C++ and keep making mistakes.

Can you guys make something like an advanced tutorial, which explains you the LUA mechanics, the basic scripting and things like that? Or, if there's already something, can you give me the link? Maybe I'm too dumb to find it.

Thanks and sorry for the mistakes I may have made, English is not my mother tongue.
Bye and Happy Playing :lol:
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: Advanced Tutorial

Post by smoth »

That is a big question with broad answers.

First thing you do not use c++ unless you are altering the engine

Everything else is Lua

To understand Lua search programming in Lua the PIL site is all you will need to get started that and show up in #moddev in the lobby!

Good luck have fun!
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6241
Joined: 29 Apr 2005, 01:14

Re: Advanced Tutorial

Post by FLOZi »

imho there can be no such thing as its totally dependent on what game design you are trying to implement.

Perhaps a page which links to specific implementations of common RTS tropes (CTF, harvesting, squads etc) might be useful.

(That is basically what http://springrts.com/wiki/CollectionOfStuff tries to be afaics)
User avatar
Emyfour
Posts: 13
Joined: 29 Mar 2014, 13:52

Re: Advanced Tutorial

Post by Emyfour »

FLOZi wrote:imho there can be no such thing as its totally dependent on what game design you are trying to implement.
*mumbles* you're right :)

I'll read that link and I hope I'll understand...
You know I'm that kind of person which always pretends the easy way :lol:
Thanx you all very nice here :)
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6241
Joined: 29 Apr 2005, 01:14

Re: Advanced Tutorial

Post by FLOZi »

Best place is #moddev lobby channel for real-time discussions and help 8)
User avatar
PicassoCT
Journeywar Developer & Mapper
Posts: 10454
Joined: 24 Jan 2006, 21:12

Re: Advanced Tutorial

Post by PicassoCT »

Why not make a clickable link "Wanna Make Game?" that weblobbys everyone right into the channel of maddev?
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: Advanced Tutorial

Post by smoth »

programming in lua
I have the book on my desk, it should help with the parts of lua. The remaining logic parts, aka your game code is your own puzzle to solve. Luckily there are many projects to learn from
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6241
Joined: 29 Apr 2005, 01:14

Re: Advanced Tutorial

Post by FLOZi »

Free first edition is more than enough for Spring purposes http://www.lua.org/pil/contents.html
User avatar
Emyfour
Posts: 13
Joined: 29 Mar 2014, 13:52

Re: Advanced Tutorial

Post by Emyfour »

And, just in case, I found a PDF downloader for the second version:
removed

(Don't ask, I don't know if it's legal or not.)

And also this page might be useful

http://www.compileonline.com/execute_lua_online.php

It provides an online environment to test your LUA programs, since I didn't find any that can be installed...
Last edited by knorke on 30 Mar 2014, 12:34, edited 1 time in total.
Reason: sorry, not legal as far as i can tell. use the free version
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6241
Joined: 29 Apr 2005, 01:14

Re: Advanced Tutorial

Post by FLOZi »

User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: Advanced Tutorial

Post by knorke »

FLOZi wrote:Perhaps a page which links to specific implementations of common RTS tropes (CTF, harvesting, squads etc) might be useful.
(That is basically what http://springrts.com/wiki/CollectionOfStuff tries to be afaics)
Hm bit different: Idea is to collect interessting things that otherwise might be forgotten. Some things like "unit morphing" is interessting too but so common it is not worth listing...

---

On "advanced tutorial about Lua scripting":
Maybe threads like Mobile Mex or funny dance missiles are interessting start points:
Small scripts with some comments and explaining text. Not real tutorials but maybe the closet that exists.
(Some more are in mentioned wiki page.) Though must look around a bit and often read through off topic blabla.

Reading http://springrts.com/wiki/TestingYourGame will save some time.
gajop
Moderator
Posts: 3051
Joined: 05 Aug 2009, 20:42

Re: Advanced Tutorial

Post by gajop »

If you know programming, learning Lua will be easy. There are a few concepts you should grasp, such as that there are no classes, but there are metatables, a lot of functions return nil instead of errors, that sort of thing.

Your other programming skills can be applied here, you just need to learn the Spring API, and how we do things.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Re: Advanced Tutorial

Post by AF »

Emyfour wrote:Hi there, I'm new using the Spring Engine.
I have learnt something about the C++ and followed the Complete Guide by PTSnoop....
Welcome =) and +1 for showing research
User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7052
Joined: 16 Nov 2004, 13:08

Re: Advanced Tutorial

Post by zwzsg »

I'll say it again: There is no C++ involved when making a game for Spring.

Only LUA.



Old Spring games also have TDF/FBI/BOS, but in new Spring games they can all be replaced by Lua.

Oh, and obviously, 3D models and texture/images are not Lua... But Lua is used for all the text/stat data and logic of the game.

The Spring engine is there to avoid you to deal with C++.
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: Advanced Tutorial

Post by knorke »

zwzsg wrote:Old Spring games also have TDF/FBI/BOS, but in new Spring games they can all be replaced by Lua.
Plot twist! :shock: All spring games are old and so each one has some TDF/FBI/BOS.

Looking at engine c++ can still have some uses, but it is situational.
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: Advanced Tutorial

Post by knorke »

I found a cob!
https://venture2.projectlocker.com/Gund ... efault.cob

But more importantly: games, not wip stuff that is not playable.
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: Advanced Tutorial

Post by smoth »

knorke wrote:I found a cob!
https://venture2.projectlocker.com/Gund ... efault.cob

But more importantly: games, not wip stuff that is not playable.
TDF/FBI/BOS.
I am sorry knorke, is a dll C++?
User avatar
PicassoCT
Journeywar Developer & Mapper
Posts: 10454
Joined: 24 Jan 2006, 21:12

Re: Advanced Tutorial

Post by PicassoCT »

a dll is usually a binary? So it should contain compiled machine language.. have i missed something skipreading the thread?
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6241
Joined: 29 Apr 2005, 01:14

Re: Advanced Tutorial

Post by FLOZi »

PicassoCT wrote:have i missed something skipreading the thread?
Only tedious hair splitting. :roll:

I was going to say MCL is all lua but then remembered oh crap CEGs. It is fair to say that the vast majority of Spring projects will have at least one OTA format file of some kind; especially those which are long established and therefore prominent within the wider community.

Hopefully that satisfies everyone's burning desire to always be right / pedantic focus on absolute over-interpretations of what people type.
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: Advanced Tutorial

Post by Forboding Angel »

Emyfour wrote:And, just in case, I found a PDF downloader for the second version:
removed

(Don't ask, I don't know if it's legal or not.)

And also this page might be useful

http://www.compileonline.com/execute_lua_online.php

It provides an online environment to test your LUA programs, since I didn't find any that can be installed...
Luaedit 2010, while it has an interface that makes baby jesus cry, it can be nice for syntax checking, checking output, etc, but without communicating with spring, something like this can only be so useful.
Post Reply

Return to “Game Development”