Sign in to follow this  
  • entries
    298
  • comments
    1135
  • views
    231358

One of *those* weeks..

Sign in to follow this  
HopeDagger

156 views

Arg!

Lost my Sociology notebook, lost my Linear Algebra textbook ($100+!), accidentally deleted my \Data folder (with all graphics, sounds, etc) for Membrane Massacre, and am behind on my algebra assignment (which I have no textbook to use to finish it!). Arrr. [sad]

I'll live. Just need to vent. :)



Game Scribe

Extremely bad name pending. A big thanks to Eliwood for some of the initial documentation and inspiration.

In a nutshell, I got the cool idea of having a scripting language that could be easily integrated for use in games. Something simple, but yet sufficiently powerful. The main reason I never tried embedding Python or Lua or {Language X} is because embedding it to work with your C++ code is a pain in the arse. So how about writing a reasonably powerful language that could fit into your game with minimal pain? Sounds great. Let's do it.

Since writing a programming language tends to be on the 'difficult' side of things, I opted to use a rather simple, Lisp-like programming language as a base: Scheme. It's a function programming language that I've grown rather fond of during the last term at university. The rules of interpretation are pretty clearly and cleanly defined, so I jumped on it.

Several hours of casual tinkering later, lexical analysis was complete, token tree construction was a-go, function calling (built-in functions only, currently) was in, and variables were done. Less than 10 hours of work, and a semi-working language was born. Here's a little chunk of my interactive program:



(Apparently this is the sort of stuff we do in the 3rd-year Compiler course -- woot. [grin])



Next up is user-defined functions and conditionals. I want to bring a fibonacci function alive! [grin]

Anyways, very exciting stuff. This kind of work really gets me going, so there's a handful of later-year courses offered here that I'll probably get a huge kick out of. [smile]
Sign in to follow this  


7 Comments


Recommended Comments

Slick; you got way farther with Scheme than I did with my Lisp-like. I'll have to dust off the code some time and pursue you in a programming arms race.

Sucks to lose your assets, dude. I hope you move to Subversion, or start making more regular backups. Can you salvage at least some of the assets from old backups/old versions of the game?

Share this comment


Link to comment
Bad news about your data folder. Can't you download MM off the showcase and extract some of the resources back out of the release files?

Funny about your scripting - I was reading Sir Sapo's journal yesterday about the scripting in Angels 22 and decided it was time to implement scripting in Udo, then I come to your journal and you're working on a scripting language. Weird.

My plan is to have a virtual machine embedded into Udo that runs like virtual assembly style instructions. I can write "binary" scripts for the vm with my virtual assembler for now then when I can be arsed I can write a seperate command line compiler to turn a more "C-like" language into this "binary" format later on as a seperate project.

Mightly impressed with your LISP approach though. I know nothing of LISP. Is all that math expression stuff in RPN?

Share this comment


Link to comment
Urgh. Sucks when that happens.

Backups are definitely good. I've gotten a bit paranoid about that lately. I've got backup zips, a seperate removable HDD with replicated dev directory and a gmail account I'm using as an online backup.

Can't hurt I guess.

Share this comment


Link to comment
Quote:
Sucks to lose your assets, dude. I hope you move to Subversion, or start making more regular backups. Can you salvage at least some of the assets from old backups/old versions of the game?

Quote:
Its a good thing you backed up all your MM stuff right...... RIGHT!?!?!?

Quote:
Bad news about your data folder. Can't you download MM off the showcase and extract some of the resources back out of the release files?


Ironically it occurs in the only stretch of time that I haven't been backing up. I may be able to recover the files yet, though. I did send Draffurd a very recent copy with all of the data.

Quote:
Funny about your scripting - I was reading Sir Sapo's journal yesterday about the scripting in Angels 22 and decided it was time to implement scripting in Udo, then I come to your journal and you're working on a scripting language. Weird.


Aye. I thought the same thing, and suddenly felt unoriginal after I read Sapo's journal and yours. Can't beat the new fad! [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