Wednesday, November 16, 2005

Continued Work

Haven't spent too much time programming in the last few weeks, mainly because of F.E.A.R and Painkiller - Black Edition.

I was blown away by the quality of F.E.A.R and Painkiller the effects that they achieved in these games are mind boggling, so to understand it a bit better I've invested my money in 3 books (which should be arriving 2nd Dec)
  1. GPU Gems 1
  2. GPU Gems 2
  3. Programming Vertex and Pixel Shaders

I've also spent some time investigation different culling techniques and began implementing one... but then I stumbled over the Haddd 2 engine (not released yet), they have a video of the engine (created in Managed DirectX C#.Net 2) and it looks awesome.

About a week later I stumbled on another person creating some awesome Managed DirectX tutorials at www.c-unit.com so im thinking of waiting a few more weeks before deciding on continuing the Sadism Engine or not.

If not I will concentrate all my time on the Sadism Editor but make it more customised towards our game we are going to be making. So more news on that soon...

In the meantime there is a lot of planning / sketching / brainstorming that's going on and jotted down on A4 paper.

Its good to see the Managed DirectX ball gaining momentum...

Tuesday, October 18, 2005

High Level Shader Language (HLSL) & Lights

Made some changes to the lights:
  • Adding a light in the scene now creates a graphical sphere to represent it
  • On mouse over the light it changes from yellow to a highlighted red
  • Clicking the light displays a graphical wireframe sphere of the lights radius
  • You can move the light around the scene using the mouse
  • The properties for the light now includes the Colour and Enabled properties

Also started work on adding High Level Shader Language (HLSL) support. Just managed to get per-pixel specular highlights working (without textures yet). Probably going to mess around with effects for the next week or so.

Sunday, October 16, 2005

FPS High Performance Timer

Finally added the high performance timer to the SadismEngine.dll and added the FPS counter to the Editor.

Spent the rest of the day planning out what needs to be done over the next few weeks.

The next thing to add for the engine is view frustrum culling, after that going to spend quite more time on the editor.

Saturday, October 15, 2005

Multiple X Files


Well its finally been added, you can now add as many x files as you want (they get placed at the current position of the camera)

Made a few slight changes to the GUI, and also now only allow a single instance of the Editor to be loaded.

Also added a new "New Project" setup screen, this allows you to give your project/game a name and select a directory you want to place your project in (with the option to create a sub folder if you want)

The new screenshot above is of a scene created by Neil using the multiple x-file support added today.

Thursday, October 13, 2005

Fixing bugs...

Well spent the last few days working out and fixing stuff....

1st issue was the DX Lights, on my Dual GeForce 6600 I could place quite a few light in the scene, but on Neil's PC (ATI Radeon card, not sure of the exact model) he couldn't place any lights down.
Spent ages trying to work out what the problem was... turns out that his GFX Card only supports 2 lights and by default the scene already has 2 lights (a point light and a directional light), so thats why he couldn't place any lights down and I could on my machine.

The second issue was where 2 objects overlap there was flickering/tearring effect where it would draw the wrong object in front of the other. This issue kept me buzy for quite some time... and it also turned out to be something really simple. It was caused by setting the ZBuffer Near Plane to 1.0f, after changing it to something larger i.e. 15.0f it fixed the problem.

Before:

After:

Here is the fix:

matProj = Matrix.PerspectiveFovLH((float)Math.PI / 4, 1.0f, 15.0f, 10000.0f);

I also added a splash screen to the editor that displays whilst the editor is loading up.
A lot of other small issues were fixed this past week and some other improvements were made to the code, but now im concentrating on the loading of multiple x-files, hoping to get that done by Sunday night.

Wednesday, October 05, 2005

Another weeks passed...

Spent the last few days trying out different file types to save to, eventually decided to go with using XML files.

Just finished the Save & Load for the Camera class, will try get the lights, entities and scene properties in as well tomorrow.

Still need to add support to load multiple entities into the scene.

Microsoft just released the new DX9 SDK which comes with a beta of XInput which means soon the editor will be able to support XBox 360 controllers with vibration, as well as voice input/output support.

Wednesday, September 28, 2005

Mid-week update

