Friday, 14 October 2011

Update

Yeeaaahh... so Got drunk last night. Still recovering,

I'm drunk right now.
No programming Today,
Geez, did this dev blog just turned into my personal shitrant?

OK.OK.
- Implemented  the mouse-to-openGL modelview but the calculations for the angle are completly wrong.
It keeps saying I'm at -2 to 3 angle accoring to mouse.
- Need to fix this.

Thursday, 13 October 2011

Update

- Figured the theory behind the projectiles trajectories. This is not done with the line algorithm at all.
It may have worked for the past projects, but the bullet animation code needs to be completely rewritten.
Gonna go buy beer now and go home. If any luck I'll finish it today.

Tuesday, 11 October 2011

Update

- Implemented proper Weapon object. Weapon object texture now properly follows the player object.
- Implemented the bullet system. Bullets are now generated when user holds left mouse button.
- Implemented the AssetManager object. Objects are now created by AssetManager.
  This was done to prevent each object to load from disk separately. Before, each object created  would load from the file for every object on the screen (or in memory).
AssetManager now only loads each resource (asset) once and if a 'wall' or a 'building' or a 'road' itd... needs to be created, AssetManager creates a copy of it's template object and returns a pointer to it.

- Need to implement ray picking algorithm so I can properly know where my mouse position is on the scene.
- Need to find replacement for Bresenham line algorithm as it doesn't deal with floating points.

@offtopic
You just have to love that Broken Sword subtle humor.

Lady Piermont: Good heavens you're a private detective?
George: That's correct ma'am.
Lady Piermont: What's the term you Americans use?
Lady Piermont: It's on the tip of my tongue.
George:I believe what you're thinking of is...Dick.
Lady Piermont: Precisely!

Thursday, 6 October 2011

Update

- Fixed texuring bug where each object could have only one texture for each face.
- Restructured the model file format. Now its not just ugly set of vertices but nice faces,textures,points.
- Rewrote the model load code to support new model format.
- Fixed a bug where player would teleport to somewhere if collision was detected before x value would kick in.

New model loading 0.1.7.1

- Implemented Zoom In / Zoom Out funcionality to the engine.
- Added new texture to the sides of the building.


Zoom In


Been playing Broken Sword - Shadows of templar recently. Brings me back. Not exactly healthy to play it in the middle of your programming sessions considering it's an advanture but I find it relaxing at times.
Grab it for free on Good Old Games. Woops. Offer expired. I'm glad I grabbed it while it was free.

Wednesday, 5 October 2011

Update

1.7.0
(meh, screw dx for now)

- Fixed text positioning and made a panel class which supports multiple lines and colors.
  I'm using FTGL library atm. for text output.
- Need to add background at the panel.

- Implemented some pretty basic collision detection. No fancy stuff, just basic bounding box collision.
- Implemented weapon object.
- Implemented projectile object.

ISP cut off my internet connection few weeks or so and I'm programming blindly atm. Feels a bit nice. Reminds me of the days when all you got was a few .doc documents and IDE and you had to figure it all by yourself.
I have troubles making FTGL work at this computer so I can't show anything new. I'll get some screenshots when I get home.

[EDIT]

Screenshot from 0.1.7




Rough draft of the playing arena scheduled for 0.2.0 build.

Tuesday, 13 September 2011

Update

Going to try directx now.

[edit]

Decided on DirectX as SDK. OpenGL is nice and can be picked up pretty easy but the amount of work it needs to be done and use of 3rd party libs for basic stuff doesn't go well with me.

Monday, 12 September 2011

Update

[RANT]
Fuck text positioning and fuck OpenGL.
[/RANT]

I'm seriously considering migrating to directx.

Saturday, 10 September 2011

Update

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.

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.

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.
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.

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.

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.

Thursday, 3 February 2011

Mastering Ogre

Still learning Ogre3D.
Panel class is almost complete but there's a bug where I can't put more then 1 line of text on the panel.
No SCS at this time.