We're a community of 1.1M IT Pros here for help, advice, solutions, professional growth and fun. Join us!
1,080,629 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Start New Discussion Reply to this Discussion

Question regarding Script language usage in games.

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.

4
Contributors
3
Replies
1 Day
Discussion Span
1 Year Ago
Last Updated
4
Views
thanatos1
Light Poster
35 posts since Jul 2009
Reputation Points: 7
Solved Threads: 3
Skill Endorsements: 2

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.

Philippe.Lahaie
Posting Whiz
360 posts since Oct 2007
Reputation Points: 103
Solved Threads: 54
Skill Endorsements: 4

Can a moderator please move this thread?

jackbauer24
Posting Whiz in Training
244 posts since Oct 2011
Reputation Points: 21
Solved Threads: 3
Skill Endorsements: 0

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...

peter_budo
Code tags enforcer
Moderator
15,816 posts since Dec 2004
Reputation Points: 2,871
Solved Threads: 944
Skill Endorsements: 52

This article has been dead for over three months: Start a new discussion instead

Post: Markdown Syntax: Formatting Help
 
You
 
© 2013 DaniWeb® LLC
Page generated in 0.0699 seconds using 2.7MB