Added the following:
  • Camera movement using the AWSD keys
  • Adding of Point Light's to the scene (creates the light at the current position of the camera)
  • Added ability to select an X file in the scene with the mouse

Next task on the list:

  • Load more than one x file into the scene

Monday, September 26, 2005

Interactivity.. finally


Here is yet another image of the Sadism Editor... its finally starting to take shape.
I've added support for the Properties Grid, which allows on the fly changes to the current scene.
I've also got the Tree View working, the root item is called "Scene", clicking this gives you the propertis for the scene, the same goes for clicking the Skybox, Light, or Camera node.

So here is what I've added:
  • Enable / Disable Fog in the scene
  • Selecting the fog colour from a color picker
  • Setting the fog start and end position
  • Enable / Disable light in the scene
  • Ability to load a single x file (no properties yet)
  • Loads a light (no properties yet)
  • Can set the camera position and position its looking at
  • Can remove textures from the skybox
  • Can set texture level of detail per texture for the skybox
  • Can hide/show the skybox

Tomorrow I will try add support to add more than one object and light, also need to add support to move the camera around using the "WASD" keys, and I still need to add support to select an object in the DX view using the mouse.

Sunday, September 25, 2005

Mouse Control


Well I've fully implemented mouse movement from within the editor, which basically means that you click within the 3D View and hold the mouse button to look around. This took a good few hours to get work exactly as I wanted it, but its finally done... so now im moving going to be working on the following in the editor:
  • Loading an X file into the scene
  • Selecting the mesh file using the mouse
  • Displaying a selection box around the selected mesh object

I also changed the editor look a bit more as you can see above, and got some cool new icons from Neil (he does all the artwork).

Friday, September 23, 2005

This weeks updates.

Fixed a problem I was having with Direct Input within a windows form control.

Changed the layout of the Sadism Editor, decided to drop the original 4 window layout and go with a single larger "DirectX" window but have the option of changing to wireframe and selecting Top / Front / Left view from within that window.

I changed it because its a game editor and not a 3D CAD program, in other words it for placing models instead of drawing models.

Here is an updated screenshot, still a lot of work to be done as I've spent very little time on the editor so far. The big grey window will be used to browse textures/entities/music/sfx/scripting etc. The blue section will probably be a properties or about section.

I've also added Animation support to the engine but it does not seem to be working quite right just yet.

Sunday, September 18, 2005

Lighting

Well i've added the rotation and scale properties support for the entities, I also added a Light class to handle all lighting... still needs a load of work and features, here is a screenshot of the same scene as before but now with a directional light:















Probably going to add the animation next and then come back to the light class later. Some extra features I want to implement for the light class:
  • Flickering (to emulate candles, faulty lights, etc.)
  • Pulse (select min & max radius and rate of pulse, also min & max colour option)
  • Chronos (pass in the sprite to be used)
  • Lens flare

Saturday, September 17, 2005

Saturday Night

Well, spent the Friday night partying, so decided to spend the Saturday night working on The Sadism Engine.

Spent quite a bit of time working on it, mainly tweaks and improvements to the coding to make it more generic.

There are no new features, however I have moved everything engine related over to the Engine DLL. Oh and I started improving the EntityManager a bit, I have added two new properties:
  • Position (Vector3 - Controls the current position in world space)
  • isVisible (bool - True by default)
So now if you want to hide an object "entity" all you have to do is say: ex. Barrel.isVisible = False
and the engine will stop drawing it.

If I get some time on Sunday I will add a few more properties like Scale and Rotation, after that I'm going to try add a light supports, animation with bones, and normal mapping.

And once all that's done I will start looking at implementing some functionality into the Sadism Editor to make use of the Engines features.

Thursday, September 15, 2005

Quick update

Well its been a few weeks without an update... and thats mainly because I have nothing to update on!

Been really busy at work lately, something I have stuffed around with recently was face traking using a PS2 Eye-Toy camera to track where the persons head is. I'll post more info on that when it eventually becomes part of the engine.

The good news is that im not as busy anymore, so got some spare time again to work on the engine. Spent last night moving some more code into the SadismEngine.DLL.

