Jump to content
  • Advertisement
Sign in to follow this  
BloodLust666

Scripting system

This topic is 4845 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm using C++ and i was wondering if there are any tutorials on scripting or if someone can give me a few poingers? I'm planning on using it for my AI, i basically just want to be able to set a specific action and for a specific amount of time and have a pointer to the next action until there are none left.

Share this post


Link to post
Share on other sites
Advertisement
Any particular reason you want to write your own scripting system?

My recommendation would be an event scheduler that triggers scripts after a predetermined length of time. I wrote an article about my own event scheduler here.

Share this post


Link to post
Share on other sites
well, i don't really like to rely on things someone else made unless it was a team member or someone making it with me, i like to be all orginal so incase something gets big people can't say that i used someone else's stuff to get where I am; kinda how to look at everything, wanting to do things all myself. plus i believe in the saying "if you want something done right, just do it yourself". lol sry it turned into a speach :-P.

Alright thanks, i'll check out ur article as well :)

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
If you're doing that as a learning process that's fine, but as a commercial decision your courting disaster.

The holy grail of the games industry at the moment is making as much use out of a piece of code as possible. It takes time and money to develop a game and it's component systems. If you throw away that investment each time, your throwing away money. If you start off a game with 6 months of code already available to you (from whatever source) then that's a huge saving and may mean the project will actually make rather than lose money.

Additionally, a system that's being used and supported by a large number of users is potentially more reliable and robust than a system you put together yourself in a short period of time. After all, if it was buggy and unreliable then no-one would use it.

Even if you are learning, there are advantages to using existing code. It teaches you how to integrate other's code and it gives you some existing code you can learn from.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Quote:
Original post by EvilKnuckles666
well, i don't really like to rely on things someone else made unless it was a team member or someone making it with me


So you wrote your own C++ compiler then?

Seriously, use something such as Lua, Python, AngelScript, etc that already:-

a) has proven use in commercial environments
b) has an existing userbase to help you out
c) has existing documentation, books and tutorials

Otherwise you're just going to endlessly reinvent the wheel without getting anything done.

Share this post


Link to post
Share on other sites
I will have to agree with what others said, there really isn't a single good reason for you to create your own scripting engine, I'd say. Anything you'll come up with will probably take a lot of time to develop and still fall short of what you could get almost for free just by using an existing library.

If anyone really laughs at you because you used something like Lua, well, in that case you really shouldn't be bothered by them at all. Really, as long as you honor the license of the engine that you are going to use, I don't see how anyone could ever complain about this. I didn't hear anyone complain that commercial games take the easy way out by using libraries..

Otherwise, if you really just want to use a very simple system for queueing up some actions, I guess you really don't need a full-blown scripting system and might opt to implement something yourself for that. Sure, it won't be as sophisticated, but it may work just fine for a small project.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!