Thursday 13 December 2007

It's done

Finally i am about to hand in my coursework and have vacation. I really need a vacation at the moment, i have never in my life worked so hard.
Last two days were spend coding and cleaning up my code. I am really glad it's is done tomorrow or the day after I will put up the executables and resource files so you all can play it. It will be about 50Megs.

Thursday 6 December 2007

Controller

Since I have my laptop I had to walk around my game with the keyboard. This is not easy when your used to using a game pad for this for 2 months, so I went out and bought a game pad today. I ended up buying an xbox 360 pad for windows, chose this because I kinda like the xbox controller anyway. The only thing is that the xbox controllers need a massive dead zone, and you can't calibrate it out with the windows controller options. So I had to code this out, although the main code is the same as a normal controller the buttons and axis on a xbox controller are different, so that required a new class. Only I made some stupid mistakes like returning the value for moving left or right on the left thumb stick instead of the up down value. That cost me two hours of work to figure out. Well I finally have it working.
It beats the shit out of moving around with the keyboard it's a lot easier and smother you will probably notice that in the next movie I put up. If i got time to make another movie because the deadline to hand it in is Friday next week, and i still have a lot to do.

Wednesday 5 December 2007

Mini map screen dumps

As promised here are the screen dumps for the mini map.

And here is the you tube movie. You can get the file here http://paul.walterheck.com/

Tuesday 4 December 2007

Mini map

