The Game Engine

General gameplay ideas that don't fit into other categories go here.
Post Reply
Game Developer
Posts: 198
Joined: Sun May 29, 2011 2:34 pm

The Game Engine

Post by NiteHawk » Thu Aug 09, 2012 5:07 pm

As you know, I am using XNA 4.0.

I actually went and spent a few bucks on a Sunburn Game Engine 2.0, which is a pretty awesome game engine I've been playing with for a couple months (Using the basic framework as a test).

Another great thing about it is there is a plugin for it called the 'Indiefreaks Game Framework', which adds some neat things, including the BEPUPhysics physics engine and the Mercury Particle Engine (The particle engine I was speaking about). Overall it is a nice base to work on.

They give a simple example on using Sprites (2D graphics) and it simple looks amazing. It pretty much has a similar feel to how 3D would work, adding lighting, shadows, effects, and more. ... 5YU8LYcQvE

It is competely created depending on the sprites you use>

Hi, the shadows are full 3D shadow mapping and calculated using information extrapolated from the 2D sprites.

The sprites themselves are standard 2D sprites (diffuse maps) - height maps and other 3D-ish data is *NOT* necessary for the shadows. ;)
Rad, right?

Would be a full example of a full 3D if we would go that route, because it is super simple to add 3D models to it, since Sunburn handles most of that. But not needed. If you look at the first simple 2D one, you will see how awesome it can actually look with sprites, (And that is only a 1 hour or so of actual work to get that, so even though it looks kinda laggy when walking, it was only meant to show the way things work with 2D sprites.)

So once I am home and school is done after aug, I am going to start planning out the framework of the game and seeing what should be done first.

Game Developer
Posts: 198
Joined: Sun May 29, 2011 2:34 pm

Re: The Game Engine

Post by NiteHawk » Wed Aug 15, 2012 2:50 am

Been looking at it more and more, some sort of 3D might be a nice touch. Sunburn Engine supports a ton of different model types as it is, including some types done in google sketch, etc.

This is a sample I was working on in the editor. Mind you, the scene editor is for static content, when I get it fully going there won't be an editor.. That or I will figure out how to do an in game editor similar to this one for simplicity for everyones sake. I just show off some things.

The ship actually moves and rotates, but since I was in editor mode, never did show that, but it's just a quick example.

There aren't any stars yet, but its a possibility. Planning on making them dynamic with the Particle Engine. ... ature=plcp

Watch at 480, unfort the high def didn't work there, but oh well. ;)

P.S. I know the sun is shit looking, that would be fixed.

Game Developer
Posts: 198
Joined: Sun May 29, 2011 2:34 pm

Re: The Game Engine

Post by NiteHawk » Wed Aug 15, 2012 12:45 pm

MPE is already integrated but needs some tweaks. Overall though made a simple way for a general thrust (The thrust can be changed in the future obviously!)

The general formula of displaying the formula is:
Holding down up button = fullthrust (1.0f)
Moving greater then 5.0f and not holding down button = 0.6f * (MaxSpeed/CurrentSpeed)
Else no thrust.

So in English, when holding down the thrust button and accelerating, you will always have a full speed particle effect. When you release the button and you still have acceleration, cut the particle effect speed by 60% to start, and gradually reduce the speed of the particle depending on your current speed. When you use afterburners, in the future, I presume we can EXTEND the particle effect, maybe 25-40% longer. I intend to make the ship roll slightly when you turn, so it feels more realistic!

The game currently runs at 30FPS, but I will be ensuring that it works at any range between from 16 to 60 FPS if I ever want to change it without breaking the game.

Question, does anyone have any good models for planets and suns? I believe sandtrooper used to have planet models, that might come in handy if someone could reach him for me about it.

Though all this was fun, it give me a good base now. I however need to start making it so people can actually code and customize the game which is the big part of it. I am trying to figure out the best method there. So that is the next thing.

Heres the jist:

-1. Find out a way to dynamically add load content to the game. (Images, Models, Particle Effects, etc). XML files might be a good start since you can create an easy to use editor in this case when I get time to doing it.

-2. Find out a way to make a scene and define the scene. A scene would be a region of space, mainly a solar system in our game. This includes:
--A. Defining the scene itself. I think we should have base settings for HDR/Fog, but they should be able to define the fog itself (Color, amount, etc), background stars, etc. We could always define the HDR/Fog though just for show if anyone can ever use it, but while i was playing with it I find that it's very touchy, and if you define to high everything will bloom out of control and blind you. Maybe just some settings, like darkness and cinematic, fog depth, etc.
--B. Defining the actual fog planes. In the one I am using, there are actually two fog planes rotating. They are NOT required, but they give a nice touch. They could be used for nebula and such however if you position them above the player ship and make them transparent.
--C. Ambient lights. The general ambient light is white and ensures the game is lit up regardless of other lighting effects, but you can make it very dim or very bright, and even a different ambient light color.

-3. Adding planets, suns, and asteroids. Having base defines for them, (Color overrides, the texture to use, position, spin, rotation speed, rotation base (if any)). All planets, suns, and asteroids should have a lighting base. This means that you can decide if a sun or planet gives off a light, how far, the strength, the falloff, etc. Planets might have a very low lighting compared to suns, but it could give them a nice effect. In terms of OZONE layers, I am unsure of that yet, I think you would define that in the model itself though. I believe HDR and that would work very nicely though.

-4.. Defining ships. Player will be set to use a default ship in the first slot until I define ranks, player stats, etc. Though I want to be able to at least define the initial ship to start. Currently there is not much though. The general sum so far is:
--A. Defining the ship model, and lighting effects.
--B. Defining the base max speed, acceleration, rotation, and other velocity controls.
--C. Defining the thrust particle effect positions, maybe we want more then one. (Max 5-8?)

5. There are no modules yet, but I want to at least add the base for modules, and the speed module. The actual module should effect the thrust particle effect of the ship, so you can have different thrusts.
--A. Base module variables, should we add mass? Does mass effect the acceleration and rotation of the ship?.. Are modules locked by size or a group type, or similar to SF in where if you have the volume in your ship, you can fit it?..
--B. For thrust, defining the thrust boost it gives. Should it be percentage based? Should it be base stats for balance reasons? Percentage base would be tough unless you add a group type as well, I would think. If we do not use groups, you would base it off a general acceleration, rotation, and maxspeed, etc..
--C. Defining the thrust particle effect. For ships, this should change the particle effect being spit out in the locations we defined on the ship.

6. Particle effects are easy to load but need to be defined in a certain order. Figure out a way to have it so you can define it in ANY order. (Order being the design order).

7. Scripting. I should start this early, or figure out how I want to do this after I do the above. The general idea is that players can also SCRIPT to enhance the game if they know how to script. This could include different game modes, different things ship do, defining AI behavior, etc. My goal is to try to add Modules to start to be 'allow' to scripted through plugins, so we'll start with trying the 'module plugin' for the game.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest