Advertisement Jump to content
  • Advertisement
Sign in to follow this  
  • entries
  • comments
  • views

About this blog

Stop working on graphics,start working on gameplay!

Entries in this blog


NightFall getting in good shape

Done a lot of work on Nightfall, check it out at

Also the game we are working on at work is finally went live.

Check out Dirty Dancing at :

Black Knight

Black Knight


What happened to the OpenGL community?

Back in the day when OpenGL was popular there were tons of resources on it, nowadays everything is out-of-date or very spread out. is really lacking in terms of useful docs and there isn't a real SDK as the D3D one.

Since OpenGL is pretty much on par with D3D11 in terms functionality I am hoping to see some updated sites with this knowledge.

Or maybe everyone has given up all hope on it. Do you guys all get you GL info from the ref pages and extension docs on Reading a plain text file in 2011 hurts.

/rant over

Black Knight

Black Knight


App on facebook

Not much happening around here, other than a cold winter and tons of snow.

The application we are working on facebook has gone public on facebook, you can try it out here : Prize Arcade

I have programmed the front end of this app in ActionScript 3 and using the Flex 3 Framework.

You can play and enter to prizes to get a chance to win 100$ every day

Other than that I am working on my own 2d rpg on facebook which you can find here :

It is also done in flex3 and still in progress but you can fight monsters and other people from the hall of legends and you can equip items from your inventory.

Haven't worked on Dark Age for a while now so no news there.

That's all for now. Happy Valentine's Day!

Black Knight

Black Knight


Flex 4 Background Image Fail

Seriously why did adobe made putting a background image to controls so much harder between flex 3 and flex 4?

In flex3 most of the components have a backgroundImage property.

And you are done.

In Flex 4 you have have to either write tons of code to create a custom skin and do something like :

or use backgroundImage property with Embed as in :

Which I don't want because that makes the swf bigger and requires me to recompile the swf everytime an art asset is updated.

The only work around I found is this :

"600" height="50">
"images/background.png" percentWidth="100" percentHeight="100" maintainAspectRatio="false">
"middle" percentWidth="100" percentHeight="100" paddingLeft="10" paddingRight="10">

"32" height="32">

"32" height="32">

This code loads an external image and puts it in the background of the buttons without fucking the layout.

Am I missing something here? Looks like flex 4 making things more complicated, I don't understand what people are talking about when they say it's making skinning easier, basically you have to create a new skin file with tons of code for each component you want to skin.

Black Knight

Black Knight


Javascript map editor

I am working on a map editor for the browser game.
Looks like it is not possible to get image clicks for items inside a canvas because all mousedown/up and click events are sent to the canvas.

So I had to loop through all tiles and check which tile is clicked to modify it.

Tiles and panning can be selected from the right toolbar. Here is the link :


The plan is to modify the maps here and then save them to a mysql database, then the game will load the list of tiles from the db instead of creating a random map every time.

Black Knight

Black Knight


Facebook App

Having fun for the last couple of days with a facebook game. It is just a fun pet project nothing serious, done completely in javascript with the canvas tag. It doesn't work in IE as it doesn't support it yet but IE9 should support it.

Here is the link to the facebook app :


You can still play it directly from my page which shows the game bigger :


Black Knight

Black Knight


Samsung galaxy s

I got this new phone a few days ago. It's pretty neat. It has shitload of features
but if I try to type all it would take ages. I'm still trying to get used to

The phone has android 2.1 and will get 2.2 with flash 10.1

I'm still working part time as a python game programmer.
Planning to go back to dark age soon.

That's it for now!

Black Knight

Black Knight


Dark Age v0.4.1144

This is a small update to Dark Age that adds new quests,dialogues,models and grass to terrain. I have also fixed a few issues that might crash the game in some cases. The game is still not balanced so it might be too hard/easy depending on how you play.

Here is the down load link :


Here is the change log for this release:

