PDA

View Full Version : CodeDojo Stuffs?



Volte6
06-19-2006, 04:22 PM
Hey Seth, any chance of adding to code dojo?

One thing I'd really like to see is and explanation of how you setup your scripting for Dink.

Seth
06-20-2006, 10:32 PM
I've been meaning to add to it, here are some things I'm thinking about doing:

* article on using automated building environments on three platforms at once
* put up a source package for the PHP quote rating system I wrote for codedojo a while back
* add the latest LD48 game+source

For the Dink scripting.. uh.. it's such crap I'd rather pretend I didn't write it, but I could do a nice one on using LUA maybe.

jjohn
06-21-2006, 03:42 PM
With all the open source programs out there, it seems silly to write another scripting language just for a game. Python is a pretty reasonable choice for embedding into a game. Civ4 did this.

Lua seems like an OK language, but I think Python's community is larger. Perl's is definitely larger, but I don't think Perl is a good fit on win32 platforms, since the threading/forking gets wonky in long running programs.

Things to think about.

06-22-2006, 03:56 PM
Haha everyone always says to use an existing cure http://www.rtsoft.com/iB_html/non-cgi/emoticons/smile.gif

I'd like to know how to do it ;) Even if just some general tips on it. I'd also like to know how to program games, not just use a game builder.

Seth
06-25-2006, 06:41 AM
Python is very good too, I had to embed it into a flight simulator once and it worked ok. Personally though I just can't stand the formatting and indentation rules, I probably wouldn't mind if I wasn't constantly switching between script and normal C++.

LUA + LuaBind is a very slick package, and I've hacked it to be a tiny bit more like C++, for instance, supporting // comments. Also, it can pretty easily be setup to give each entity a sandboxed area to use, while still allowing globals. It's built around the idea of being embedded from the start is very well suited for a game.

Volte6, writing a scripting language or two is a lot of fun, I'd say go for it. Might be best to start simple, for example, I wrote a very simple one for a cellphone game (Stargate SG-1) it worked a lot like Dink's, it just reads a text file, breaks it down into lines, then breaks the lines down into words and studies them to figure out what to do.

Easy and fits in only a few KB!

If you want more power, you've gotta get into some complicated parsing and stack type stuff. Some good tutorials on Gamedev.net for that I believe.