Tonight I will try implement Tom Millers rendering loop (supposedly the fastest) into the DLL.

Hopefully will have a few more regular updates over the next few weeks.

Tuesday, August 23, 2005

The Editor Prototype...


















Here is the screen-shot of the editor....

Still having a few issues with the frames per second counter, not quite sure why... hopefully will sort it out on Thursday. Can't really do anything yet in the editor... I just wanted to get a feel for whats possible or not with window controls (haven't really dealt much with them before)

Saturday, August 20, 2005

Day 3 - Camera, Input, and Skybox















Added the following this morning to the SadismEngine.dll:
  • Camera
  • DirectInput
  • Skybox

And i've also included the first screenshot, this first build allows you to move the mouse around to look around the scene, I have not yet added the camera position movement yet.

As soon as I get my ADSL installed and some webspace I will be uploading weekly builds of the game, engine, and editor.

My next step is to add a Frames Per Second counter, and have another look at moving some of the Direct3D code to the SadismEngine.dll instead of putting it all in the Windows Form code file. I've also started working on the user interface for The Sadism Editor, I will post a screenshot on Monday night.

Friday, August 19, 2005

Day 2 - SadismEngine.dll

Well I managed to accomplish quite a bit today.

Added the following to the dll:
  • ObjectPool (controls the loading / releasing of textures and meshes)
  • HighPerfTimer (returns the amount of elapsed time since the last rendered frame)
  • Entity (add an object "entity" to the scene)
  • EntityManager (used to manage the order of updating and rendering the entities)

In order to test the above I created windows app that calls the dll, the app initializes a DirectX window so that I could visually see the objects rendered.

Tomorrows goal is to add a First Person Shooter (FPS) style camera class and add ability to load a skybox to the SadismEngine.dll and try post the first screenshot on this blog.

Thursday, August 18, 2005

Day 1 - It has began!

So my goal is to make an awesome game engine, but of course an engine is pretty useless unless it can do a few basic things... And in order to use the engine we don't want to have to rely on a lot of coding (which is usually slow and tedious).

Instead we want a simple yet powerful editor to allow us to use the game engine to create games.

So if we going to have an editor "The Sadism Editor" (SED) and a game engine "The Sadism Engine" (SE) we are going to need to have a lot of common code, so instead of having common code we are going to need to create a DLL, which I'm going to call Sadism.dll

Oh and by the way I will be doing all the coding in Managed DirectX (MDX) using C#.Net.
Why C# you say? Well why not? Its runs at about 98% of unmanaged DX and its a lot quicker to code in C# than C++ (well for myself it is anyway). Check out Tom Millers blog (creator of MDX)

So what have I accomplished today you might ask???
  • Direct Input 9 (just keyboard & mouse supported so far)
  • Camera Class (use the mouse to move the camera around - like all FPS)
  • Resource Manager (for textures and x files)
  • Skybox (loads any x file, its an un-lit scene and supports alphablending dds files)
  • High Performance Timer (keeps the game movements at the same speed on different PC's)

I did the above pretty quickly, mainly because I had done it before, so only had to make a few changes to make it more "engine" friendly.

I've done the above in a windows form, yet I still need to put it all into a nice Sadism.dll file.

Its getting pretty late, and I do have a day job which takes up a lot of time... So I better go to sleep.

Tomorrows goal is to get the Sadism.dll up and running.

Introduction.

I decided to create a log of the progress of my latest project... The Sadism Engine.

My background:
I'm a hobby programmer and love writing games, I have created many game demo's over the last few years, I've only released 1 demo on the internet. The reason being mainly because I haven't had an internet connection since I moved out (so that's the last 3 years).

Living in South Africa high speed internet connections don't come cheap... and a simple internet connection can set you back a few hundred Rand a month all inclusive. Just recently the priced dropped a bit and I decided it was finally time to get an internet connection... I've ordered ADSL about 3 weeks ago, and im still waiting for them to come install it.

Im currently using my Cellphone's GPRS (via bluetooth) from my PC, the speed is pretty ok, it at least allows me to browse the net.

I've been working on creating games for the last 6 years now with a friend of mine who does all the art work. The first game demo we released was about 5 years ago and it was called Magic Dust 2.