-Version 0.4.1144-
-Added ogre animations
-Added grass to terrain
-Added new rock model
-Added 3 more quests
-Improved character page
-Fixed the merchant skill
-Fixed a bug in the dialogue editor that would corrupt the dialogue files
-Fixed some dialogue texts
-Fixed model sizes
-Fixed collision detection with rotated objects
-Fixed an aspect ratio bug in 1280x1024 resolution
-Grass can be turned off from the options
-Performance improvements
-Crash fixes

Black Knight

Black Knight



I finally got myself another monitor.I set it up to vertical orientation 1080x1920.

Dark Age source looks like this.

And this is how my setup looks now

Black Knight

Black Knight



Its 2 am so I will just post a screenshot for now.I will describe how I did the grass effect later.

Good night journal ! :)

Ok here is how the grass is done.

First of the grass is a 3d model created in a modelling program.It looks like this :

And this is the texture map on it(it is ugly but it can be improved by an artist) :

The only thing left to do is to place these models around the player.It is possible to do it by hand in the world editor but it would take a huge amount of time considering the size of the map so I made a method that automatically places these models around the player depending on the blend maps of the terrain.The terrain can have 8 different textures which are blended with 2 alpha maps,the red component of the first alpha map tells which areas should be grass,so the grass model is only placed on the terrain if the red component of the alpha map beneath is greater than 150.The models are also rotated to align them with the terrain normal under them.Here is the method that does this(not cleaned and optimized yet :))

void DARenderer::drawGrass(float elapsedTime)
Vector3 playerPos = m_World->getPlayerPosition();

boost::shared_ptr model = m_ModelMngr->getModel("grass.X");

STE::EffectPtr effect = m_Effects["model.fx"];

D3DXMATRIX worldMatrix,rotationMatrix;
float x,y=0,z;


boost::shared_ptrconst GeoMipmapTerrain> terrain = m_World->getMap()->getTerrain();
const GeoMipmapTerrain::VertexBlendData* data = terrain->getAlphaMapData1();

int indexX = (playerPos.x)*1024 / (terrain->getScale()*(terrain->getSize()-1));
int indexZ = -(playerPos.z)*1024 / (terrain->getScale()*(terrain->getSize()-1));

int imageX = indexX;
int imageZ = indexZ;


Vector3 groundNormal;

for(int i=-10; i10; ++i)
for(int k=-10; k10; ++k)
imageX = indexX + k;
imageZ = indexZ + i;

if(data[imageX + imageZ * 1024].r >= 150)
x = (imageX/1024.0f)*terrain->getScale() * (terrain->getSize()-1);
z = -(imageZ/1024.0f)*terrain->getScale() * (terrain->getSize()-1);
Vector3 pos(x+0.1f,y,z+0.1f+sin((float)(imageX))*2);

Vector3 rotationAxis;
Vector3 up(0.0f,1.0f,0.0f);
float angle=STMath::AngleBetweenVectors(up,groundNormal);

D3DXMatrixTranslation(&worldMatrix,pos.x , y, pos.z);

worldMatrix = rotationMatrix*worldMatrix;



This screenshot shows how the models are not placed on the dirt path.It is all automatic if you go in the world editor and paint dirt or any other material it removes the grass models around the player.

Some imrovements can be made,one of them is frustum culling right now almost half of the grass models are not visible since they fall behind the camera.Another improvement will be the grass texture.Multiple models can be used and swapped to give a more random feel and so on.

Edit :
Added frustum culling and increased the visibility range of the grass.Also added simple animation to the grass inside the vertex shader.
I have uploaded the test app to my site, here is the link :

Let me know how fast(or slow :)) it runs.

Black Knight

Black Knight


Missing texture

I added something that I wanted to do for a long time to Dark Age.I store all my textures in a std::map with the file name as the key.And when models,terrain etc are loaded they ask the texture manager for a texture file and the texture manager returns a reference to the texture.Previously when a texture was missing form the game folder the game was displaying a pop up window telling the name of the texture file which was not found and then continuing as nothing has happened which was causing the game crash when the texture was being used.For example you could go in the textures folder and delete snow.png and the game would crash :)

