Reason Engine (WIP)

Community Forums/Showcase/Reason Engine (WIP)

SystemError51(Posted 2012) [#1]


What is it?

The REASON Engine is, first and foremost, the underlying foundation that is going to power my game, "Orion's Gate". It takes place in a future not too far from now and is supposed to be a MMO-RTS.

It is a pure OpenGL-based engine, written in entirely in BlitzMax.

What can I find here?

This post is going to be amended and updated as major changes make it into the engine, for which there also is visual proof - such as screenshots, and/or videos of features in action.

------------------------------------------------------

Current state (May 21, 2012)

User Interface
Initial code for YUI, the Yui User Interface, has been implemented. It's a 2D-based approach to manage windows, and thus information concerning everything in the game world. Windows can be moved freely, as you would expect.


Click to embiggen

When a window is minimized, a window is represented in a small tile, with an icon representing the action of the window. Tiles can freely be moved, or can be attached to a screen edge (I call this TileCling). Apart from this, a window can be also be closed directly from a tile.


Click to embiggen

Reveal provides a birds-eye view of all open windows, the player can pick the desired window, which will promote the window to the front.


Click to embiggen

SpaceTime brings virtual desktops to the game world, allowing for high flexibility to organize in-game content and information. Windows can be moved freely to other spaces, players can switch between spaces at will. A window can also be moved to the next or previous space from its Tile when minimized.


Click to embiggen

YUI is theme-able by players. A theme consists of a certain amount of image files plus a text file. The text file defines colors and gradients for a large variety of UI-elements.

Game generics
Fonts of any kind can be rendered to the screen, at any location, in a desired style and color. Fonts can also be given a shadow. Both, the font as well as the shadow, can have separate colors as well as different transparency settings. Fonts are stored as textures on the graphic card to make rendering extremely fast.

Video DevBlog



------------------------------------------------------

Earlier states

May 1, 2012

Watch Video DevBlog for this state

* Naming-based entity system
* Built-in texture catalog that stores your textures
* Built-in model management
* Textures added are automatically mip-mapped
* Unlimited textures
* Unlimited models
* Unlimited soft-lights (8 hardware lights, as usual)
* Up to 16 cameras, one can switch between them at run-time
* Automatic shadow generation for lights
* Shadows bend around arbitrary geometry
* Adjustable shadow quality, even at run-time
* Built-in Frustum Culling to ensure rendering speed
* Built-in W-A-S-D movement, can be enabled with one line
* Built-in 2D emulation for elements such as images
* Built-in management of 2D elements

Last edited 2012


stayne(Posted 2012) [#2]
Any plans for mesh self-shadowing? I'm pretty sure that is standard stuff these days. What can your engine do that other similar OGL engines can't?


SystemError51(Posted 2012) [#3]
I'm planning to implement a UI (which I really do need), as well as audio management (sound coming from left or right etc).

So it'll do a bit more than just displaying meshes.


Noobody(Posted 2012) [#4]
Why would you use strings to identify meshes? I mean, it's inefficient and error prone.
What if accidentally two meshes end up with the same name? What if naming a mesh simply doesn't make sense (i.e. when creating a few hundred grass meshes)? How to determine whether a string is actually a valid mesh? What if you accidentally modify your mesh handle? etc. etc.

It just requires a lot of unnecessary boilerplate code and has the exact same pitfalls as an ID/int handle system, namely that you can accidentally modify a handle, don't know whether a handle you have is still valid without additional function calls, etc.

I mean, I don't want to critizice too harshly (and I would understand if this was for B3D only), but for a BMax engine an OOP interface or at least passing around engine object references and not strings would be expected - at least on my part. It makes code using the engine more compact, easier to understand, and actually typesafe.


SystemError51(Posted 2012) [#5]
There is a failsafe in place that prevents duplicate names for an object. However it is perfectly safe to have two identical names in different contexts, such as a model can be named "Ben", where as a light can also be named "Ben". However if a light "Ben" exists, and you to create another one with the same name, that won't work. This way I'm avoiding pitfalls.

The names are stored in an array of models that handles everything for you. Same for lights, textures, etc.

I don't want to change that because it works well right now.


SystemError51(Posted 2012) [#6]
Just a minor update on this since it is in the works.

First steps toward implementing my own UI written from scratch, called YUI - Yui User Interface.

It's part of the engine and effectively enables any sort of interaction with your game world you can think of. It's skinnable and can change themes on the fly. I'll demo it later on when it's ready to show.

// EDIT

I should mention that the UI is entirely OpenGL based, not using any of Max2D's commands.



Last edited 2012


SystemError51(Posted 2012) [#7]
Updated initial post with current progress (May 21/05/12)

I will be updating the initial post from here on out when things change. I'll only bump it with a reply like this one.


matibee(Posted 2012) [#8]
I'm not sure about the font texture being split up into characters. I always kept them as one texture to avoid excess texture swapping which was always advised against (certainly 10 years ago it was ;)

This also has the advantage that a string of text could be cached into a vertex buffer and drawn in one call, no matter how many characters there are.

Keep up the good work though.

I pretty much watched all your video as we ate. "Clusterf*ck" almost made me choke an my pie :D


AltanilConard(Posted 2012) [#9]
Hi, looks nice!
Side question: why did you make your own 3d engine, instead of something like MiniB3D?
Does the engine mainly concern rendering, or also AI and logic?


SystemError51(Posted 2012) [#10]
Hi matibee, Altanil, thanks! :)

To answer the question, I would have continue to use MiniB3D, but there were certain things missing, most prominently so, are shadows. I tried to implement those, I also tried to use the extended version which has stencil shadows. Stencils didn't work out either with my animations for some models.

So I looked into the possibility to make my own... and where it stands, well you have seen that :)

The engine concerns rendering, AI (at some later stage for NPCs), logic such as pathfinding, as well as sound being played. But also the UI, which is going to be a very integral part.


Steve Elliott(Posted 2012) [#11]
All the best with this SystemError51. I've often looked to make my own engine, but always tempted away with current engines lol. Good luck.


Captain Wicker (crazy hillbilly)(Posted 2012) [#12]
@SystemError51:
When will it be finished? How much is it going to cost?
Like the looks of things so far! :D


SystemError51(Posted 2012) [#13]
Hi Captain, thanks :) I'm not set on any pricing yet, although I have a good idea. It'll be in a price-range that I hope is fair for everyone. There's going to be two commercial editions, and one free edition.

The most difficult parts of the engine are done, I'm now implementing the API such as all UI elements. After that I'll do some finishing touches on the 3D, then some logic, and sound handling. I want the engine to be a complete thing.

I don't know yet when it'll be finished... but I'm making good progress :)

Hi Steve, also thanks :)