1,105,594 Community Members

Question regarding Script language usage in games.

Member Avatar
Light Poster
35 posts since Jul 2009
Reputation Points: -3 [?]
Q&As Helped to Solve: 4 [?]
Skill Endorsements: 2 [?]

Hey guys,

I've been working on a game for the past few months and I've decided to read up on game scripting to see how it could help me improve my current game.

What I've gathered so far, is that using a scripting language saves the developer time (since compiling the entire game every time is not needed when making changes) and it also makes the game engine much more versatile (if the game had for example 100 different bad guys, I wouldn't need to make 1 class for each bad guy).

However, I have a couple questions, how much should I, as the developer, allow scripts to dictate the variables in the game, be it enemies, map tiles, player stats, etc?

If i had a script file for each initialization of entities (for example, a script to initialize NPCs, another for items, etc), wouldn't that make it way too easy for anybody to simply change the variables in the script to abuse the game?

the second question is, is it a good idea to have game logic algorithms in script files? for example, let's say that the game engine has a class called "Gun" which has a method called "shoot", would it be good practice to have that Gun class read the script whenever the method shoot is called, and let whatever the script says handle the logic, making it have pseudo-polymorphic behaviour?

Thanks in advance for answers.

Member Avatar
Posting Whiz
376 posts since Oct 2007
Reputation Points: 42 [?]
Q&As Helped to Solve: 60 [?]
Skill Endorsements: 9 [?]

You would probably have more luck with this question in the Game Developpement forum,
now as far as scripting goes I can't provide much help but when i did learn some lua for world of warcraft addons, it was mainly for gui changes.

I do not know if other games use script for other things than graphical interface but from what experiences i got it's the only thing that blizzard allows lua scripts to do to the game.

Member Avatar
Posting Whiz in Training
243 posts since Oct 2011
Reputation Points: 0 [?]
Q&As Helped to Solve: 5 [?]
Skill Endorsements: 0 [?]

Can a moderator please move this thread?

Member Avatar
Code tags enforcer
7,939 posts since Dec 2004
Reputation Points: 2,502 [?]
Q&As Helped to Solve: 1,028 [?]
Skill Endorsements: 66 [?]

Can a moderator please move this thread?

Yes if you use the "Flag Bad Post" button he will get notified, otherwise he has to go post by post to see this...

This article has been dead for over three months: Start a new discussion instead
Start New Discussion
Tags Related to this Article