Anways first I thought I could add a checked texture to the textures folder and load it when game starts and whenever a texture is not found I could return a reference to the checker texture,but then again someone might delete the checker texture too.So instead of putting the texture to the data folder I created it programatically and added it to the texture manager :

STE::TexturePtr newTexture = renderer->createTexture(64,64,0,D3DFMT_A8R8G8B8,D3DPOOL_MANAGED);
unsigned char* data = new unsigned char[64*64*4];
for(unsigned int i=0; i64; ++i)
for(unsigned int k=0; k64; ++k)
int index = k*4+i*64*4;
unsigned char color = 0;
if ((i32 && k32) || (i>=32 &&k>=32))
color = 0;
color =255;

data[index] = data[index+1] = data[index+2] = color;
data[index+3] = 255;
delete[] data;

The usage is pretty simple,when someone request a texture from the renderer it calls, renderer->getTexture(TexID::GRASS) the renderer asks the texture manager and returns the texture if its loaded or the missing texture if it can't find the wanted texture.

While I was testing I first filled the texture with random stuff below are two screenshots showing the random image and then the checkers.I just deleted some textures randomly in the game folder and everything seems to be working fine.

Black Knight

Black Knight


Testing Flex

After playing around with Flex 4 and action script 3.0 I have managed to put together a simple site.It can be found here.
I am planning on making this a simple browser role playing game.

Everything in the game is done with flex components with custom skins.For example the buttons on the login panel and the buttons after you login are all Flex buttons so event handling and stuff works the same for all.

Right now the user interface consists 4 images for the frame and a image for the world map and they are all embedded in the SWF file which makes the swf file almost one megabyte.I guess the files can be made smaller and this will reduce the load time of the application.All other images will be loaded at run time when you switch from screen to screen.

I am using an FlashDevelop as the IDE and the free Flex 4 SDK from Adobe.This is my first time trying out flash/flex/AS3.0 so I am probably doing most of the stuff in a bad/unoptimized way.

Next step will be learning httprequests and using php/mysql to create accounts and let people login.

Black Knight

Black Knight


Dark Age v0.4.1101

The new release of my game is ready after two months.Here are the download links and the change log.Have fun and please let me know if you encounter any bugs or crashes.

I need help with character models and animations so if you think you can help just drop a message or send an email.

Download :
Dark Age v0.4.1101

Videos :

">Editor on YouTube
">Game on YouTube

Changelog :
Dark Age Change Log

Black Knight

Black Knight


Dark Age Dialog Editor & Dialogs

I have finally managed to implement the first dialog system into the game.It is a very simple system which consists of strings stored in text files in a hierarchical manner.

The first step was to create a tool to create these dialog files.I was very tired of doing everything in pure c++ and win32 so this time I used c# to create the dialog editor.The dialog editor can work as a stand alone program or it can be launched from Dark Age World Editor.It can add new nodes delete nodes save and load dialog files from the disk.Here is a screen shot of the the dialog editor.

As you can see its pretty simple.This hierarchy is saved to a text file,I used white spaces to keep the hierarchy intact so the above dialog looks like this in a text file.

Greetings , how can I help you?
I am looking for wooden logs for the guards.Do you know where I can find them?
Yes,you can find them south of here behind the barracks,under the trees.
Can I ask you something else?
Where can I get training?
Master Isdali can train you.You can find him inside the barracks.
Can I ask you something else?
I see, bye.
Where can I buy equipment?
Talk to a merchant in the town you can sell and buy equipment from any merchant.
Can I ask you something else?

While reading this back I check the white spaces and recreate the dialog hiearchy with the following code.The following code is in C++ but the same code is ported to C# for the dialog editor.

#include "DialogueNode.h"

DialogueNode::DialogueNode(const std::string& text,DialogueNode* parent):

