Pages

Friday, March 30, 2012

New Game

For the past couple days, I've been focusing most of what little time I have towards the UI for Ruined.
As you can tell by the title, I've made some significant progress on the "New Game" screen.
Quite simply this is where the player will type in his or her name to create a new save game.

The New Game screen with no name entered;
The bottom right key is the backspace, I just have't made an icon for it yet.

My name :P
As you can see I went with a simple design; however the grey you see in the background is actually a transparent black. I still haven't decided what to draw / render in the background. Maybe some waving grass or an ocean or something... IDK
Anyways, on a lesser note, I also made some more button images - Yay Inkscape


Friday, March 23, 2012

User Interface, Saving

So another week has gone by, where I have been incredibly preoccupied with school and life in general.
Luckily I managed to get some more coding in :p
Things accomplished:

  • Saving and loading!
  • Multiple save games, up to 3.
  • The intro Ruined screen, has been implemented*
  • The screen to select a save game has also been implemented*
  • A "MessageBox" for handling, well messages.
Yes, I know "Press Start" is not centered, I still need to make an image for the start button.

An early version of the save manager, showing two saves games.
* Neither of these screens have backgrounds yet. Both saves in save manager pic -above- are for testing purposes: one puts the engine in debug mode, the other returns an error to simulate a broken save.

So yes, saving and loading has been implemented. Save files are created byte by byte and, as such, currently only take up 80 bytes! Of course this will change, but I don't see the save-file size growing to over 500 bytes.

