My Scripting Engine

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • My Scripting Engine

      I'm making a game (it will be a card game), and I just finished the backbone of it: a scripting engine. I'm looking for testers to beat the hell out of it and give me their thoughts. Interested? Email me

      This is not an open invitation: I'm only looking for members of this website, not people who happened to come across this post through Google or something. Likewise, obviously to participate you have to agree not to use what I send you to harm me or my will-be company, which includes using my work without permission. I trust you guys, though.
      -Larrik Jaerico

      www.LarrikJ.com
    • RE: My Scripting Engine

      A scripting engine, huh? Why not use LUA or Python or something like that? Not that I'm anyone to ask - I've always written my own too...
      Mr.Mike
      Author, Programmer, Brewer, Patriot
    • RE: My Scripting Engine

      1) Experience (I'm a student, after all)
      2) I wanted something that I could easily teach to non-programmers
      3) I didn't want to deal with jamming somebody else's engine into my project
      4) I just wanted to

      The engine is for an online card game I'm making with a friend. I'm actually ahead of schedule, which is surprising since I have 6 classes this semester (currently with perfect grades in the classes I've gotten grades in so far) and a job. The scripting engine will allow other people to help write card scripts without me giving them source code access (My original design also included the possibility of allowing other people / companies to create entire content sets on my engine. My partner doesn't really like the idea, so its on the backburner for now).

      I could use open source this or that...but eh. I am using SDL and probably an undecided windowing library for it, but other than that and the database I'll use, I'm probably going to have all proprietary stuff.

      Your book mentions Lex, and so did another friend of mine, but by the time I figured out what it actually does (I'm still a bit unsure), I was already pretty far on it.

      Even if I don't use the engine (which I definately will), creating it taught me a lot about handing large scale projects that school doesn't teach me. I use return codes, I have output parameters (yeah, a lot of it is in fact inspired by the Win32 API...don't tell anyone, especially not my Linux or FreeBSD friends), and I had to figure out a way to get my script's standard library functions to work with function pointers. In fact, the remainder of the features I need to complete on the engine are pretty much all just library functions.

      Am I babbling yet? I had a long day...sometimes I wonder if I share too much
      -Larrik Jaerico

      www.LarrikJ.com

      The post was edited 1 time, last by Larrik ().

    • Lex and Yacc are for building your grammar. Grab a copy of Constructing Language Processors for Little Languages - it's not the Dragon Book, but it is a pretty thorough coverage on compilers/interpreters. Also, Premier's Game Dev series has Game Scripting Mastery that walks you through an entire game scripting system in under 1000 pages. I don't think that one uses either Lex or Yacc if I recall correctly....

      LUA, Ruby and Python are all easy to plug in to a game and all have plenty to offer. Additionally, you could have plugged Java into your game! Imagine writing an entire engine in C++ that's completely Java-driven. Java is powerful enough - and with a C++ back end to drive the media - whew!

      Rich
      "Your job is not to die for your country. Your job is to make some other poor sod die for his."

      The post was edited 1 time, last by Nebuchadnezzar ().

    • Ah, yeah - forgot you said that....

      I'm going to head that direction myself shortly. Did you go OO with your scripting language? That adds a bit of complexity to your interpreter/compiler as you can well imagine and I'm thinking it would be tough to come up with a better solution than C++'s vtable for resolving inherited/overridden members/methods.... Too bad.

      If you need more testing let me know - I don't have tons of free time, but I'm interested in breaking things....

      Rich
      "Your job is not to die for your country. Your job is to make some other poor sod die for his."