Gaming News, Game Reviews, Game Trailers, Tech News

dtoid   |   japanator   |   flixist   |   tomopop   |   store

doctor insidious blog header photo
doctor insidious
Posts 0Blogs 23Following 12Followers 10


On Destructoid:
Most Comments

more notable stories


Who updates the homepage?
Our Staff
What is Destructoid?
Long story
Can I submit a story?
Dark theme?
Site rules?
Douche lightly
Ethics much?
Read this
Common sense
Who owns my posts?
You do

Get in touch

Editorial contacts
Meet our staff
Ask a question
Get support
Story idea?
Everything else
Get in touch


Designing a game engine, part 1.5 (short blog)

*Note, I am writing this blog in haste because I have a lot of stuff to do I have school tomorrow so please excuse all run-on sentences. That was a joke, but seriously, I didn't have time to really proof this too well.

Well, I think most of the seven of you who remember last blog post recall that I was programming a game engine using the GNU library guile, which basically is a Scheme interpreter for C code. Well, unfortunately guile is not reentrant, meaning it can't handle multiple threads. What are threads? Threading is a concept in which allows multiple processes to be handled at the same time. This is critical for game engines, because a good game engine has to handle both user input and drawing stuff on the screen at the same time. This forced myself to write my own interpreted engine from scratch. I started yesterday, and finished today (aside from missing primitives the most important being "if"), and thought I'd show you guys the result. Note: PLEASE DEAR GOD DON'T MODEL YOUR LANGUAGE AFTER MINE. Not because of copyright or anything, but because you wont have good time trying to use it.
This is a number, return that number.
Simple enough, right? Well, it gets more complicated...
*1 4 5
This is a primitive followed by some numbers. This primitive, *1, adds the 2 numbers in front of it. To add multiple numbers, one must do something like:
*1 *1 5 5 5
This returns 15. Other useful primitives include *0: '=', *2: subtract, *3: multiply and *4: divide. One who has taken geometry at one point can compare primitives to postulates.
*0 @1 5
This assigns the '5' to the 1 place in the variable stack. Notice how I don't say the "first place" in the variable stack. That would be 0.
*1 @1 3
This is equal to eight.
[2 *1 6 7]
This defines the procedure '2'. Most of you will probably think: didn't he mean to write "functions"? No, there's a difference in my language. Functions take arguments, procedures do not. You can not pass arguments in my language. There's a reason for this, but it's more like an excuse.
Calls the procedure 2 and returns 13.
*1 *3 $2 @1 5
Returns 70
Well, that's pretty much it. I just finished so I thought it would be cool to show you. I remember you all got a kick out of the (x86?) Assembly I showed you, so I thought I'd make the language as annoying as possible to express. Finally, the game engine will be called: The Berry Engine, named after my good friend TheRedPepperofDoom, who's birthday is tomorrow. Happy birthday!
#Community    #Indie   
Login to vote this up!


doctor insidious   



Please login (or) make a quick account (free)
to view and post comments.

 Login with Twitter

 Login with Dtoid

Three day old threads are only visible to verified humans - this helps our small community management team stay on top of spam

Sorry for the extra step!


About doctor insidiousone of us since 5:40 PM on 02.16.2009

Hi, my name is Matt, but you can call me doctor insidious, because that is much more awesome.
My top ten games:
9. Sam and Max
8. Gears 2
7. Tap Tap Revenge
6. We <3 Katamari
5. Castle Crashers
4. Persona 3
3. Braid
2. Crayon Physics
1. Cave Story

I am one of the few people who actually know how to program in this world. And by program I mean know how to use pointers.

#include <stdio.h>

#define COCKS 0

int main (int argc, char **argv)
printf("Hi I'm doctor insidious\n"
"This is the most useless program I have ever seen\n");
return COCKS;

Read Huge: Top Stories