Today the plan was to make a working mini map, and so it does here is a screen dump of it.(will be up tomorrow dial-up doesn't allow me to upload images.)
My first notion was to just redraw the whole map in wire frame and draw it into a new view port. This didn't work of course because I tessellate my planes in the map quite heavily. It look really bad.
Second try was to redraw only the outline of each face, this is the good approach only I tried it in the wrong class. This effectively took me back to the problems I had when I first drew the map. Then I remembered that I had already transformed all the vertices in the map, so I just had to take the first and the last vertex of a tessellated face.
The first and again wring approach in this version was that i copied the whole array over to the class were i needed it. This dramatically dropped my frame rate, which was around 5-7 fps on my new laptop. As you can imagine it was copying a lot of unnecessary data, but at least the mini map was drawn.
The final approach was to just copy the first and last element of the array and this speeded the rendering back up to acceptable frame rates.
I'll put the screen dumps of it up tomorrow it's now bedtime here so I say goodnight to you all.

Monday 3 December 2007

Laptop

Finally my new Asus G1S has arrived today, so I did absolutely no work on my project today. I spend the day installing the new laptop so i could work on my project on that. I am now installing Visual Studio 2005 Team Suite, I knew there were some problems with the compatibility with vista. What I didn't expect was that these would start in the install. Some times it can't find a cab file on the iso file while I know it's there. For now the only option seems to mount another cd image and that just failed as well. Apparently one of the cab files was corrupted, well lets see if the the pro version will install. I'll get back to this tomorrow.

Saturday 1 December 2007

Ice hockey

A frend of mine convinced me to go ice hockey tonight. Man that sport is though, it's good but though.I have never skated on ice that was just prepared by a machine, thats slick stuff. I can skate but on this ice i really needed to find my balance again. Might also had to do with the fact that you are wearing full body armor. I mean you are really suited up, and try to get a jersey over your head when wearing it is no fun.
Although i had already skated there last Saturday for fun. Bad ice that day to much marks in it, couldn't even attempt a hockey stop. Today hockey stop was easy, although trying it with a stick in my hand was a new thing to do.
Tried something new todat too goping in a circle backwards and trying to speed up. Ow yeah and it's murder for your back.

On the laptop fron it still hasn't arrived god**** it, think i'll be calling the company monday or tuesday. So they can inform me where the thing is stuck at, it's really agravating me cuz they said it would be here in 2-3 working days on wednesday.

Friday 30 November 2007

Gunturrets work

Just finished implementing the gun turrets, we now have enemies in the map. Although work is a big word the render thats all for today.
Ow and I fixed a nasty memory leak in my particle system today without having to redesign it all.

On the laptop front of things they haven't come by my place today sadly enough hope they will deliver it tomorrow. Other wise i got more waiting on it to do and i don't want to wait.

Wednesday 28 November 2007

Particle Systems Continued

I changed the particle system slightly it now more resembles the nebula devices one. Although mine still does the interpolation on particle level instead of on emitter level. If we do it on particle level it looks a lot nicer than on emitter level. Here is a screen dump of a fire effect:

If the particle size isn't set you get a nice effect as well, this happens because particles are then spawned with a infinite size. Here is an example of that:

Side note on the laptop I got a mail today that they got it and are sending it to me today. Yay I am really happy to get this one no more dinners at 23:00. I can eat at normal times again and still do some work.

Tuesday 27 November 2007

Laptop Confirmation

Today I got the confirmation for my laptop, it will arrive at Laptops4u tomorrow or Thursday and then they will ship it to me. Next week I'll have my new laptop, finally i can work at home on my ACW. Too bad it's due in two and a half weeks, still might enable me to get shaders to work in the 2 weeks remaining. As of now I have texturing and point lights working through vertex and pixel shaders. Spot lights are hard to implement in shaders. The problem with shaders is they are not debug-able which makes it kinda hard to write them. Although the result is a lot nicer than the fixed function pipeline behavior. Planes can now consist of 4 vertices's and still light will look good on em instead of the hundreds of points I am using now.
Here is another particle system effect:

Monday 26 November 2007

Long overdue post

Ok this post is long overdue and it's about all the crazy stuff thats going on on Fridays over here.
This story starts on halloween when we got invited for a party that on the last minute didn't happen. Lucky for us there was another party going on somewhere else. When we walked in to this party, of course we weren't invited but who cares, there were only girls there so we felt well this is gonna be a good night. After we were in for 5 minutes this girls comes up to use and starts yelling at us we we weren't dressed up, and what we were doing there. This lasted for a bout 10 minutes and afterwards we actually had a good laugh with her. This night ended a bit weird though.

The next party was that friday at asylum the night lub an campus it was an ISA party, you know the society that signed me up by having a party, good way to get members though. This was a weird night as well as i couldn't get drunk that night and I was drinking double vodka shots. In retrospect though i might have switch to hard liquor to early that night.
To continue the next week we crashed a party again, he sounds like we are getting good a this thing here. This party turned out to be a birthday party, we a group of about 20 people just walked in and started drinking. Here one of my friends try to climb a wall, more accurately what happened was he walked into the wall. He ran up to it and jumped but couldn't get high enough so he sacked into the wall.
This is also the night the legend of the giraffe was born. See picture blow the guy eating the leaves.

Then finally we come to two weeks ago this was a crazy night as well, also the most expensive one I have been on here. 7 quid 50 for 2 shots of brain hemorrhage. This was just basicly a pub crawl that ended up at some friends house were I saw the greats pile of dishes ever.

As you can tell i don't really remember everything that happens on Friday nights here but thats just because we start to early.

Sunday 25 November 2007

Particle Systems


Today i got the particle system for the end sequence of the game done. Although done is a big word as it still massively memory leaks, but we brush that aside for the moment. The particle system also serves another purpose in the game, as lasers hit a wall there will also be a particle explosion. The only things left to do for the ACW now are:
  • Recording and play back functions
  • gun turrets
  • Alternate 3d person view
  • and HUD
Need to pitch a game idea tomorrow, and it has to do with the environment. During Christmas I need to make an A1 poster for this idea. The idea is to have an adventure game to build a bio diesel gas producer and a car to run it on. Then the end of the game is to race it as environment friendly as possible. It's not a grand and great idea but it will have to do.

Friday 23 November 2007

Multi texturing

Finally I got multi texturing working!!!!!!!!!!!!!!!!
The problem was that I was calling the wrong function to set up the texture stage, instead of calling glActiveTexture is was calling glClientActiveTexture. The last one you use when you tell GL where to find the texture coordinates. Well enough tech talk here is how it looks.

Wednesday 21 November 2007

Lasers and Scorchmarks

In the last two days I revised the switches they now look a lot sharper, added lasers and their scorch marks. While doing the scorch marks I also figured out why multi texturing wasn't working, OpenGL demands two vectors or arrays of texture coordinates. So we can't reuse the texture coordinates from one stage to use in the next stage, which is a pain. Or if some one knows how to please let me know because that would make things look so much nicer. As for now the only place I use multi texturing is in the scorch marks, they have a color and an alpha map. There is still something wrong with them as the are effected by the material of a laser, although before I start drawing them I reset the material.

On a side note I ordered a shiny new laptop last week a ASUS g1s. It still hasn't arrived but it should do in the end of this week or beginning of next. This machine is the most money I have ever spend on a PC or Laptop. It's gonna be sweet to have it though means I can go home earlier in the day and work at home instead of being in the labs all the time.

Monday 19 November 2007

On the ACW

I didn't really do that much last week I implemented the lasers and switches although they do not really work with collision detection yet. I also saw today that I have to redo the geometry for the switch because they look like shit. Here is a screenshot of it.

Just saw I need to increase the size of the lasers because they are really small.

First Shader

We had a lab on shaders this morning, although only vertex shaders. They are nice to work with if you use version 2 or higher, the assembler ones are horrible. They do give nice effects but to program in assembler is just not nice especially if you compare them with GLSL or HLSL. It's like comparing asm to C++, I like the higher ones more. Here is an example of a vertex shader and it's output.
//c0 = matrix
//c4 = colour
//c5 = lightpos
//c6 = another color
//c7 = lightpos
//c9 = scalar constants

vs.1.1 // version instruction

dcl_position v0 // declare register data
dcl_normal v4 // v0 is position, v4 is normal
dcl_texcoord0 v8 // v8 is texture coordinates

mov oD0, c4
//mov oPos, v0


m3x3 r0, v4, c0 //transform normal

mul r6, v4, c7.x
add r6, v0, r6
m4x4 oPos, r6, c0

//m3x3 r1, c5, c0 //transform light pos
dp3 r1, r0, -c5 //dot product
mul r2, r1, c4 //multiply dot product with lightcolor

dp3 r3, r0, -c7
mul r4, r3, c4
mul r5, r2, r4
mov oD1, r5 //move to output

m4x4 r7, v0, c0
mul r7, r7, c9
mov oT0, r7

As you can see they are not nice to look at although the outcome does look nice. This shader transforms and lights and does a texture map for the skull mesh.

Monday 12 November 2007

Again bursary

Just found out that I have to go to Bradford on Thursday to comply with this bursary thing. Next week I will finally get my money :), that means the next day or so I'll probably buy my macbook pro. Finally got a pc that works here lol.

