Page 1 of 1

Basic map scripting?

Posted: 07 Oct 2005, 15:08
by Pxtl
Hey. I was just dusting off an old StarCraft UMS map and was thinking how much I'd love to do the same sort of thing with Spring. I was wondering if there is any facilities for scripted multiplayer maps? Any plans? It doesn't have to be sophisticated - a simple server-side Lua-script system would be all most people should need. The real problem is that some maps would require their own mod - I don't know how well TA's unit script system woudl work for that.

Mostly, just simple scripted ways to do obvious things like create/destroy/transfer units, change health, change resources, check what units (from which player) are at a given location, declare a winner, etc.

That, and a menu that can let the players choose their role/team within the script, rather than which faction they are, since scripted maps often have specific needs for which role each player will fill.

Then we could have all the usual StarCraft cliche maps like Madness Maps, RPG maps ("yay, my peewee has just been upgraded to a rocko!"), etc. Themed maps (player 1 gets aircraft only, player 2 gets vehicles only, etc.), regular melee with specia goals (Control The Crater was a common suggestion, or critter hunting), and the like.

Posted: 07 Oct 2005, 16:44
by FizWizz
UMS games were actually fun for StarCrap, despite the suckitude of conventional StarCrap.
if UMS can be done (I doubt it), then I'd love to see "Sniper Paintball", "Starship Troopers SE", and "OMFG the Peewees!" for spring. There's still a lot better things for developers to spend their time on though...

Posted: 07 Oct 2005, 17:06
by Pxtl
FizWizz wrote:UMS games were actually fun for StarCrap, despite the suckitude of conventional StarCrap.
if UMS can be done (I doubt it), then I'd love to see "Sniper Paintball", "Starship Troopers SE", and "OMFG the Peewees!" for spring. There's still a lot better things for developers to spend their time on though...
Well, I'm not asking for the big spectacular StarCraft map editor - that thing was ungodly powerful. I'm just looking for a basic server-side scripting language with some simple functions. Hell, with a little work, you could even avoid having a menu - just do the old "region X of the map is the menu - move to point A to select team 1, point B to select team 2" and then have the script create the game after the players make their choice.

No events or anything, just give me a script hook where I can run a Lua script once per second, and a way to define the mod associated with the script. That, and a short API for getting/setting attributes of each unit, creating units, setting allies, and declaring a winner. I could do it myself if I thought the SYs would consider adding it into the project.

Hell, the presense of the scripted maps like "Random enemies" suggests that they've got something similar already. I just haven't figured out how those were done yet, and if they could be used in multiplayer.

Posted: 07 Oct 2005, 17:28
by hrmph
Although I've always liked StarCraft, I find those scripted maps to be pointless/not fun. Just my 2 cents...

Posted: 07 Oct 2005, 17:38
by Pxtl
hrmph wrote:Although I've always liked StarCraft, I find those scripted maps to be pointless/not fun. Just my 2 cents...
Well, depends on the map. While I wasn't fond of the typical "madness maps" and "rpg maps" that quickly became cliched and overdone, there were some very nice entries into the field as well. For example, the "steal the bacon" game that came with Brood War was awesome, not to mention the well balanced "StarCraft Fortress" team-fortress-CTF game. Personally, I ported Bitmap Bros' "Z" to the thing to great effect - you started out with a full-built (and well-defended) base and the map contained several "neutral" bases you could claim. The game was a frantic mad rush to claim neutral bases for yourself and use the resources to push back the opponent.

Plus, scripted maps are handy for making single-player campaigns... not that TA needs that.

Posted: 07 Oct 2005, 18:13
by hrmph
Pxtl: You make a good point. I can see how some of the games are fun (like steal the beacon). But as my memory recalls those RPG maps were so terrible (atleast the ones I play) I usually make gross generalizations in my posts :)

Posted: 07 Oct 2005, 19:46
by Torrasque
I really hate RPG map :)

I liked "war zone" map. The map is like a 7x7 chess-board, and each square produce one sort of unit every x second but only if you have a building on the square. Of course the middle's square produce bigger units.

Some tower def are quite cool, but at the end a little boring. I ask my-self how this could be in TA (you have to choose carfully where to place your turret because of the ballisitc)

Posted: 08 Oct 2005, 02:09
by Gabba
Pxtl wrote: Hell, the presense of the scripted maps like "Random enemies" suggests that they've got something similar already. I just haven't figured out how those were done yet, and if they could be used in multiplayer.
I think that script and the others that come with the game are hard-coded in c++.

Posted: 08 Oct 2005, 11:38
by SwiftSpear
Gabba wrote:
Pxtl wrote: Hell, the presense of the scripted maps like "Random enemies" suggests that they've got something similar already. I just haven't figured out how those were done yet, and if they could be used in multiplayer.
I think that script and the others that come with the game are hard-coded in c++.
Most likely mapscript of any style would need to be. Map scripting is generally done by the creation of a whole new engine for it in most games. I think either this stays at the bottom of the list in terms of priority, or the SYs find a simple implimentation that requires a bit of coding skill to acctually use. I really doubt you're going to see anything like the blizzard map tools for TAS any time soon, because we're talking about a HUGE softward design undertaking to make it happen.

Posted: 08 Oct 2005, 17:22
by AF
ahem, you should look at the dev forum, fnordia has already told us he's implemented a lua VM and bound enough itnerfaces to it.

He says he's bound some interfaces for map scripts such as 'commanders' and ahs enough interfaces bound to spawn units on start. Since he's using luabind, it would be very easy to implement changes that the previous post sys would take a huge softward design undertaking in a matter of seconds.

Posted: 08 Oct 2005, 19:59
by Dragon45
I'm actually agreeing with AF here for a second and saying this could actually come about and maybe not even in a year, in most scenarios.

I talked to jounonmiko some time ago about this and he said that the reason Spring is here at all but is not nearly as robust as commerical games is because the engine is entirely lacking in a lot of different kinds of optimizations, and based on my somewhat rudimentary understanding of C++, I think i can see how that is true. The thing with that is that although the engine itself is slower than a commerical one, it also allows for a lot more flexibility in terms of what can be done, with less additional resource usage inefficiency than is already present.

Just my 10 cents, feel free to refute at will...

Posted: 09 Oct 2005, 18:56
by AF
Actually I was saying ti already is true, fnordia hasnt uplaoded his changes to the CVS but he has working LUA map scripts running.

Posted: 10 Oct 2005, 23:19
by Pxtl
Alantai Firestar wrote:ahem, you should look at the dev forum, fnordia has already told us he's implemented a lua VM and bound enough itnerfaces to it.

He says he's bound some interfaces for map scripts such as 'commanders' and ahs enough interfaces bound to spawn units on start. Since he's using luabind, it would be very easy to implement changes that the previous post sys would take a huge softward design undertaking in a matter of seconds.
Fan-freakin'-tastic. So you can now make scripts for different starting inventories?

Posted: 11 Oct 2005, 21:10
by AF
I gues LUA scripting will be a 0.70b1 feature, you'll ahve to ask fnordia about the specifics.