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

Entries in this blog

Ols - Still Waiting

Don't really have much to say, but thought I would write anyway.

Still waiting to hear from companies regarding jobs - no rejections yet, but that doesnt say too much!

119 downloads, so its been going well. I KNOW I have to update it so as to limit the fps, but finding it difficult to find the time to do taht at the mo.

Looking into it though and it will be done soon :-)

Thanks for reading ;)

Ols - Bricking It

Everything seems to have slowed down now after the sudden rush of downloads. Currently holding steady at 91 - with only about 5 or 6 in the last day.

Have received mainly encouraging feedback so far, so thanks to all those that have been kind enough to write.

Have sent off my programming test and now waiting for a reply. I hate waiting!!!

Ols - 73 downloads

More downloads AND more feedback.

Thanks to all.

I plan to get an update up shortly, but currently have a programming test to do for a games company, so putting all my efforts in to that.....

Ols - 58 downloads

With 58 downloads so far I cant really complain, but the lack of feedback is somewhat disconcerting. Not sure what the average feedback per download is, but with one guy saying it doesnt work and another seemingly liking it, it does make me wonder what the other 56 people thought!!!

Oh well, at least people are trying it....
Against some of my better (scared!) judgement, I have set up a GD Showcase and my game is now online.


Please play it, look at it, admire it, admonish it, praise it, criticise it, or do anything else with it as you desire; just let me know!!

Ols (l) Rafa

OK, here's a question, how do I embed the screenshots? Personally I have no idea, but for now the links are:

Thanks Ravuya and Mushu for the help with the links

Ols (l) Rafa

Apologies to all those that have been paying any sort of attention to this journal over the past few weeks as there have been no updates. I am still, quite happily, alive and well, but been getting bored of my programming so its been slack!

The game is now starting to take a bit more shape. Have slightly altered the approach I was using and now the game is more about a chase than about a race i.e. sort of a mix between micro-machines and chase hq for those that can remember that far back.

I am now going to take some screenshots and post them on here so u can all see my work - as I promised for so many weeks, but am now actually gonna do it.

Be back in a sec....

Ols - The 3 R's

It still amazes me that people read this thing, but every day that I check back, my number of visitors has risen. Glad that this is proving enjoyable to some - even if it is only one very bored person at work who keeps on clicking refresh....

This week I have most been doing.....the 3 R's. However, my three are far more grammatically correct than the governments; Research, Research and Research. I know that this is technically only one R, but thats just boring.

Still working on collision detection and been trying to find the best method of doing this. Have found a load of different answers which are useful to varying degrees. It seems that I have been setting my sights too high though and attempting to overcomplicate things. Was working on a pixel-perfect collision detection algorithm when it occurred to me - after 5 days of working - that it is probably unnecessary to do that as most of the cars are pretty rectangular in shape and so I can use a far less exact algorithm and, in theory, still get very accurate results. So, this is what I am currently attempting to write.

I am so bored now!!

Ols - pixellated textures

Just noticed that i havent updated for quite a while now and I know that my viewing public - starngely there are a number of you out there - will be greatly disappointed by this. Hopefully this update will keep you all entertained on a nice monday morning - probably at a time where I am either sleeping or else attempting to force myself to try to start looking at considering doing some more programming.

So, what has happened in the last few days I hear you ask - or else the voices in my head are back. You will be delighted to know that the AI is now working at an almost flawless level. The AI cars 'see' the track with an impressive amount of precision and can, generally faultlessly, find their way around it using said skill.

As ever though, once this mountain has been climbed there is another even one in front of me. This time I am working on collision detection, and not really having much luck at the moment.

OK, time to explain in more tech-speak. I am trying to make the sprites detect each other when they overlap - for obvious reasons - (in fact BEFORE they overlap) but I have to ignore the alpha parts of the sprite as these are not visible. (Looking back this is not particulalry technical, but I am aware that some very un-tech minded and bored individuals will be reading this.)

Currently looking at methods to achieve this, but have recently been informed that my idea for real-time lock and capture of data from the sprite is not particularly feasible. Back to the drawing board :<

Well, that's it for the time being. I know that I keep saying that I will put up some screenshtos soon - the game really does exist - its just laziness that has prevented me from doing so I think, and also the fact that whenever the game is running I am too busy playing around with it and checking for errors to consider capturing the screen. Will try my best to do it this week I am sure you will be delighted to hear.


