This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
grabie2's profile picture

Simple Game Engine

Started by grabie2, 23 January 2013 - 11:17 AM
grabie2 #1
Posted 23 January 2013 - 12:17 PM
Hello everyone!

Working only on netOS was very painful, so I decided to do something other. And I have for you simple, Object-oriented game engine.

For now It doesn't have much, but If you'll like it, I'll be adding mode stuff to that. For now there is basic Entity, MovableEntity and Game classes. I also have example for you, cause I don't feel like explaining all Object-oriented programming now.

Pastebin
SpoilerSimple Game Engine: http://pastebin.com/YGRR3zJv
pastebin get YGRR3zJv GE


Example code: http://pastebin.com/YGRR3zJv
pastebin get YGRR3zJv GEtest
What it does is:
- It creates class "Button" extending "GE.Entity"
- It creates instance of "Game"
- It creates instance of "Button" (testButton)
- It adds testButton to entity list in game object
- It runs the game

If you guys like it please post suggestions what to add to if. From me I have in mind mouse menu system for games.

Screenshots will be when there will be something to show ;)/>

Keep in mind that it's not my main project, I'll work on it only when I get crazy programming netOS, you know looking for that one line that messes up all your code and doesn't even error it self(today situation) ;)/>

Thanks for feedback !
mibac138 #2
Posted 24 January 2013 - 03:21 AM
Cool! :)/>