Sunday, November 29, 2009

The Z4R Project

So, I'd like to clearly establish what the Z4R Project is.
As it is now, it's just video games I make.

In the future, it will be a game creation suite. I'm not aiming for anything too fancy, right now I'm aiming for functional and streamlined. I'll work from there. The basic idea of the suite is that the code-base is built entirely on components, which will make it very dynamic and easy to update and distribute.
The goal of this engine is to create a powerful tool for me, co-workers, and anyone else who wants to use it, use. It will be entirely open-source, meaning free, to be distributed under the GNU.

Now, if you're interested in the specifics, read on. If not, I recommend you go get a nice cup of coffee or tea; whichever you prefer.


At the heart of this suite, are three main concepts:
  • Engine
  • Tools
  • Add-ons
All of these come together to give you what you want: The game.

First off, I'll talk about the engine. The engine is just a huge clunk of code, made from SFML and OpenGL, to provide extra functionality and set up the functional structure of the engine. That is just about as far as it goes. The end user will never need to deal with the engine itself, although they may if they wish. The engine itself gets all of it's game-specific functionality from user-created external libraries referenced to upon runtime.

Next up are the tools. "Z4R CS1", as I wish I could call it, is the big heavy, bulky, nasty, confusing, complicated pure text-based editor you'll be working with the entire time you're developing your game.
Oh, wait... No... It's not.
You'll be using a feature-rich environment that heavily relies on the idea that WYSIWYG. It draws it's base from the Game Maker game creation program. With that, the actual tool itself will contain an entirely virtual directory, not actually in your hard drive, of content for your project. The content will be separated into multiple categories, those being: Image, Sprites, SoundBuffers, Sounds themselves, Code, a subset of Code; Game Objects, Motion Paths, and finally, Rooms.

You're probably wondering what's with the "Images, Sprites", and the "SoundBuffers, Sounds" shindig. Well, it's very simple. Images are the precise data of the image, and sprites contain data like position, rotational coordinates, and all of the such. A similar principal applies to SoundBuffers and Sounds. This structure goes back to the SFML code.

Code is the actual code of your game, not much going on there. Here you define what goes on during the logic processing, drawing phase, game initiation, et cetera.

Game Objects: This is a huge one. A big feature of my core framework is the Game Objects. Game objects are based entirely off of the objects from Game Maker, but unlike Game Maker, these objects are much more dynamic and flexible. They contain code to very easily interface with the system and get things rolling. Subsets of game objects are Actors, which is designed to consist of players, enemies, etc throughout your game, as well as Backgrounds, which can also be tilesets. These link into the Rooms functionality, which I will explain later.

Our next contender today: Motion paths! The idea behind this is simple. You use that mousey-thingey to make lines. You tell your in-game Actors to follow these lines that you've made, and they do! Viola! Bezier curves, looping, and lots of small specifications are designed to be possible.

Now, the rooms!
Rooms are a fun thing. They make it easy to set up environments in your game. The downside? They fragment your game objects horribly. The up side? These don't. The only things that will change when you switch rooms are Game Objects that inheiret from the abstract class "GameObjectRoomEntity", which is an object that will only live in the room it's created in.(NOTE: in the object's properties this can be disabled) Actors and Backgrounds are among these Game Objects.
The room editor itself provides simple functionality to organize Actors, Backgrounds, or whatever other Game Object you might want to put in there when the room is entered.

That's the bulk of it! Tired of reading? That's okay. If you are, go refill your cup, and come back later, I don't mind. Or if you're totally disinterested, I understand. If you're not, please keep reading on!

Now. All of this sounds nice, right? A fun little thing to organize crap for me. Gee, that sounds like XCode... And Visual C++... And Code::Blocks... And basically every programming IDE out there.

Hahah! Do not fear. As you might have noticed, I mentioned a room editor, yes, editor. There's an editor for everything!(there's an app for that)
Images come with their own built-in image editor, as well as a code editor, motion path editor, and the aforementioned room editor. There will be no built in sound editor, sadly. Read on.


This brings me to my final concept of the engine, the Add-Ons. Add-Ons are not just simple plugins, although they may be if you wish, they are extended functionality to the suite. I'll use my planned "Achievement" system as an example.(think Xbox Live, or PSN trophies)

Here's Billy. We love Billy. Why? Because Billy loves using the Z4R engine to make his games! Yaaaay!
Okay Billy, so how's your game coming along?
*Billy signals a thumbs-up*
How're those achievements coming? You know those raving fans love something to achieve!
*Billys shakes his head downward in dismay, and taps his foot slightly on the floor*
Ohhh, that's alright Billy! See that button over there? It'll take you to the "Add-On" page.
*Billy pulls his head up and lifts an eyebrow, going over and clicking the button*
See that? Easy! The panel there shows you all the available Add-Ons you have installed. Go ahead and click "Install Add-On", Billy!
*Billys installs the Achievement Add-On*
Great one! Splendid! Now Billy, see over there with all your other resources? Your Sprites, Code, Rooms, and all that? Look below. There's a folder there for Achievements!
*Billy looks up in surprise*
Ohhh, yes yes! It doesn't end there though! Try adding a resource to the folder.
*Billy does so, and sees an unfamiliar resource created*
There you have it! See, this Add-On even had it's own editor to customize it however you wish! It should be easy game from here on, Billy!
*Billy, gleeful and witty, shakes the narrator's hand, and fade to black.*

Ohhh, so wonderful. There's nothing like a job well done!
That's the basic rundown of the Add-On structure. Add-Ons can, if you so wish, have their own place in the resource pane, and you can even create editors to customize these resources however you wish. A bit of flat codework might be necessary to get these systems working, but the general idea is that it makes it a lot easier.
Now, remember how the sound has no default editor? Along with that Add-On system, the suite is also very dynamic. From the preferences menu of the suite, you can set your own resource editor. Including for Images, Sounds, and Code! Room and Add-On specific resources are also possible, but you have to be wary on this one. The room editor has it's own unique filetype, and Add-On specifications are bound to be completely arbitrary. Default might be a good idea on those.

Now, that is all!
A long and possibly unnecessary summary of my engine. I apologize greatly for grammatical or spelling errors, as it was quite a lot to write up. Although I hope this post accomplishes it's general goal, being to inform you and hopefully excite you about my Z4R Project.

Have a nice day!

No comments:

Post a Comment