DialogueNode* DialogueNode::addNode(const std::string& text,DialogueNode* parent)
boost::shared_ptr newNode(new DialogueNode(text,parent));


return newNode.get();

bool StartsWith(const std::string& text,const std::string& token)
if(text.length() return false;

return (, token.length(), token) == 0);

void DialogueNode::recurseNode(std::ifstream& file,std::string text,int level,DialogueNode* node)
if (text.length() == 0)
std::string whiteSpace = "";
for (int i = 0; i {
whiteSpace += " ";


std::string key = text.substr(whiteSpace.length());

DialogueNode* addedNode = node->addNode(key,node);


recurseNode(file,text, level + 1, addedNode);
recurseNode(file,text, level - 1, node->m_Parent);


Dialogue::Dialogue(const std::string& filename)
std::ifstream file(filename.c_str());

int level= 0;
std::string text;

//create root node

m_Root.reset(new DialogueNode(text,NULL));




Once the dialog is read from the file the only thing left is to display it through the interface.I created buttons from my interface and gave them a Dialog Node member each time a button is clicked the current root is changed to the current clicked button's first child member node.

The only hackish thing at the moment is when the dialog reaches the leaf nodes,there are only two options.The first on always returns the dialog to the root and the second one always ends the dialog,this is currently hard coded and should change in the future.

Here is how it looks in the game.

It is possible to give each dialog node different properties.For example certain nodes might give xp,gold when clicked or trigger other stuff.This requires the functionality to disable dialogue nodes once they are triggered.At the moment the dialog structure is static and all nodes are always visible.

Each unit entity in the game has a member called DialogFile.This is a string member indicating the dialog file to use for this unit and it is set from the world editor.So you can use the same dialog text for multiple units but that doesn't make sense :),If this member is an empty string that character doesn't have a dialog.

That's all about the dialog system for now.

Black Knight

Black Knight


Dark Age v0.4.1006 Released

The new release is ready after another busy month.This release contains lots of new features,improvements and fixes.I have found a couple of bugs that would crash the game or editor in certain circumstances,hopefully they are fixed now.

The game has locked doors now which require the correct key to open or a lock pick item that can be bought from the merchants.When you click a door if you already have the right key it will automatically unlock.If you don't have the right key you can try taking a lock pick from your inventory and clicking on the door to unlock it.Your chance to pick a door is based on your lock pick skill.Door can also be opened by levers that can be found inside the dungeons.

There is a single type of trap included in the game.It is very simple and damages you if you get in it.There are other important features like inventory item stacking,smoke particle systems,new sounds,new tree model,different terrain grass texture.

Here are the download links and the change log.Have fun and please let me know if you encounter any bugs or crashes.


-Version 0.4.1006-
-Added item stacking.
-Added weed item and model.These items can be collected and sold to a merchant for gold.
-Added field model.
-Added traps.
-Added lock picking and lock picks to merchant.
-Added door open/close sound.
-Added smoke particle system.
-Added levers that control dungeon doors.
-Added lever model.
-Added keys that unlock dungeon doors.
-Added coin and item take sounds.
-Added key model and key inventory icon.
-Added a map that can be opened by "m".The map displays the whole area and the player.
-Added new entity system.
-Added options to world editor that control the visibility of terrain,entities and water.
-Fixed a memory leak in AnimationInstance code.
-Fixed a bug in entity traversal that caused crashes.
-Fixed a bug in rendering reflections.
-Changed shaders to use shader model 3.0.
-Changed terrain rendering code to use only one pass.
-Changed tree model.
-Changed terrain texture.
-Improved shadow mapping.
-Smoke particles fade out when they are too far.

Black Knight

Black Knight



Working on the map and new areas in the world editor.
Here is a screenshot for your viewing pleasure:

How it looked 2 years ago

Black Knight

Black Knight


VC++ 2010 Expresss

Downloading Visual CPP 2010 Express beta 2,gonna check how they screwed the GUI again and see how slow it runs :).
All the versions are available here

Here is how the new IDE looks :

I don't know if this is a new feature or not but after enabling build timing from the settings the output window displayed this information which is very detailed :

1>------ Build started: Project: nightfall2, Configuration: Release Win32 ------
1> nightfall2.vcxproj -> c:\documents and settings\default\my documents\visual studio 2010\Projects\nightfall2\Release\nightfall2.exe
1>Project Performance Summary:
1> 375 ms c:\documents and settings\default\my documents\visual studio 2010\Projects\nightfall2\nightfall2\nightfall2.vcxproj 1 calls
1> 375 ms build 1 calls
1>Target Performance Summary:
1> 0 ms MakeDirsForLink 1 calls
1> 0 ms ComputeCLGeneratedLinkInputs 1 calls
1> 0 ms _CopyFilesMarkedCopyLocal 1 calls
1> 0 ms _Midl 1 calls
1> 0 ms _CheckForCompileOutputs 1 calls
1> 0 ms PrepareResourceNames 1 calls
1> 0 ms AfterClCompile 1 calls
1> 0 ms SelectClCompile 1 calls
1> 0 ms ResolveReferences 1 calls
1> 0 ms SelectCustomBuild 1 calls
1> 0 ms BeforeResourceCompile 1 calls
1> 0 ms GetCopyToOutputDirectoryItems 1 calls
1> 0 ms _DetermineManagedStateFromCL 1 calls
1> 0 ms AfterMidl 1 calls
1> 0 ms AfterBuildCompileEvent 1 calls
1> 0 ms _AfterBuild 1 calls
1> 0 ms _ClCompile 1 calls
1> 0 ms _Manifest 1 calls
1> 0 ms CreateCustomManifestResourceNames 1 calls
1> 0 ms ComputeCustomBuildOutput 1 calls
1> 0 ms _Xsd 1 calls
1> 0 ms ComputeCLCompileGeneratedSbrFiles 1 calls
1> 0 ms ComputeRCOutputs 1 calls
1> 0 ms GetFrameworkPaths 1 calls
1> 0 ms ComputeCLInputPDBName 1 calls
1> 0 ms ComputeMIDLGeneratedCompileInputs 1 calls
1> 0 ms ComputeLinkImportLibraryOutputsForClean 1 calls
1> 0 ms ComputeRCGeneratedLinkInputs 1 calls
1> 0 ms MakeDirsForResourceCompile 1 calls
1> 0 ms _XdcMake 1 calls
1> 0 ms ComputeManifestGeneratedLinkerInputs 1 calls
1> 0 ms MakeDirsForCl 1 calls
1> 0 ms CopyFilesToOutputDirectory 1 calls
1> 0 ms PostBuildEvent 1 calls
1> 0 ms ComputeLinkInputsFromProject 1 calls
1> 0 ms _ResourceCompile 1 calls
1> 0 ms ComputeManifestInputsTargets 1 calls
1> 0 ms _DetermineManagedStateForLink 1 calls
1> 0 ms AfterLink 1 calls
1> 0 ms _Appverifier 1 calls
1> 0 ms AfterBuildGenerateSources 1 calls
1> 0 ms AfterResourceCompile 1 calls
1> 0 ms ComputeCLCompileGeneratedXDCFiles 1 calls
1> 0 ms MakeDirsForMidl 1 calls
1> 0 ms BeforeResolveReferences 1 calls
1> 0 ms AfterResolveReferences 1 calls
1> 0 ms PreBuildEvent 1 calls
1> 0 ms DoLinkOutputFilesMatch 1 calls
1> 0 ms _ALink 1 calls
1> 0 ms Build 1 calls
1> 0 ms _SplitProjectReferencesByFileExistence 1 calls
1> 0 ms _GenerateXMLData 1 calls
1> 0 ms AssignTargetPaths 1 calls
1> 0 ms ResolveProjectReferences 1 calls
1> 0 ms MakeDirsForBscMake 1 calls
1> 0 ms _BscMake 1 calls
1> 0 ms ComputeCLOutputs 1 calls
1> 0 ms BuildGenerateSources 1 calls
1> 0 ms _SelectedFiles 1 calls
1> 0 ms BuildLink 1 calls
1> 0 ms MakeDirsForXdcMake 1 calls
1> 0 ms _GenerateWebServiceProxy 1 calls
1> 0 ms BeforeLink 1 calls
1> 0 ms PlatformPrepareForBuild 1 calls
1> 0 ms AssignCppReferenceTargets 1 calls
1> 0 ms _Deploy 1 calls
1> 0 ms BeforeBuildGenerateSources 1 calls
1> 0 ms PrepareForBuild 1 calls
1> 0 ms SplitResourcesByCulture 1 calls
1> 0 ms BeforeClCompile 1 calls
1> 0 ms AfterBuildGenerateSourcesEvent 1 calls
1> 0 ms PreLinkEvent 1 calls
1> 0 ms _Link 1 calls
1> 0 ms BuildCompile 1 calls
1> 0 ms _CopySourceItemsToOutputDirectory 1 calls
1> 16 ms SetBuildDefaultEnvironmentVariables 1 calls
1> 16 ms _CheckForInvalidConfigurationAndPlatform 1 calls
1> 62 ms _PrepareForBuild 1 calls
1> 78 ms Link 1 calls
1> 203 ms ClCompile 1 calls
1>Task Performance Summary:
1> 0 ms AssignCulture 1 calls
1> 0 ms AssignTargetPath 5 calls
1> 0 ms Touch 2 calls
1> 0 ms WriteLinesToFile 1 calls
1> 0 ms MakeDir 9 calls
1> 0 ms Message 3 calls
1> 0 ms Delete 1 calls
1> 0 ms Copy 4 calls
1> 0 ms ReadLinesFromFile 1 calls
1> 16 ms SetEnv 4 calls
1> 78 ms Link 1 calls
1> 203 ms CL 1 calls
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========

Black Knight

Black Knight


Dark Age Version 0.4.869 Released!

At last a new release after 6 months.This release contains lots of stuff so I will just post the change log.I have added the first skills to the game.There are 9 skills in total but two of them are not working at the moment.Lock picking is not working as doors can't be locked at the moment.This is will be enabled in the next release.Also detect traps skill is not working as traps are not in the game yet.

Here is the download link

Here is the change log and a few new screenshots from the game :
-Version 0.4.869-
-Added Deheza.
-Added city tower and wall models.
-Added city and dungeon doors that can be opened by left click.
-Added skill training from trainer NPC.
-Added skill interface.
-Added dungeon doors.
-Added shadowmap size to userPrefs.ini file
-Added smooth texture tool to world editor.
-Added shadows too all objects
-Added the reflection of the sun.
-Added a slider control to the world editor that controls cloud density.
-Added sun billboard.
-Added a feature to save user settings made in options to userPrefs.ini file
-Added a progress bar showing enemy attack progress.
-Added an attack delay to NPCs which can be changed from the world editor.
-Added four new terrain textures.
-Added highlighting to targets that are mouse overed.
-Added energy and armor rating to units.
-Removed the interaction panel for animals.
-Fixed a bug in skyplane rendering.
-Fixed armor rating icon and position.
-Fixed enemies attacking through doors in dungeons.
-Fixed GUI items in 16:9 aspect ratio.
-Fixed collision detection in dungeons.Enemies no longer pass through doors when they are not visible.

Black Knight

Black Knight


Dark Age on new computer and shots of next release

After the posts of my new computer it was inevitable to show Dark Age running on the new computer.Before I got my new computer I was working on Dark Age on my crappy laptop(which died 2 the day I bought the new computer) with a geforce 8600m gs graphics card.It had a 128 bit memory interface so it was really fillrate limited.Currently I am drawing the terrain 3 times.First pass is for blending 4 different textures.Then another pass to blend another 4 textures on this.And then a final pass to add the shadows to the terrain.All the models are drawn in one pass with 1 diffuse map and a shadow map texture.So yes I added self shadowing and the entities are also receiving shadows now,not just the terrain.

Currently I have an list written in a private file on my webserver which lists a bunch of tasks that I want to finish for the next release of the game+editor.Once that list is finished I am going to post the game to my site and probably to GameDev and ask for help for character and npc models and animations.Someone named Marius Grafe took the goblin model and animated it and sent it to me without me saying or asking anything.It was a nice surprise and he did a very good job compared to my awful animations.But I couldn't reach Marius again he just disappeared.I emailed him a couple of times but no answer.Anyways maybe I can find someone willing to help.

I am thinking of finishing this post with a couple of screenshots from darkage.One to show the new shadows which has problems of course but not anything terrible.And then some screenshots from the game.Notice the screenshots from the game have very different frames per seconds.This is because in the first one the draw distance is set to maximum and more than 600 models are drawn,even if they are occluded by the terrain(note to self:look into occlusion culling).In the second shot the draw distance is reduced and only 170 models are drawn,also notice the fog closing in.And in the last shot the debug info is closed which adds another 30 or so frames per second.I guess sprite fonts are burning lots of cycles heh :)

