A Simple Scripted Game - Printable Version
+- iDevGames Forums (http://www.idevgames.com/forums)
+-- Forum: Development Zone (/forum-3.html)
+--- Forum: Game Design (/forum-5.html)
+--- Thread: A Simple Scripted Game (/thread-7445.html)
A Simple Scripted Game - geezusfreeek - Dec 15, 2002 10:31 PM
I have always wanted to create a simple engine with scripting capabilities that basically handle different interactions of several sprites on screen and give them different behaviors. This is game development at its most basic concepts.
With an engine like this a simple game could be created that consists of, for example, one sprite controlled by the player and several other sprites that can function as one of the following: enemies, allies, neutral units, or power-ups. Each type functions differently and is visually distinct so that the player can tell the difference. For example, one type of enemy could always try to circle the player to confuse him. One type of ally could always go after one type of enemy, or vice versa. Power-ups can be scripted to avoid all other sprites as much as possible to make them harder to pick up. Some units could be programed simply to closely follow other units, thus creating collisions (that can be manipulated by players' movements to make them hit enemies). When two units collide, different things can happen depending on what type of unit it is.
Another idea could be to make a point-and-click real-time strategy game involving basic units and resources. The difference could be that the enemy team is not centrally controlled, but is merely sent out to follow each unit's free will. Really the main difference between this and the first game would be that action would be slowed down and the player can control more than one unit at once.
A whole set of mini-games could be created by making new scripts and possible some different graphics (although the sprites could be represented merely as different colored shapes).
What sorts of behaviors would be interesting to see in mini-games like this? What other types of mini-games could be made?
A Simple Scripted Game - Quicksilver - Dec 20, 2002 04:01 PM
How about a game similar to pocket tanks.
A Simple Scripted Game - geezusfreeek - Dec 20, 2002 07:06 PM
Come to think of it, this could function as a 2D action game development environment. Make a bunch of sprites, give them behaviors with scripts, and set up some winning criteria, and you've made a game.
Input could be easily handled by basic scripts assigned to each key, mouse click, and mouse movement.
Different behaviors could be handled as separate scripts, plus a default script for when there are no triggered "events" pertaining to that sprite. Different scripts can call each other as functions so that more complex behavior can be created. Simple things, such as physics, can be incorporated directly into the environment and different aspects of these things can be toggled on and off.
Sprite scripts could even have the ability to spawn new sprites to make a simple particle system, each particle controlled as a sprite and with a decay rate assigned to them and everything.
Scripts can also be made to control the whole environment, deciding game states and the like.
Graphics and sound can be created in any way possible and simply imported and saved into an archive used by the game. Levels could be created by using sprites to represent both tiles and interactive parts. This can be powerful. For example, if you are making a game in which characters walk around, you can have a road tile and a rock tile. When the character is on rock a script modifies his walking speed to make it slower than if he is on road.
This would make a great environment for action games, a great diversion from RPG-making environments.
A Simple Scripted Game - DaFalcon - Dec 20, 2002 07:19 PM
Sounds like an advanced version of the Snake Quest engine, GF :-) The difference is that what you described should have better collision detection than simple tiles, and some things like particle effects would probably be easier in your theoretical environment, but it has been done with Snake Quest. We've even had people use the two-player snake controls as inputs for the single player, effectively executing scripts on a button-press.
Ededed has done some remarkable things with the scripting system, as has "our" user, Don Joe, who has made some of the best SQ level sets ever created.
Just an observation
A Simple Scripted Game - geezusfreeek - Dec 22, 2002 03:58 PM
That's why I said tiles should be treated as sprites, for advanced collision detection.
A Simple Scripted Game - AJ Infinity - Jan 20, 2003 02:56 PM
Still interested in making this, geezusfreek? How bout a visually oriented, drag n drop, easy to code, scripting system in the style of RCX Code (the program used to program Lego robots). Give it a polished aqua UI and do it in Cocoa Java and then I'll most likely help.
/ / AJ Loves the idea / /
even better: use RealBasic. ColdStone was done with RealBasic. The Green Machine was done with RealBasic.
A Simple Scripted Game - ERaZer - Jan 20, 2003 03:58 PM
The Green Machine is slow as hell, and Coldstone aint that fast either and still Coldstones engine is C/C++. It shutters on a g3 300 mhz even tought it uses not so advanced 2d...
But if you make the engine in a faster language then RealBasic its good, but making it fully in RealBasic is a bad idea.
A Simple Scripted Game - geezusfreeek - Jan 20, 2003 04:09 PM
I never intended to make it. It was just something to think about. I was thinking a bit higher level scripting though, like instead of manually doing a bunch of collision math and stuff, the collision detection is done as an event triggered when two sprites collide. Maybe even a scalable physics engine built right in, etc.
A Simple Scripted Game - FCCovett - Jan 20, 2003 04:27 PM
Yeah, you could cash out $1,200 on Macromedia Director, but I don't recommend it...
A Simple Scripted Game - Mark Levin - Jan 20, 2003 04:29 PM
This sort of high-level scripting (objects are created, configure basic building blocks, and act on callbacks from the native simulator code) is basically what I have in mind for S2
A Simple Scripted Game - AJ Infinity - Jan 21, 2003 06:21 PM
Quote:Originally posted by ERaZer
According to ColdStone's splach screen, it's "Made with RealBasic. I've heard about the Green Machine being slow. (I've also seen how slow RB is)
A Simple Scripted Game - ERaZer - Jan 22, 2003 08:42 AM
Yeah, the whole Coldstone IDE is made in realbasic. The engine however is made in C/C++.
A Simple Scripted Game - ededed - Jan 25, 2003 10:20 AM
drag n drop NONONO!
I think it should be python because that looks easy.
It would not exactly be like SQ because if it was then you would have a drag n drop scripting language which should be avoided at all costs. But it would be as extendable as SQ except not grid based.
There should be a console that lets you enter or test commands and scripts in the game.
I made a nice java thing a long time ago, it reminds me of this. You could drop as many bombs as you wanted anywhere then set any off. They would take a short amount of time and you could get nice chain reactions. I image this type of thing an the kind of things seen in SQ as well. Another nice thing would be to have a flammable image so someone could drop petrol and then set off an explosion and the some sort of fill algorithm would fill the petrol area with fire then cause things nearby to burn.
A Simple Scripted Game - geezusfreeek - Jan 25, 2003 07:14 PM
You've got the idea ededed.
A Simple Scripted Game - w_reade - Jan 25, 2003 09:32 PM
Do have a look at OSC's Lua Smiley Tag code. It'll seem a little bit confusing at first, and then you'll suddenly start getting very excited indeed, if you've never actually done anything with scripting before. It's an education .