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

[ALPHA] Game-Engine - Map-based engine for games

Started by Geforce Fan, 17 February 2015 - 01:09 AM
Geforce Fan #1
Posted 17 February 2015 - 02:09 AM
Game-Engine

Compiling… failed.

(I'm typing this for what it will be, in parentheses is what it is now, if any different)
Game-Engine is a map-based engine for games in ComputerCraft. It uses a binary save format, along with a serialized table for things difficult to store in binary, to make map files incredibly tiny. Each pixel or tile has its own functions that are called when certain conditions are true. For example, you click a pixel and a menu pops up. Maps can be created using Gamedev, which edits maps, and allows you to open up a tile's code individually in an ingame or out of game editor. It also has other misc. functions, but I won't go over them all here.
(actually right now, for this beta, an old level editor fixed for the new format is included. I am currently working on Gamedev privately.)
The next part of game is the object system. You can create objects like players, or AIs that will render on top of the map. Players & AIs can be created using the map editor, and have a similar format.
(no, they're created in code right now, ais don't exist, and players are 1x1 pixels)
Furthermore, there is the Window system. This allows for easy creation of GUI elements onto the screen. Some elements, like buttons & check boxes, are handled through a table containing all of them, and a single function to check if they've been clicked, and print them to the screen. Others, like config boxes, are Object Oriented due to the fact there will be typically only one or two of them in existence simultaneously.
Lastly is the compiler. This allows you to declare argument types(string, number, table, etc.) when declaring a function, optionally writes to the console when you enter & leave functions, unlocalize all your variables, and can even show you every time a variable changes for easy debugging & making sure you don't get a table when you expect a string!
(broken, semi-functional)
This all comes together to make it easier than ever to create your own game for CC. It does not, however, do this completely by itself. You maintain complete control over your game, but when you, for example, want to move the player up, it's as easy as calling "player:moveUp()".

Install:
pastebin run 6JU1nY50 4 update
You can also check out my other stuff by running that without the args.
Github:
https://github.com/AI221/Game-engine
Wiki(documentation)
https://github.com/A...ame-engine/wiki

Please submit any bugs through github
Discuss in this topic, for things like suggestions, feedback, or help.
Edited on 19 March 2015 - 01:47 AM
Geforce Fan #2
Posted 25 February 2015 - 02:30 AM
I've posted an update(the wonder of github–I don't need to edit an installer at all)
I'm having trouble getting the compiler to work. You can see a lot of debug information in the log. The issue is that strNoCrap is getting totally jacked up and I have no idea why.
Edited on 25 February 2015 - 01:31 AM
Geforce Fan #3
Posted 19 March 2015 - 02:47 AM
Updated the installer pastebin. I've created a much better installer, it will install to whatever directory you're currently it, or at least should, except it won't because gitget doesn't like it.
:\
Edited on 19 March 2015 - 01:52 AM
Creator #4
Posted 31 March 2015 - 09:58 PM
This is really interesting.
Geforce Fan #5
Posted 31 March 2015 - 11:27 PM
Thanks. I have pretty good documentation on it on the wiki if you want to use it. I've been working on my OS a lot, I'll probably resume this soon.
There's a level editor in the Game-Engine directory, it's pretty dated thought, I'm recoding it.
I had to start somewhere, I made that before making the game-engine API.
Edited on 31 March 2015 - 09:31 PM