Ols - all right corners

Even though some of the corners were working the other day, I was really not very happy with the way taht it sometimes radically cut the corner in order to get to its destination. Therefore, rather than settling for second best, I went back to the drawing board - i.e. some pen and paper! - and rethought the way that the AI car is 'seeing' the track.

A slight alteration to the code and .......... ooh the suspense ........ it nows works AMAZINGLY! Even I am impressed, and that takes some doing. AI Car now expertly works its way around all the right hand turns and one left hand turn. Three more left hand turns to program and then I will finally be getting the completion of the AI cars' algortihms...

Ols - turning the corner

Ah, the joys of programming.

Shame they escape me at the moment. The game is starting to become a bit of a drag to work on, but needs must.

My current task is to get the AI car to turn the corners properly. In theory, once this is done, there will be very little left to do. But, as per usual, far easier said then done.

There are, as would be expected, four types of corner (rotate an L through 90, 180 and 270 degrees if your not sure what they are), and each of these can be approached from two different direction, meaning that there 8 corners to write code for.

My idea was that I could write the code for a single corner and then reuse that. Clearly that was far too neat and simple to work and so it looks like, at the moment at least, I need to right each one seperately - this is mainly due to the way the AI algorithm works - which it does suprisingly well!

I have so far programmed 3 of the corners, which has taken me in excess of a day, but I would hope to get the rest done in under this time as I now have the gist of what is going on.

Not a very exciting entry today really is it! Cant really beat my vaginitis entry from previous! But hey, at least this one is relevant to my coding.

Screenshots are still wanted I know, but at the moment the screen is an absolute mess of numbers etc. They will come. I promise :-)

Ols - vaginitis

Apologies if this offends anyone, but was just watching a CLASSIC episode of South Park - oh there are so many of them! - in which 'the boys' kidnap a load of calfs in order to stop their slaughter.

Unforuneately Stan becomes very ill and once the ordeal is over he is diagnosed with 'vaginitis':

Doctor: Vaginitis occurs when a person stops eating meat.. Those sores on his skin were actually small vaginas. If we hadn't stopped it in time, Stan would have eventually become one great big giant pussy.

Need I say more...
Spent the last few days trying to get my head around the AI algorithm I am writing. It involves being able to 'view' the map from the cars' perspective, and so has taken a LOT (i.e. a HUGE amount) of trigonometry work.

All those days spent in school with various teachers going through sin, cos and tan - where I was SO sure that there would be zero relevancy in later life - finally come to fruition some 8 or 10 years down the line. How I now appreciate them!

Have hit two large stumbling blocks along the way. Firstly I forgot about the four different quadrants in a circle and how the calculations would have to be different for each quadrant in order to get the correct result. Cue a large amount of time spent with pens, paper - lined & squared! - rulers and an unsuccessful search for a protractor (?sp) - again, I had no idea that it would ever come in handy so I probably chucked it.

Once I had got over this hurdle everything seemed to be coming along nicely until it stopped doing so! In my infinte wisdom I had somehow failed to realise that I should have been working in radians rather than degrees. D'OH! Although, more confusingly, I am sure that I did everything in degrees when working with matrix rotation in DirectX - too scared to look back at the code now as it is working fine and so there is just no need to tempt fate!

Back to the pen, paper, etc again as I tried to remember more recent - but far more confusing - maths lessons involving radians and pi et al

But, glad to say, once this was beaten it now appears that this part of the algorithm is working nicely - strangely not 100% accurate, but I think that this will, handily, add to the realism of the AI.

Next to do is to make use of this algorithm and get the AI car moving. Somehow I feel that those sixteen words dont do justice to the amount of work it is sure to encompass, but here goes nothing......

Ols - lets bounce

Today has been pretty uneventful and generally just slow after the ecstatic and lively day that was yesterday. I think I must have decided that I deserved a rest, or else I was just being excessively lazy, because not only did I have a lie-in, but I also didnt really get much done!

Fixed a problem with the AI car getting confused with map coordinates and screen coordinates, which now should make all movement PERFECT.

Started work on the AI algorithm. It looks like the best way to describe it would be as a sort of expert system. I have expereince with these as my masters dissertation was a football results predictor which made use of an expert system. That one was far more 'trained' than the one I am currently creating.

