So, I finally solved a major bug today! I didn't do any depth testing for my scene! :P Turns out, you'll have to provide an FBO with a depth buffer in order for it to do depth testing, for some reason this didn't strike me as obvious, even though it is! :P Thanks Stefan for pointing this out!
As a r…
As a r…
I added detail texturing to the terrain. What I did was add another texcoord set to the terrain (which in 3.1 is just another attrib in the vbo), and mix that with the base terrain texture.
In L3DT I have exported a 4k x 4k texture map, normal map and attribute map, while the heightmap is only 128 x…
In L3DT I have exported a 4k x 4k texture map, normal map and attribute map, while the heightmap is only 128 x…
Last week I did a lot of ad-hoc coding, just to get features in. This week I started to do some cleanup of that code, moving code into more generalized APIs.
I added a uniform interface for the shaders, and did the same thing with textures. When I add a texture to a node now, I also have to tell whi…
I added a uniform interface for the shaders, and did the same thing with textures. When I add a texture to a node now, I also have to tell whi…
After a bit of work, I finally got my bloom post-process filter to work!
The way I do it is to render the bloom in 4 passes, rendering a screen-sized quad with the texture every pass.
First I render the scene to a texture that I slap on a quad, then I render the quad, sending the generated texture to…
The way I do it is to render the bloom in 4 passes, rendering a screen-sized quad with the texture every pass.
First I render the scene to a texture that I slap on a quad, then I render the quad, sending the generated texture to…
Fixed up some small details.
The tree is made up of two vertical planes + some horizontal planes. The lighting became all strange due to the vertical planes and their normals. I added a hack/fix in the vertex shader so that if it's a vertical plane, the normal will face up.
Also added an attrib map f…
The tree is made up of two vertical planes + some horizontal planes. The lighting became all strange due to the vertical planes and their normals. I added a hack/fix in the vertex shader so that if it's a vertical plane, the normal will face up.
Also added an attrib map f…
Started an experiment today implementing shadow mapping.
Here's some code excerption (beware that there are probably some hacks in there right now):
Two renderpasses:
Here's some code excerption (beware that there are probably some hacks in there right now):
Two renderpasses:
glBindFramebuffer(GL_FRAMEBUFFER, fboShadowPass); //Rendering offscreen
{
//glViewport(0, 0, depthShadowMapSize, depthShadowMapSize);
…
Turns out my light direction was way off...
Here's what it looks like now
Here's what it looks like now
glUniform3f(glGetUniformLocation(node->getShaderProg(), "DirectionalLight1.direction"), 0.0f, -0.8f, -1.0f);
glUniform4f(glGetUniformLocation(node->getShaderProg(), "DirectionalLight1.ambient"), 1.0f, 1.0f, 1.0f, 1.0f);
g…
As with all programming tasks that break into new domains, investigation and searching for papers/discussions of the topic takes much more time than actual coding.
I rather quickly added a water plane to the mix, where I in the fragment shader make sure that the texture tiles.
I've read some about gr…
I rather quickly added a water plane to the mix, where I in the fragment shader make sure that the texture tiles.
I've read some about gr…
So I've worked some more on the integration of shaders. Turned out that the normal map needed to be inversed for normals to point the correct way in the image below, which is why the result was so "ambient" :P
I now seperated the code into one shader I call bump, which only cares about the normals i…
I now seperated the code into one shader I call bump, which only cares about the normals i…
I started the shader implementation today, starting with a bumpmap shader.
It doesn't look any good at all yet, because I have no real normal maps :P I haven't spent any time on a good placement of the light yet either (only use a simple directional light in the shader for now).
I've optimized some c…
It doesn't look any good at all yet, because I have no real normal maps :P I haven't spent any time on a good placement of the light yet either (only use a simple directional light in the shader for now).
I've optimized some c…
I'm almost there with the rewrite to OpenGL 3.1 now...
I haven't quite got the picking to work again. I adapted the Mesa gluUnProject into my own camera code, but there's something wrong here... not 100% sure what the modelView matrix should be here... I only have the view matrix from the camera as …
I haven't quite got the picking to work again. I adapted the Mesa gluUnProject into my own camera code, but there's something wrong here... not 100% sure what the modelView matrix should be here... I only have the view matrix from the camera as …
Yeah, I've been doing major rewriting these last couple of days, disabling rendering and all due to how deep changes that had to take place.
I'm now calculating the projection, view, model/globalTransformation and normal matrix myself, and have added a minimal shader that place the vertices using th…
I'm now calculating the projection, view, model/globalTransformation and normal matrix myself, and have added a minimal shader that place the vertices using th…
So last week was cleanup week. At crunch-time I noticed some issues that I listed in the report of delivery, and I went through that list and did some changes.
I didn't get time for all of them, because RL got in the way some.
1) I ended up implementing a lib3ds wrapper. Rewriting the ms3d loader int…
I didn't get time for all of them, because RL got in the way some.
1) I ended up implementing a lib3ds wrapper. Rewriting the ms3d loader int…
So I've started to work through the list of optimalizations and bug fixes I want in place before I move to the shader implementation.
First thing I did was to attack #2 on my list. I implemented a renderInfo factory that checks the nodetype and makes sure that the same node type only get a reference…
First thing I did was to attack #2 on my list. I implemented a renderInfo factory that checks the nodetype and makes sure that the same node type only get a reference…
So the project now continues in a second project. We're to rewrite the game into following a strict OpenGL 3.1 core model (GL3/gl3.h). Finally we're allowed to use shaders! It's been hard staying off the temptation!
I'm thus reading up on the 3.1 spec. I already handle all transformations for my sce…
I'm thus reading up on the 3.1 spec. I already handle all transformations for my sce…
So the first tower defense project has now been submitted. Phew did the time just run away today as I was grinding in features to make the game more complete!
Today's list:
- Animated health-bar
- Factory instance handling and recycling with instance pool support
- Death handling
- Per-component death r…
Today's list:
- Animated health-bar
- Factory instance handling and recycling with instance pool support
- Death handling
- Per-component death r…
So, I worked and hosted a party yesterday. Got zero work done. Today I woke but with a headache. Perfect start of the last day of crunch before the project must be submitted.
I have approximately 9 hours left now, and a long list of features. Hopefully I'll get pretty far on that list, and hopefully…
I have approximately 9 hours left now, and a long list of features. Hopefully I'll get pretty far on that list, and hopefully…
So, I've been coding half asleep this night. I felt that I had to get back in the railgun code, so that the towers would visualy fire at critters that enters their perimeter. This code also handles gameplay logic in terms of damage, accuracy and targets. I've changed up the structure a little bit f…
Today I worked back in collisions with quite a few improvements to the collision engine. I also added back in the perimeter object for towers. Won't be long now before I have towers shooting at those critters with an abandon again, but I didn't want to rush it! So, hopefully I'll get another hour o…
Like I said in the first post about this project, a friend of mine was kind enough to build me some modular models for the towers. I finally got around to implement them now. This is only a first test with no upgrades, no rotating heads and now shots fired, but thought I'd share the progress :)
So after a long day of patience and bug tracking I tracked down those little critters!
First where some minor bugs in the way I did the pathwalking stuff and the core waypoint system, guess I was tired yesterday! But the main issue though was in the way I handled transformations per node. Up until t…
First where some minor bugs in the way I did the pathwalking stuff and the core waypoint system, guess I was tired yesterday! But the main issue though was in the way I handled transformations per node. Up until t…
So I got a friend of mine, Bjorn Hurri, to make a speedpaint for the project that I can place on the main menu and different menues to add some atmosphere and consistency. Thanks a lot Hurricane!
I've been struggeling some with my pathing today. I got the loading off of the texture data to work pret…
I've been struggeling some with my pathing today. I got the loading off of the texture data to work pret…
Ugh! Turned out that implementing the game state system into my current codebase quickly got messy. Tons of strange bugs started to errupt. Also, I found that alot of garbage code and inconsistency had creeped into my project over time. Thus I decided to do a complete rewrite of the project from gr…
Turned out that my engine wasn't really ready for the game state management implementation. Things quickly started acting strange when I switched, displaying all kinds of odd problems. I realized quickly that this would require some from ground up refactoring of how some core systems work in order …
As a small escape from Tower Defense I updated my component-system a bit. Partly through usage and partly through community feedback I've been changing the source over time, and finally found time to complete the implementation for a new release.
Savuporo, over at Ogre3D forum, was so kind to provid…
Savuporo, over at Ogre3D forum, was so kind to provid…
So, I finished up the very basics of a tower defense game today. I added in win/lose conditions today. Now, the player still spawns the mobs manually, so I guess it's not completely a basic tower defense game... but I wanted to move on to the screen handling before I went there, there's certainly e…
So yet another day of work on this school project, and it's starting to shape into an actual game finally!
I refocused my efforts a bit on trying to get the most basic parts of tower defense together first, so I put on hold the GUI work for tower upgrades and focused on more important tasks.
Today I …
I refocused my efforts a bit on trying to get the most basic parts of tower defense together first, so I put on hold the GUI work for tower upgrades and focused on more important tasks.
Today I …
So, today I did some cleanup after all the refactoring. Tons of code that was either commented out or partly commented out went into the garbage can. I also made the boundary circle only render in debug mode (though the perimeter circle for towers still remain for the time being).
I fixed my death c…
I fixed my death c…
In a class at school we're doing a Tower Defense game now, and I've been trying to stay focused this time instead of getting carried away with all the fun stuff.
The class i seperated into two projects, each counting 50% of the final grading. In the first project, which is running now, we will focus…
The class i seperated into two projects, each counting 50% of the final grading. In the first project, which is running now, we will focus…
Component-based Entities using Properties
Introduction
This is my second public design for using compoents with entities to prevent deep hierarchy problems and make the game object difinition more data-driven. By data-driven, I mean that you can define your game objects in for example XML.
Third party…
Introduction
This is my second public design for using compoents with entities to prevent deep hierarchy problems and make the game object difinition more data-driven. By data-driven, I mean that you can define your game objects in for example XML.
Third party…
Advertisement
Popular Blogs
Advertisement