A save-file contains:
  • Save File Version
  • Player name
  • Play time (days, hours, minutes)
  • Money!
  • Max health and current health
  • Max magic and current magic
  • Equipped items in right and left hand
  • The current level, and position
  • Flags! (these are where most of the player's progress is stored)
All of that data, sans flags is only 24 bytes! I store flags as single bits, so I can store 8 flags in one byte.
Currently save files are defined for only 256 flags, but that number can easily be expanded to the 2000 or so I'll probably need.

I also came up with a nifty save game manager. Quite simply, it allows for three unique save games, so three different people can have their own save.
Both the save game manger and the intro screen are in EARLY stages (they don't have backgrounds, music, some textures etc..)

Finally, the "MessageBox" displays messages like: 

Disconnecting the controller, results in this message.
Until next time!

Sunday, March 18, 2012

Player's House Part 2

Man, have I been busy lately. I've had barely any time to work on the game. Luckily I managed to sneak in some modeling this weekend. So here I have the model for the player's house -as you can tell by the post name. The model is mostly done.

Things that still need to be done:
  • Chimney
  • Windows
  • Base/Porch texture
  • Roof Texture 
Now for some pics (as seen in Blender):

The "solid" version.

Wireframe mode!

Textured version; the roof and porch are not using their final textures.
As I said, parts of the model are not using their correct textures, as I have yet to make them.
Hopefully I'll have this model done in the next day or two -school takes up a LOT of time- and can continue working.

As usual, all models are made in Blender and their respective textures are made in Inkscape.

Wednesday, March 14, 2012

Player's House Part 1

Okay, so I've decided now is the time to start making content for the actual levels of the game. Starting with the player's house.

Rough sketch of the player's house, done in pencil.
I should mention that I am using the amazing, opensource, 3d modeling tool Blender to make all of the 3d content and animation for Ruined. All of the textures and the UI are made in another awesome, opensource tool: Inkscape

Hopefully, I'll have the house finished soon, and can start focusing on the rest of the level.

Monday, March 12, 2012

Doors!

Okay, I told myself that'd I'd post about most, if not all, of the main components of the Ruined Engine. The "level" in Ruined consists of many portals. A "portal" is an area of the level containing, well anything. The Engine optimizes itself based on which portal you, the player, are in. Whether or not a portal is active is determined by the current portal.

A section of "Test Level 2", illustrating the different portals.
So, now, you may ask well how do I get from one "portal" to another. Simple! You walk through a door.

A locked door using the "Test" design.
When the player presses 'A' on a door, the door opens and the player automatically walks from one side to the other. The doors of a level are responsible for the switching of portals. Doors in Ruined can be locked, barred, or both! Of course you can't walk through a locked or barred door, so the text-box appears on screen saying so.

A door that is both locked and barred.

Locked Door Message

Barred Door Message
The doors in the engine are all functionally the same, although new door styles can easily be created. Once a door is unlocked the key is no longer needed, and the door will remain unlocked the next time the level is loaded, there is also a nifty animation for unlocking and barring/unbarring doors. 
-Doors: they are so often overlooked, but they literary the pathway from one room to another!

Note: The lag shown in the DEBUG mode FPS graph is a result of the screen capture tool, and not present in the game.


Sunday, March 11, 2012

Animation Systems

The animation system in Ruined is much different then most other games.
Usually the animation system in a game works by storing a TON matrices that transform each of a model's "bones" for each animation. While this may be fine for single animations it is unacceptable for more complex animations. Let's say, for example, that we want the character to be running while swinging a sword in one hand and then suddenly jump. In the standard system, the character would suddenly, choppily switch to the jumping animation. This is because the standard system takes only one input and, as a result, has only one output.

The Standard System results in a choppy timeline.
As a result of this choppiness, games designers have adopted a system of smoothing between animations. This allows the switch - from say running to jumping - to be much smoother. The "Smooth System" takes two inputs: the current animation, and the desired new animation, and smoothly transitions between them. The matrices that make up the animation should be decomposed before blending.

A Smooth System allows for smooth transitions from one animation to the next
Now the issue with the Smooth System is that it only supports one stream of animation. A "stream" can be thought of as an animation that only effects a certain part of an object. Separate streams can exist for the arms, legs, head, fingers etc. This allows each stream to animate independently of the the others. So the character can be running while swinging his sword, shooting a bow or eating a sandwich...

A Stream System allows for dynamic control of multiple animations, smoothing, and gives the best results overall.
In Ruined, the engine can make use of all three of these systems. This way, the proper system can be used depending on need:
  • Standard Animation is used for things that are perpetually animated, like a train engine.
  • Smooth Animation is good for most NPC's or monsters/creatures/wildlife.
  • Stream Animation is best for complex characters, such as the main character.
Another cool feature is that all three of these systems allow for optimization (cutting 1340 frames down to 60), which I'll talk about in another post :)


Saturday, March 10, 2012

Need a screen recorder

Okay, it turns out that I need a good screen recorder to start showing off some of the dynamic things in the game - it's kind of hard to show animation in pictures.
So in the meantime, I guess I'll have to show off some of the things that don't need to be seen with their animated effects.

As I mentioned I have the item system mostly done. When an item is received it is shown, rotating on the screen like this:
A "Small Key" received from a chest.
Items can be received from anywhere: chests, people, stores containers...

Next we have a floor-switch. A floor-switch is a switch that is activated when jumped on. These switches have their own event handlers so they can be programmed to do anything!

A floor-switch, on the floor
If you look up in the top of this picture you'll see the compass, which was added to aid navigation to destinations and quests.

Hopefully when I find an free or open source screen recorder, I can start uploading videos of all of the cool components working.

Friday, March 9, 2012

Current Progress

Ruined has already had considerable progress made. The engine the game runs on has been built to allow easy extensibility.
Some of the more noteworthy features of the engine include:
  • A "portal" based level system
  • The light pre-pass renderer
  • Particle systems
  • My own version of Screen Space Ambient Occlusion
  • Shadows (only cast from the main light)
  • An "after effects" system
  • Integrated physics
  • Optimized animation system that can handle multiple streams
  • A special debug mode with performance graph
And the game already has a lot of its features done as well
  • A character controller
  • Composited character animation
  • First and third person views
  • The "received item" screen
  • Floor switches, doors, ladders, torches, chests and more!
Now for some older pictures!
An earlier test scene, prior to animation or shadow integration, showing off tons of dynamic lights 
The light buffer showing my SSAO and shadows, this pic is 2 weeks old at time of posting. You can also see the debug mode features.

An early version of the water shader
Hopefully the next post will have some more recent pictures :)


New Blog

Okay, so I'm just getting the blog up. Fun!
So let me tell you a little bit about the game Ruined.
It is an action adventure game that has been in development since 2011.
The entire project - code, art, and story - are and will be created by myself (although my friends do provide a lot of inspiration)
A LOT has already been done in the game, so hopefully I'll have some actual content to show you soon!
Ruined Game Logo