Ahh and if you wonder what this place is.It is called Deheza a somewhat larger town located north west of Karatin the starting town.It has a place in the story line and you will have to eventually come here for some of the quests.Thats all from me for now see you in upcoming posts.

Shadows,houses and characters receive shadows to...

shots with different draw distance

Black Knight

Black Knight


Building the new computer

Here I am sitting infront of an old computer of my brother's refreshing the fedex tracking page waiting for the parts to arrive while everyones going to work or school :) The parts seem to be at the Toronto sort facility right now.They should be here in one hour.I will start assembling and post pictures and update this post as I finish putting it together.I have lots of installing to do and also some games to test.I hope nothing arrives dead so I don't have to deal with returns etc.This will be a fun day.

Edit 1 : Ok I am writing from the new computer after like 10 hours of installing testing and stuff :).Putting everything together took a lot more time than I predicted so I am a bit late.And after installing windows 7 the computer kept crashing and showing corrupted screens.At first I thought it was a fried graphics card but it was working perfect in games.I installed the three case fans on the same powersupply cord maybe that was causing some problems so I moved one of the fans to another cable.And check all connections and tightened everything.After that it didn't crash again and now it running smooth.I will post the pictures I took when I install an ftp client.I played a little WoW and Risen and they both ran perfectly.I also tried the new DX11 benchmark Heaven from Unigine which looks great and kills the GFX card.20 fps in some scenes at 1920x1080 resolution everything crancked up.Pics coming soon.

