Quantcast
Community Discussion: Blog by doctor insidious | Designing a game engine, part 1.5 (short blog)Destructoid
Designing a game engine, part 1.5 (short blog) - Destructoid






click to hide banner header
About
Hi, my name is Matt, but you can call me doctor insidious, because that is much more awesome.
My top ten games:
10. SBCG4AP
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;
}
Player Profile
Follow me:
doctor insidious's sites
Badges
Following (12)  


*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.
5
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.
$2
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!



Is this blog awesome? Vote it up!




Those who have come:



Comments not appearing? Anti-virus apps like Avast or some browser extensions can cause this.
Easy fix: Add   [*].disqus.com   to your software's white list. Tada! Happy comments time again.

Did you know? You can now get daily or weekly email notifications when humans reply to your comments.


Back to Top




All content is yours to recycle through our Creative Commons License permitting non-commercial sharing requiring attribution. Our communities are obsessed with videoGames, movies, anime, and toys.

Living the dream since March 16, 2006

Advertising on destructoid is available: Please contact them to learn more