Got to the point at which the console txt output doesn't cut it anymore. I need to see the coordinates of the player and the objects on screen. It's easier that way. And it's about time I do it.
So I'm gonna implement some basic text panel object before continuing with the collision detection.
[EDIT]
- Done with the text putput. Decided on FTGL lib.
- Still need to fix text positioning.
Saturday, 10 September 2011
Friday, 9 September 2011
Update
OK. I'm done with the design of the collision detection for all the objects in the game.
It took a while because I wanted to do it right so I don't have to go back some time and restructure the code.
This way I figured how to handle wall, player, bullets... etc collisions and still implement different behavior for each object if collision happens. The bad news is I have to restructure a code a bit but no biggie I intended to do that for the model loading part anyway.
[EDIT]
So. I managed to restructure a code the way I like it. But the current level of mesh manipulation required to write some static model loader. So now all of the geometry is in the files which are being read at the start.
This way is easier to test and implement collision.
- Implemented Model loading object.
- Implemented Bounding boxes for use in collision.
Model loader still need work as it currently does not load multitextured objects.
[EDIT]
- Fixed the model output for different textures each.
- Added player.
It took a while because I wanted to do it right so I don't have to go back some time and restructure the code.
This way I figured how to handle wall, player, bullets... etc collisions and still implement different behavior for each object if collision happens. The bad news is I have to restructure a code a bit but no biggie I intended to do that for the model loading part anyway.
[EDIT]
So. I managed to restructure a code the way I like it. But the current level of mesh manipulation required to write some static model loader. So now all of the geometry is in the files which are being read at the start.
This way is easier to test and implement collision.
- Implemented Model loading object.
- Implemented Bounding boxes for use in collision.
Model loader still need work as it currently does not load multitextured objects.
![]() | |
| Snapshot from the 0.1.6.3 demonstrating bounding boxes on models. |
[EDIT]
- Fixed the model output for different textures each.
- Added player.
Friday, 2 September 2011
Update
- Added the player and player texture placeholder.
- Limited the game logic update to 60FPS. What it does is that it lets the rendering loop draw as fast as possible but still limits the logic updates at specific rate so player movement and interactive stuff will always be limited at 60FPS no matter the speed of computer.
Time for some basic model/player collision detection.
Thursday, 1 September 2011
Update
Deadlines at the RL work. Couldn't do shit this week. I will probably fix texture thingy today or tomorow.
EDIT:
There was a line of code that enabled the MipMapping on the loaded textures which prevented the textures to be shown.
Things are finally back on track.
EDIT:
- Finaly fixed multitexturing stuff.
EDIT:
There was a line of code that enabled the MipMapping on the loaded textures which prevented the textures to be shown.
Things are finally back on track.
EDIT:
- Finaly fixed multitexturing stuff.
![]() |
| 0.1.6.1 |
Monday, 29 August 2011
Update
@offtopic
I was on a 10 day holiday over at my friend's house at city of Kastela so I did a little work on project.
(Nice place. Police came twice. Once, couse one neighbour tried to stab another neighbour with a knife. After they returned from the station they all continued drinking together at which point I thought what the hell and joined in. And another time to take my friend to prison.) Exiting place.
@ontopic
I expect more updates this week.
- Restructured the engine (again). I'm now using some helper functions from OpenGL SuperBible v4 to hande geometry and positioning.
- Those fucking textures wont show again and I'm currently in a process of fixing it. They won't show event if I copy-paste example code along with it's enable/disable shit.
I was on a 10 day holiday over at my friend's house at city of Kastela so I did a little work on project.
(Nice place. Police came twice. Once, couse one neighbour tried to stab another neighbour with a knife. After they returned from the station they all continued drinking together at which point I thought what the hell and joined in. And another time to take my friend to prison.) Exiting place.
@ontopic
I expect more updates this week.
- Restructured the engine (again). I'm now using some helper functions from OpenGL SuperBible v4 to hande geometry and positioning.
- Those fucking textures wont show again and I'm currently in a process of fixing it. They won't show event if I copy-paste example code along with it's enable/disable shit.
Thursday, 11 August 2011
Update
- Scrapped the current rendering engine and started implementing the world in full OpenGL.
- Implemented more fancy engine and model classes.
- Finished with the rendering and movement parts.
- No screenshots yet because it's still very crude. Basically it's only 1 object in the view and world movement.
I'm working on the static world representation for now (positioning of meshes and static world geometry).
Maybe some screenshots when I'm done with that.
Early shot from the 0.1.6 version. Static world geometry with triangle representing the player.
Added model classes for structures, ground, player and camera.
- Implemented more fancy engine and model classes.
- Finished with the rendering and movement parts.
- No screenshots yet because it's still very crude. Basically it's only 1 object in the view and world movement.
I'm working on the static world representation for now (positioning of meshes and static world geometry).
Maybe some screenshots when I'm done with that.
Early shot from the 0.1.6 version. Static world geometry with triangle representing the player.
Added model classes for structures, ground, player and camera.
Wednesday, 3 August 2011
Update
Long time past. So bunch of updates.
Ditched Ogre3d as dev platform. Decided on SDL
Build 0.0.2
Designed and implemented self replicating mechanism in form of blocks.
Blocks are added via right button after which they randomly replicate in every direction except the already occupied position. The red background is actually 64*48 grid of 10px blocks being rendered at the same time.
The Black block in the middle represents the player but is now only an x,y variable. No motion yet.
SDL render engine I built holds quite well getting at 7% of CPU at most.
Build 0.0.3
Added some placeholder background image and added more color to the blocks so I can see the active blocks. (The red ones are currently replicating) Blocks are also decreased in size and are now 5px w/h
Added the player and player movement including the bullets and shooting capability for the player.
Still no collision detection.
I had quite a bit bugs here as you can see. The bullet rendering mechanism has begun to show it's weakness as is unable to render the bullet at the correct speed without flickering and leaving ugly red trails on the screen. On the other hand due to some rendering engine tinkering the CPU now uses 2% at most. Still no collision detection.
The bullet needs to use dirty rectangling or double buffering. Considering the former is NES-age old technique double buffering it is!
Build 0.0.4
Changed the background to something more appropriate because I couldn't see shit on the other pic.
Added pictures for the block rendering and added collision detection.
Still had a problem with image not being refreshed and bullet not being erased from screen. God that bullet not being properly drawn/erased gave me nightmares.
Collision detection is not working as intended. Also if you are checking the collision for every pixel the bullet travels in the line; you're doing it wrong! It seems the CPU % jumps. High. Like fuck you loser I'm gonna stall and crash asshole.
I tried to override it by checking ever few pixels for a collision but as can be seen from It doesn't work.
Added a continuous shooting. (Which is BTW what caused the CPU% spikes.) No more one-click-one-bullet.
Build 0.0.5
Not much here. Some changes on the engine and rendering.
Added basic text support. Increased the size of the player and the blocks because I couldn't see the little fucker anymore. It all became blurry and...stuff. Anyways. Finally fixed the bullet flicker bug. It only took me 3 fucking minor builds!!. Still struggling with that fucking collision detection.
Build 0.1.5
Holy ... this the whole major version build. So what changed?
Firstly, the whole engine is rewritten in OpenGL. Yap that's right. No more SDL rendering. I left the thread and event SDL stuff in because they kick ass but the whole drawing stuff - openGL.
Now everything works as I intended. Even collision detection. Yeah, bullets now don't actually check if they hit something lol. Added basic gameplay and scoring system. Also if you get hit or fly into the blocks you die and is game over. One replicating block is added every 5 seconds after which the time delay goes shorter by 0.1 sec until it reaches 3 second after which it resets to 5 again. Added score also. 1 block 10 points.
That's it for now. Hopefully I will be back with another update soon. And for the stuff to expect? Well, we are going 3d.
Ditched Ogre3d as dev platform. Decided on SDL
Build 0.0.2
Designed and implemented self replicating mechanism in form of blocks.
Blocks are added via right button after which they randomly replicate in every direction except the already occupied position. The red background is actually 64*48 grid of 10px blocks being rendered at the same time.
The Black block in the middle represents the player but is now only an x,y variable. No motion yet.
SDL render engine I built holds quite well getting at 7% of CPU at most.
Build 0.0.3
Added some placeholder background image and added more color to the blocks so I can see the active blocks. (The red ones are currently replicating) Blocks are also decreased in size and are now 5px w/h
Added the player and player movement including the bullets and shooting capability for the player.
Still no collision detection.
I had quite a bit bugs here as you can see. The bullet rendering mechanism has begun to show it's weakness as is unable to render the bullet at the correct speed without flickering and leaving ugly red trails on the screen. On the other hand due to some rendering engine tinkering the CPU now uses 2% at most. Still no collision detection.
The bullet needs to use dirty rectangling or double buffering. Considering the former is NES-age old technique double buffering it is!
Build 0.0.4
Changed the background to something more appropriate because I couldn't see shit on the other pic.
Added pictures for the block rendering and added collision detection.
Still had a problem with image not being refreshed and bullet not being erased from screen. God that bullet not being properly drawn/erased gave me nightmares.
Collision detection is not working as intended. Also if you are checking the collision for every pixel the bullet travels in the line; you're doing it wrong! It seems the CPU % jumps. High. Like fuck you loser I'm gonna stall and crash asshole.
I tried to override it by checking ever few pixels for a collision but as can be seen from It doesn't work.
Added a continuous shooting. (Which is BTW what caused the CPU% spikes.) No more one-click-one-bullet.
Build 0.0.5
Not much here. Some changes on the engine and rendering.
Added basic text support. Increased the size of the player and the blocks because I couldn't see the little fucker anymore. It all became blurry and...stuff. Anyways. Finally fixed the bullet flicker bug. It only took me 3 fucking minor builds!!. Still struggling with that fucking collision detection.
Build 0.1.5
Holy ... this the whole major version build. So what changed?
Firstly, the whole engine is rewritten in OpenGL. Yap that's right. No more SDL rendering. I left the thread and event SDL stuff in because they kick ass but the whole drawing stuff - openGL.
Now everything works as I intended. Even collision detection. Yeah, bullets now don't actually check if they hit something lol. Added basic gameplay and scoring system. Also if you get hit or fly into the blocks you die and is game over. One replicating block is added every 5 seconds after which the time delay goes shorter by 0.1 sec until it reaches 3 second after which it resets to 5 again. Added score also. 1 block 10 points.
That's it for now. Hopefully I will be back with another update soon. And for the stuff to expect? Well, we are going 3d.
Subscribe to:
Posts (Atom)