Edit 2: I made a small overclock to the CPU and its running at 3.0Ghz instead of the 2.66 stock speed.When turboboost kicks in it goes to 3.18 ghz.I ran superpi 32m and it calculated in 12minutes.I also ran 3d mark vantage and got 14k cpu score and 13k gpu score.

Edit 3: Ok here are some of the pictures I took :

Black Knight

Black Knight


New Computer on the way

I bought a new computer today and will probably have it in 1-2 days.
Here are the specs :

Asus P7P55D Socket 1156 Intel P55 Chipset CrossfireX Dual-Channel DDR3 2133*/1600/1333/1066Mhz GigaLAN 8-Ch HD Audio 2 x PCI Express 2.0 x16 Slots 6x SATA + 1x eSATA 3Gb/s 12x USB 2.0 ATX
Intel Core i5 750 Quad-Core Socket LGA1156, 2.66Ghz, 8MB L3 Cache, 45nm
OCZ DDR3 PC3-12800 1600MHz Platinum Edition Low Voltage 4GB (2x2048MB) Dual
Seagate Barracuda 7200.12 SATA 3.0Gb/s 1000GB (1TB) 32MB Cache (I have another 1TB too)
Asus Radeon 5850 1GB 256bit
Cooler Master RC690 MidTower Case
Corsair HX Series CMPSU-750HX 750W ATX EPS12V Power Supply(Has 4x pcie power connectors for crosfire)
Samsung SH-S223L/BEBS SATA Black 22X Lightscribe DVD-Writer OEM

