Advertisement

Scripting

Started by April 06, 2003 04:56 AM
28 comments, last by The Keymaster 21 years, 7 months ago
I don''t think he has a good point.
Well it depends on the type of your project, resources and aims.
If you''re making something simple like Pacman or Tetris clone u certanly have no need for a scripting engine. If you don''t have time to develop a scripting engine see no real use for it u can do without it.
But any bigger project should have a scriting engine in it. There are a few reasons why I am for a scripting engine in most cases:

1. Scripting engine prolongens the life of project and aids its popularity.
Think about it, would Starcraft be as popular if it wasn''t for tons of user made maps, most of them heavily using Starcraft script or would Quake be around as long if it wasn''t for all of the mods which are only possible trough the scripting engine.

2. When logic behind a game gets very complicated like in adventures, RPGs or even RTSs it gets very hard to hardcode it and keep track of all the relationships. For the project I''m starting I have to develop an engine for implementing and applying all of the traffic rules. Imagine hardcoding it. I''d end up with huge branch structures crossreferencing to tons of flags. Instead I will probably go for a sort of a prolog like scritpting language with realions between rules and calls to engine procedures to apply the right rule.

3. Lets say you''re game is out and its some kind of a FPS. Now, loads of buyer are sending numerous complaints saying that they can''t get out of level 23 because there is to many water elementals coming out of the well and they don''t have a flame thrower. Designers say to u:"Right, make the rock next to the well unsteady so it falls off when you hit it with a grenade and makes the ground crack and molten lava comes poring out which evaporates the elementals."

You would make the changes(after you manage to find the right procedure for that level) recompile the game and ship off the new exe on a CD to all the buyers, or you could make a small change to the script and make a simple patch downloadable from ur website.

Choice is yours.
-----------------Always look on the bright side of Life!
I find your first two points interesting. I can definately see the advantages there. However...

quote: Original post by A Guy from CRO
You would make the changes(after you manage to find the right procedure for that level) recompile the game and ship off the new exe on a CD to all the buyers, or you could make a small change to the script and make a simple patch downloadable from ur website.


That''s not true: Why would I have to ship the exe on a cd? I could also just recompile the exe and post -that- on my website for download. It''s just one exe, not all that huge. Wether they download a patch with a new script or a patch with a new exe, it''s basically the same thing. No real advantage at all.

Anyway, I guess the two biggest advantages for scripting are data abstraction (as you said, most useful in RPG''s/Adventure games) and expansibility, for FPS/RTS games.
Advertisement
Don''t forget reusability. Code the engine, refine it, let it rest. All of the remaining work can be done with scripts, with possible minor additions made to the core engine. You can''t fail to see that this will speed up development time. You mentioned that artists don''t have any reason to be messing with code, but what if that "artist" on your RPG project happens to have 15+ years of P&P RPG experience and is intelligent enough to grasp scripting?

Anyway, you could have multiple games all designed around the same engine, with the scripts defining the behavior. If you code the scripting engine well enough you can hook everything down to the UI, like Dungeon Siege.

Care.

Florida, USA
RTS Engine in Development
http://www.knology.net/~heaven
Jesus is LORD!
Florida, USA
Current Project
Jesus is LORD!
quote: Original post by The Keymaster
That''s not true: Why would I have to ship the exe on a cd? I could also just recompile the exe and post -that- on my website for download. It''s just one exe, not all that huge. Wether they download a patch with a new script or a patch with a new exe, it''s basically the same thing. No real advantage at all.


If ur entire game logic, all the levels and object behaviour is hardcoded into the exe it wouldn''t be such a small exe after all!!
-----------------Always look on the bright side of Life!
I only read the first two posts. But I have to say I HATE hardcoding things. It makes the code less messy, but I guess that''s justme.
--Muzlack
A lot of scripting uses microthreads, which lets your script do its own thing rather than deal with a loop cycle. For example, you might want your script to wait for 20 seconds and then do something. Script engine microthreads aren''t necessarily as much of a CPU burdon as a full thread. I made a script engine that used up to 30 such microthreads, and the overhead for them had no perceivable impact. With this and other benefits, scripting is often the way to go.

Value of good ideas: 10 cents per dozen.
Implementation of the good ideas: Priceless.
Proxima Rebellion - A 3D action sim with a hint of strategy
Value of good ideas: 10 cents per dozen.Implementation of the good ideas: Priceless.Machines, Anarchy and Destruction - A 3D action sim with a hint of strategy
Advertisement
It''s good to have if you want to have a moddable game. That way you don''t have to give modders your source, and they won''t have to compile etc. Unreal Tournament did this, and by God, that game has some great mods.
A scripting language would benefit the game buyers as well. The game buyer can tweak the game stuff and make sure his/her computer can run the game properly. If Counter-Strike didn''t have scripting i''d be entirely screwed because my computer isn''t a huge game playing machine. I think it''s a bit unfair to tell someone that if their machine isn''t good enough that they have to buy a new machine.

I also think scripting is good for games because it allows games to have a larger community. The mod community is very large with Half Life, UT, and Quake games and normally i thot game developers wanted huge communiies.

Also, wouldn''t it be a lot easier to go and fix scripts rather than having to go back and recompile all this code, debug, make sure it works properly and everything else?
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
                                                          
Looking for video game music? Check out some of my samples at http://www.youtube.c...ser/cminortunes            
                                                          
I'm currently looking to create music for a project, if you are interested e-mail me at cminortunes@gmail.com    
                                                          
Please only message me for hobby projects, I am not looking to create music for anything serious.
*agrees with heaven*
I see most people''s points here, but what still eludes me is how recompiling, testing and debug is considered a burden scripting doesn''t suffer from. If you change a script, you''ll -also- have to recompile, test, an debug it.

This topic is closed to new replies.

Advertisement