The current one is far more 'a set of rules that are to be followed' rather than an educated expert system. This may well become more adapted as time goes by, but at this point it doesnt seem necessary to make it more advanced, and so I doubt that I will do that; just depends how successful this turns out to be.

For those requesting screenshots, I will try and get some up tomorrow, but a couple of cars moving along a road is not REALLY going to be that exciting. Ah well, one most satisfy ones audience :-)


Just looking back at my threee journal entries, it occured to me that I have not in any way described what I am doing and why!

This is probably something that will be of interest to anyone who is taking the time to read what I write, so here is the jist....

I am writing a top-down (2d) car game, utilising graphics based on (or taken from) DMAs fantastic GTA2. The purpose behind this is to get a working demo in order to try and get me a games programming job - ever hopeful.

In which exact direction the game is to develop, I currently cannot say. I'm still in a state of shock as to how fast it is coming along! For starters it is going to be a racer I would imagine, with my very own AI algorithm - of which I am quite proud - that will allow the user to create there own tracks in a basic editor and the AI car to navigate with ease.

Thats the basic premise; will be interesting to see how things develop over the coming weeks.

As of today, I have a fully implemented scrolling map, fully controllable Player car, abley-drawn (only just) AI car, Newtonian physics engine and the very basics of the AI algorithm.

Good luck to me!

Its fixed

I have now solved the biggest problem I have had since starting the programming; the errant AI car!

The car was actively moving away from the Player car, for a reason that I was struggling to fathom. After a number of forum posts and a LOT of trial-and-error coding as well as an even greater amount of paper-and-pen maths, it became apparent that the problem was due to the vector that the AI car was pointing in i.e. its direction.

Any movement was always made relative to this vector and so was causing large problems. It finally came to me, potentially in a state of mild insanity from nothing else working, that I should try to translate the vector as well as making the other car movements. Therein was my solution.

Once the idea was found, the coding was pretty simple, and the code as it currently stands is:

bool CAICar::Render(LPDIRECT3DDEVICE9 pDevice)
return false;

RECT srcRect;
srcRect.top = 0;
srcRect.left = 0;
srcRect.bottom = srcRect.top + _pTextureInfo.Height;
srcRect.right = srcRect.left + _pTextureInfo.Width;

D3DXVECTOR4 tempVec;
D3DXMATRIX mtxTranslate;
mtxTranslate._41 = _pMap->GetChangeInOffsetX();
mtxTranslate._42 = _pMap->GetChangeInOffsetY();
D3DXVec2Transform(&tempVec, &_vecDirection, &mtxTranslate);
_vecDirection.x = tempVec.x;
_vecDirection.y = tempVec.y;
D3DXVec2Normalize(&_vecDirection, &_vecDirection);

_fPosX-=(_Player.GetVelocity()*_vecDirection.x) + _pMap->GetChangeInOffsetX();
_fPosY-=(_Player.GetVelocity()*_vecDirection.y) + _pMap->GetChangeInOffsetY();

D3DXVECTOR3 vCentre(0.0f, 0.0f, 0.0f);
D3DXVECTOR3 vPosition(_fPosX, _fPosY, 0.0f);

_pSprite->Draw(_pTexture, &srcRect, &vCentre, &vPosition, D3DCOLOR_COLORVALUE(1.0f, 1.0f, 1.0f, 1.0f));

return true;

I leave this original code here to look back-on in future days, and also to help any other poor bastard who is having similar problems!

At last, I can rest easy......until the next problem

Ols - flummuxed

I am absolutely at a loss as to what is wrong with my program at this point and how in the world to solve it.

The AI car is doing crazy things. It moves quite happily along its own path, but as soon as the map starts scrolling, the whole thing goes up sh&t-creek and the paddle has already sunk.

At this point I am hoping that 'Tarviathun' is going to be able to help as he appears to be my only hope!

Anyone else that fancies a try please feel free to download a copy of the currently 'broken' D2 from http://members.gamedev.net/ols/zip/tiles.zip, and laugh at the amusing movements that the AI car has decided to partake in!!



I have decided to setup this account for three reasons; firstly to keep a record of what I have done via this journal. This is bound to come in handy at one point, if merely to look back at my naivety at a later date.

Secondly, gamedev.net has been my saviour on many an occasion, so who better to host my thoughts and games than this very site.

Thirdly, the webspace allows everyone to access my files.

Hope anyone who reads this can get something out of it, even if its just some amusement at my inability!
Sign in to follow this  
  • Advertisement