Can't wait to get my hands on it and start playing games :) I also plan to start learning DX11 and slowly make the move from dx9 to dx11.Dark Age will stay in DX9 though.

Black Knight

Black Knight


Extending Dark Age World Editor with C#

I am pretty tired of doing all the GUI work in pure win32 so I wanted to use c# for the world editor.Converting all of it to C# isn't really an option because there is just too much code in it.So I decided to implement new dialogs with C# and run them from the C++ code with shell execute.

For example for an item editor or dialog editor I create a new c# application with one form then I modify this forms properties so that it looks like a popup window.Then I run it from the world editor.The changes I made to the form are as follows :
1-MinimizeBox = false
2-ShowIcon = false
3-ShowInTaskBar = false
4-Topmost = true

These settings make it look like a normal popup inside the editor.The only problem is it can be run multiple times and when the main application closes these popups stay open.I think I can find an elegant way to restrict only one app per world editor and send a close message to the c# apps when the world editor closes.

This will enable me to make much more advanced GUI elements in the world editor and hopefully speed up the progress of it.

Here is a screenshot showing the new c# dialog.The dialog on the top right is the regular win32 one the new one has a listview and a datagrid.

I will use c# apps for things that don't need data from the main application so that I won't have to deal with passing data around.For example the item editor can be done this way.It will read the item data from the disk and modify everything.The world editor is using IDs to add items so it just needs to reload the item list which holds ids and it should be all good [smile]