Friday 9 November 2007

First Version

Here is the first installer. Remember I am not sure what the hardware requirements are at the moment. You need to have a joypad connected to fly through the application. The main.exe is located in the install dir and then the bin folder. There is only one .exe and you should double click on it to get it to work. Please download both files. If you have a rapidshare account you can download it, at the moment i can't find anyplace on the web I can place it so people can download it. If you now of a place place tell me in a comment.

http://rapidshare.com/files/68564643/InstallSpaceSim.msi.html

http://rapidshare.com/files/68564644/setup.exe.html

YES it has collision detection

The axis aligned Bounding Boxes now do correct collision detection. The problem I had was that i was calling the wrong function, instead of calling intersectMovingBboxes, which checks if a moving boxes collides with a stationary, I was calling intersectBboxes. The later just checks if two boxes collide and if you do that for every box in a map it collides. This happens because the camera is a moving entity and it moves beyond a max value in a BBox and the function just checks for that. The new function takes into account in which direction you are moving. Just need to fix the camera to return it's up vector and collision detection works as expected. If I get it working I will put a installer up for you to test. Remember it's still a work in progress. Tests have only been done on game labs pc's so i don't know if it will work on others. The specs of these are: AMD X2 5600+ dual core, 2GB Ram, NVIDIA 8600GT. But 32MB of Ram should be enough to run the program, don't know about the Video Memory though so to be save go for a machine with at least 64MB

A piece of Code

As asked for in a comment by Walter here is a piece of code, it's the draw code for the forcefield which is sown in the previous post. The forcefields is a class that has a draw method and this is the code for it.
[code]
void ForceField::draw(float elapsedtime)
{
glEnable(GL_TEXTURE_2D);
glMatrixMode(GL_TEXTURE);
if (m_texturespeed < 1.0f)
{
m_texturespeed += 0.01f;
}
else
{
m_texturespeed = 0.0f;
}
Matrix44 m;
translate(m, m_texturespeed, 0.0f, 0.0f);
glLoadMatrixf(m.transposed().m());
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
TextureManager& tm = TextureManager::getInstance();
tm.activateTexture("..\\Textures\\ForceField.bmp");
//glTexEnvf(GL_TEXTURE_ENV, GL_COMBINE_ALPHA, GL_MODULATE);
glDisable(GL_CULL_FACE);

glMatrixMode(GL_MODELVIEW);

glPushMatrix();
glTranslatef(m_position.x(), m_position.y(), m_position.z());
//translated.writeM();
m_forcefield.draw(elapsedtime);
glPopMatrix();
glMatrixMode(GL_TEXTURE);
glLoadIdentity();
glMatrixMode(GL_MODELVIEW);
glDisable(GL_BLEND);
glDisable(GL_TEXTURE_2D);
glEnable(GL_CULL_FACE);
}
[\code]

Forcefields, sliding doors and rotating blades

