Jump to content
  • Advertisement
Sign in to follow this  
  • entries
    686
  • comments
    1952
  • views
    387441

Stompy's lil scripting engine...

Sign in to follow this  
Stompy9999

77 views

I started work today on a scripting engine for my game, something I have never attempted before. So far it has been running quite smoothly, and I got a game flags system running. Although the only flag I have running through scripts is the toggle for fullscreen mode.

Scripting is something I've always been nervous about attempting. I didn't really know where exactly to start. I drew inspiration from two sources (because inspiration is such a better word than saying I copied the code). The first inspiration was Rob Loach's Lucid engine, which if you read his journal you would know about it. The second was looking at the Half-Life 2 code, and seeing how they handled variables loaded from file.

First of all on this subject, I want to point out that I absolutely love the STL. It has helped me immensely on this project even before I started the scripting engine. Now, I'm running my scripts through STL map containers, which is an idea I got from Rob Loach's Lucid engine.

So basically it just reads the variables from files, and I can now read them with string keys.

Well, this scripting will ofcourse lead to a GUI system, which I'm going to start soon.
Sign in to follow this  


6 Comments


Recommended Comments

Quote:
First of all on this subject, I want to point out that I absolutely love the STL.


Then you will kill for boost. [smile]

In all seriousness, boost is an amazing library. In my opinion it is nothing short of an unofficial extension for the SC++L.

You should really give it a shot some time (assuming you haven't already).

Share this comment


Link to comment
I just thought I'd let you know that looking at the code from Blocky has convinced me that vectors and other STL things are the way to go.

I'm looking forward to seeing your new project!

Share this comment


Link to comment
I only started using the STL a short time ago, but now it helps me in all my programming endevours. I'd definetly recommend using it in any C++ project.

Share this comment


Link to comment
I'm slightly embarrased to admit it, but I only started using the STL extensively myself a relatively short time ago (about 8 months I guess). I blame it on the fact that I picked up C a long time ago and simply developed a bunch of C habits that I carried into C++. I also started my C++ with MFC (eurgh!) so I had CString and never looked much at std::string. After the umpteenth stupid bug with not delete[]ing an array, I slapped a vector in to whatever it was I was working on, and haven't looked back.

I'm still scared of boost, though [grin]

Share this comment


Link to comment
I first started using STL when I was working on Stompy the game with 1D productions.

When I wrote the origional code for the game, we were getting a whole bunch of access violations because of our fixed size arrays. Finally I slapped an std::list on the project and I was good to go.[smile]

Share this comment


Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • 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!