Black Knight

Black Knight


More work on skyplane.

I have done more work on my sky plane in Dark Age.Previously I was drawing a sky plane in one pass and combining two textures for clouds and adding a color based on the height of the vertex.This was working nice until I decided to add a sun billboard in.Because the actual sky and clouds are drawn in one pass I couldn't find a way to draw the sun behind the clouds and in front of the sky so I split the sky rendering into two passes.This really simplified the shaders too.

First the sky plane is drawn without any textures just to give the gradient color based on the time of day.After that the sun billboard is drawn and the clouds are drawn over that so that they can occlude the sun.

In order to make the sky gradient brighter around the sun I calculated two rays one of them is the ray that comes from the light position to the camera and the other one is the ray that comes from a vertex of the sky plane to the camera.By comparing these two rays I changed the color of the sky plane.I used the same technique to make a fake lighting for clouds,so clouds that are facing the sun are brighter and clouds that are in front of the sun are darker.

Finally I made the clouds darker based on the density of clouds the clouds don't look as good as they do in a less dense situation.I haven't found a solution for it so I left it as it is.

Here are a couple of screen shots from the world editor and the game showing the new sky and sun:

Cloud density = 0.0f

Cloud density = 1.0f

Cloud density = 2.0f (dont ask why density is between 0.0f- 2.0f :))


Moved sun to the other side of the map see how clouds became white.

One more showing clouds changing color based on position.

Well that's it.It's time to work on gameplay again :).There is no end to graphics, they can be always improved so I really have to stop working on it and focus on the game itself.

Black Knight

Black Knight



I made some more work on my little opengl framework.
I was using sourceforge but for some reason its interface is making me want to rip my eyes out so I changed to assembla,but assembla doesn't have any kind of stats and searching other projects is totally fail.I might try out codeplex as it has a better interface then sourceforge and some kind of stat system.It wasn't supporting SVN a few years ago but I guess it is now.

Here is the link to the assembla page it will probably change soon : glBase

Black Knight

Black Knight


New Monitor

Yay! I got a new monitor.No computer yet so I plugged it to the laptop and doing my coding work on it.It is pretty nice here is a picture :

Black Knight

Black Knight

Sign in to follow this  
  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!