Two days ago I implemented moving objects in the map. I needed them to react with a material especially the forcefields as they need to seem to glow. The problems I had were that my vector that stores them wouldn't accept a change in the data if I gave it. Today I made the forcefields have a moving texture it looks like this.On a side note I also fixed the placement of the bounding boxes. As I fixed my matrix class to work with OpenGL I can now make my own transform matrices and use them. This enabled me to pre-transform my plane vertices and then calculate the bounding box on them. So I don't have to transform the existing Bounding Boxes and as this is done at load time it saves me a multiply in the render state.

Friday 2 November 2007

Spot lights make it look sweet

Finally I got the spotlight to work as it worked out there was another error in my light class :(. Hate these sneaky bugs hitting me. I finally got the outside of the space station done, we can now fly in to the space station from the outside. Here's the latest screen shot:
I changed the textures because they didn't look as good as they do now. The light you see is from a spotlight in front of the spaceship.

Thursday 1 November 2007

Let there be light

He said and there was. I made a mistake in my light class that made my light behave in an unexpected manner. Besides the normals of my Right, Floor and Back faces were inverted, by fixing it all it now looks like this:
I now also output the amount of vertices's that the whole scene contains, and back face culling is working. To get that to work I needed to change the way a front face is detected in GL. I had to change it because my faces are created by one function and then just rotated and translated into place.

Monday 29 October 2007

Finished redefinment of the map

Finally got the tedious work done, next up moveable objects and forcefields and collision.
Here is a screen shot of how the outside looks textured:

The Level

I basically redesigned my entire map file again, the decision I made to go to 2 vertexes per plane didn't work out sadly. Would have saved a lot of load work, so I am back to my original design. Only this time I don't have to put normals or texture coordinates in the map they will be generated through my face class. I wrote a wrapper for it so that is rotates and translates the map in to place, might still want to add this functionality to face later on, but for now keep it where it is.

Here are some screen shots:
First corridor:

Second corridor:

Sunday 28 October 2007

Textures work continued

I redesigned the how the textures work, in the previous design I just loaded them straight from file to a texture in system. I added a texturemanager that checks if the texture hasn't been already loaded, if it has it doesn't load the file again. The program still has to ask the texturemanager if the file already exists otherwise it will just be loaded. Hmmz that's actually a good point to improve on if i have time later on. Now i need to fix my map file or face creater again because the map isn't loaded correctly. And I think I have a nasty little bug in it, because if CPU usage goes to 45 to 50% on a dual core system it crashes. I mean control will no longer respond although if you hit the cross the program exits without a failure.

Some screen shots follow below. The screen shots include fullscreen textured and wireframe and the windowed versions. The yellow polygons seen in the screen shot is the way the the map should look.

Fridays house party


So i went to my first house party around here, and they are different from back home. Here you have to bring your own beer instead of paying 5 Euro's to get in and drink as much as you can.
The houses here are small so almost all of the visitors were standing outside and messing about. A friend of mine climbed the rain pipe, he is always looking for things to climb. Here are some crazy pictures of the party and some of the T-shirt in a brick I forgot to post em previously.
I seem to be unable to post pictures today something is wrong with the software so I'll post them as soon as I can.
Luke:
Manuele:

Thursday 25 October 2007

Textures Work


It's coming along nicely yesterday i finished my Bounding Boxes so we can start to implement a collision detection algorithm in a few days.
Today I got textures working, it took me a whole day where I was expecting it would only take 30 minutes maximum. OpenGL is where things get really different from DirectX which I am used to0. I like the D3DX function for loading a texture more, at least they build the mipmaps for you. Here if i forget a call to gluBuild2DMipMaps things wont even show a texture.
Here is a screen shot of the state my project is in now.
The next thing to do is let my map file include which textures where to use. Step after that will be add Normals to the map file so the Fixed Function lights will work. So much work to do and so little time to do it in.

Wednesday 24 October 2007

The map

Finally got the program to load my map file. It now works as I had expected it to work. Also finished my INI file reader so i can read settings form a file into my game. This also kinda got me back on schedule. with only a week or 7 left it's gonna be a lot of work to go through.

Tuesday 23 October 2007

First View of my Level

Yesterday I made the map file for my space simulation game. The object of the game is to fly through some corridors and pass some barriers. After you have done this you will come in a Core room where you need to blow up the reactor.

The map file is read in but there are still some render errors in it that I need to fix. For now I just hard coded the planes of the level. I gave all corridors a different color so you can see how it is laid out. I know one corridor isn't in the correct space and am gonna correct this later one tonight.

Here are the first screens shots of the level.

T-shirt as a brick

Just went to a Microsoft lecture and got a free t-shirt. The T-shirt is packed as a cube that's 5cm x 5cm x 5cm.

In the instruction, which is a piece of paper that's packed with it, they tell you to just add water to a brick and it will give you a T-shirt. They could have made the drawing a bit clearer so that you immediately know it's unpack this cube and add water it's a funny picture though will add one later.

The lecture the gave was kinda boring it was more a way to sell the company to students. I was expecting a bit more of an in depth talk.

Saturday 20 October 2007

St. Patrick's day

I think I made some plans yesterday to be in Ireland on St. Patrick's Day.

Dave (an Irish course mate) invited some of us to come over to Ireland on St. Patrick's Day to get hammered for a week.

Friday 19 October 2007

Camera

The camera is finally working. It now pitches up and down as specified and rolls and even yaws the correct way.
The only problem I know still need to fix is the movement of the camera. As it now only moves along this axis (0,0,z). It needs to move in the direction we are looking at.

It's good I am writing this blog cause it gives me time to think about my problems and come up with a solution while writing.

For the movement I am going to need a direction vector thats giving me the direction I am traveling in. If we transform this direction vector to the way we rolled, yawed or pitched we are moving in the right direction.

Here is a screen shot of how the scene looks today.

Edit it's been a few days since I posted this and my camera is still not working. If I needed to do this in DirectX it would have worked in an hour. I hate OpenGL for not having a notion like a camera.

Thursday 18 October 2007

Step into

The step into functionality in VS 2005 seems to be not working for me this is really driving me crazy because this halts all my development on my project.

There seems to be no way to resolve this problem, well lets hope someone on the msdn formus knows how to fix this. Sorry for writing this boring post but i needed to vent my frustration.

Wednesday 17 October 2007

It's drawing and the game pad works

Finally got something to show for all the work I have been doing the past couple of weeks. I got my program to draw stuff to the screen yesterday. These are the triangles you see in the screen shots.

And today I just got the game pad to work with my application. It's really funny to do this now i am finally getting somewhere with my coursework. Now if the network administrators would give me the repository I am waiting for, I'd be totally happy.

The image to the right is the first screen shot i took, the image below shows where i moved the rectangle to.

The color change is due to a button that's being pressed.

Monday 15 October 2007

Bursary continued

I accepted the bursary, so I'll be here until christmas '08. The nice thing about this is it will give me a place to work at. I hope it's at some high end game studio so I can get some real experience in how these guys go about there stuff.

Friday 5 October 2007

Bursary

I have just been offered a bursary for my studies. If I accept it the games companies in this area are gonna give me £3000. The only catch about it is that my dissertation needs to be done at one of those companies. And it will be longer I need to stay in Hull until next Christmas for this. Then again this isn't even that big of a catch because they are gonna pay me during my dissertation stage.

I have to let my supervisor know what I'll do about before Monday but it think I am going to do this. It solves a lot of cash flow problems that might arise this year.

Wednesday 3 October 2007

Second and third lecture and first lab

Well i had to lectures yesterday one was in C++ programming and Desgin, the other was in Real Time Computer Graphics.
In the first lecture the prof basicly introduced use to all the basic elements of C++. Wasn't that hard but he warned it was gonna be in a few weeks. He also asked who felt like a good programmer at the start of the lecture. Most of us put there hands up, at the end of the lecture he asked the same question and almost none of us put there hands up. This had more to do with respect for the teacher and feeling we couldn't match his knowledge, than beeing humiliated.
The second lecture was about Graphics, this was actually a pretty cool lecture because he showed us a lot of game trailers. He also told us what the project was going to be for these two courses.

We have to write a spaceflight simulator that's going to destroy a spacestation.

The tutorials we get are hard but good because we are getting up to speed really fast so we can start our projects. The 5 C++ tutorial was a bitshift one which is not that easy to understand.
The OpenGL ones are a bit nicer and go a bit slower.

Monday 1 October 2007

First Lecture

Just had my first lecture about game development and architecture.
Basicly it was just a layout of how our course is going to be and what we can expect of it. During the lecture the teacher showed us some of the projects people did in the previous years.
They actually look really professional, so I'm wondering what my skill set will be at the end of this course. I hope I can managed it all because I think it's gonna be really demanding of me.

Wel tomorrow is the next lecture it will be about C++, lets see how good I really am at it.

Sunday 30 September 2007

Irish pub


I went out to an irish pub last night. It's totally different from back home. As we have a mix of old and young people in these bars here they only have old people in em on saterday. Besides they even listen to some sleepy music.
After the irish pub i went to a bar were only people from the age 30 to 40 go. It's funny to see a totally different crowd that has a night out here.