Today is a hefty juggle between keeping up with family in town and brushing up on OpenGL lighting, but I'm managing!
Today was mainly getting back into lighting calculations. On top of reviewing how to put uniforms in structures (like glUniform, but attaching to "struct.member" instead of "member"), I also went back over ambient, diffuse lighting, and specular calculations, combining them with materials to produce:
Lighting! I always forget about the calculation of specular lighting with the dot product of the view direction and the direction of reflection. I also re-learned how to take those calculations and apply them to texture maps instead of specific material colors to produce specular and diffuse mapping like in these boxes below. Imagine multiplying the texture sample by the light quantity instead of a regular color value:
What's next? Going back over the main lights (directional, point, spot with soft cone blending) and multiple point lights before getting back into the advanced stuff with the framebuffer. Onward!
An account of pain, struggle, and amusing discoveries found in a man's quest for game programming style and finesse.
Sunday, May 8, 2016
Saturday, May 7, 2016
Spinning Moons
Today wraps up all the capstone work I need to do for break!
Seriously. I think I've finally pinned down most of the warnings that are showing up during the build, and only have some concerns using cached lighting on an elevator blueprint that we borrowed from someplace else that didn't make the conversion too well.
As for studying? Just brushing up on model-view-projection transformations, and when I should make sure to actually use the shader before setting up the uniform loading calculations. The projection is usually a uniform that doesn't need constant changing per frame (unlike model or view movement), so I wanted to keep it out of the main loop. Problem was, the proper shader use method wasn't outside of the loop either. Now we have plenty of moon cubes rolling around the screen over time:
What's next? Fluid and player-input controlled camera movement; then we can get back onto lighting!
Seriously. I think I've finally pinned down most of the warnings that are showing up during the build, and only have some concerns using cached lighting on an elevator blueprint that we borrowed from someplace else that didn't make the conversion too well.
As for studying? Just brushing up on model-view-projection transformations, and when I should make sure to actually use the shader before setting up the uniform loading calculations. The projection is usually a uniform that doesn't need constant changing per frame (unlike model or view movement), so I wanted to keep it out of the main loop. Problem was, the proper shader use method wasn't outside of the loop either. Now we have plenty of moon cubes rolling around the screen over time:
What's next? Fluid and player-input controlled camera movement; then we can get back onto lighting!
Friday, May 6, 2016
Hot New Website Addition
Today was another relaxed day to brush up on fixing bugs and adding some more features from playtesting. The elevator is fixed up now, allowing disabled input to hold the player in place and move the camera while the elevator is moving. I'm also putting in some metrics for our quickstepping, as we're not sure how many people are actually using the thing.
As for website usage? I've added yet another project to the website! Seems as if the VVVVVV project is stable enough to allow downloads of both the source and the game for analysis and playing around. Feel free to check it out here!
If I do a little more work tonight, it will probably be for matrix transformations. Gotta remember how to scale things properly!
As for website usage? I've added yet another project to the website! Seems as if the VVVVVV project is stable enough to allow downloads of both the source and the game for analysis and playing around. Feel free to check it out here!
If I do a little more work tonight, it will probably be for matrix transformations. Gotta remember how to scale things properly!
Thursday, May 5, 2016
And Yet The Build Continues
Just because it's the last day doesn't mean there's no work tomorrow! There's only about nine hours I need to spread throughout break, which is nice since I can focus on some other tasks.
Today was mainly a day to re-check up on the build. The freeze returned again, though the fog was suspiciously back to normal. Reducing the size of the kill volume fixed the freezes out of the picture.
As for an actual bug? Seems that the blocks themselves were still being taken by gravity wells even as they were attached to the gravity well. This causes behavior such as blocks flying up into the air. I will also have to produce more behavior with wells working together, as it may reproduce a similar phenomenon.
Also! I've tracked down the reason why some textures weren't showing up in the build. It's limited to certain textures (still checked out) that were fortunately not too important, so I tracked down and replaced them.
What's left to go? Why not get back into OpenGL?
Today was mainly a day to re-check up on the build. The freeze returned again, though the fog was suspiciously back to normal. Reducing the size of the kill volume fixed the freezes out of the picture.
As for an actual bug? Seems that the blocks themselves were still being taken by gravity wells even as they were attached to the gravity well. This causes behavior such as blocks flying up into the air. I will also have to produce more behavior with wells working together, as it may reproduce a similar phenomenon.
Also! I've tracked down the reason why some textures weren't showing up in the build. It's limited to certain textures (still checked out) that were fortunately not too important, so I tracked down and replaced them.
What's left to go? Why not get back into OpenGL?
Wednesday, May 4, 2016
Last Day: Reignited Faith
Phew! Leave it to an overnight of programmers working hard to make up for weeks of lack of progress. So far the DirectX side is still a little wonky, but we've managed to convert both sides just fine. The DirectX just needed some tweaks to ensure that the sprites had contact with the platform specific game loop, camera object, keyboard, and a texture lookup table since each sprites owns their texture here. Otherwise...this semester is done!
As for plans over break? Time to allocate more capstone hours and actually study some advanced lighting techniques in OpenGL! Hooray!
As for plans over break? Time to allocate more capstone hours and actually study some advanced lighting techniques in OpenGL! Hooray!
Monday, May 2, 2016
Day 114: Final Days
Whoop! We had our final exam! It went over pretty well, actually.
That said, the programming project? I sense that we may only be able to squeeze the bare minimum in (if we're lucky). The amount of time that my other teammates have to actually do their work on this project is quite low.
Throwing them under the bus? ...maybe. They had also assumed we would be able to combine two divergent methods of graphics platform programming (DirectX, OpenGL) in a couple of days, which was sent aside due to the inability for Shared libraries to have define blocks for projects referring to them.
So far input is going smoothly, along with translating everything over to the DirectX side. The frame rate chugged at first, but it seems that enough extra buffer swaps actually fixes it. Why? Not sure.
At this rate, this will probably be the extent of how much content we can get in the game:
Do I feel confident in my teammates' abilities to pull through and bring something worthy for the presentation on Wednesday? Seeing as this is Monday evening...nope. Hopefully this won't turn into a painful lesson for the group about proper time management. As for me? The faster break starts, the better! I've got some brushing up to do on advanced lighting and whatnot.
Sunday, May 1, 2016
Day 113: Collaboration
Today's been an entirely programming project based day, as I worked to reflect the changes from OpenGL Entities to DirectX Entities. Unfortunately we couldn't do different define calls, as the Shared Library prohibited it.
Bright side? We got things loaded and moving! We just had to fix a couple of bugs like positions getting constantly reset:
What's the most difficult part? Getting the DirectX side to work. The entire thing is drawn differently from the way we do the Sprite/SpriteRenderer setup, so I've had to install things like texture names, drawing frames from a spritesheet, and setup sprite width and height away from monolithic applications and magic numbers. Not much I can do until my other co-worker gets onto it. It's the same with collision, as the other one wants to work in Box2D but hasn't been here too much today.
We'll wait and see! I've also got a final tomorrow that I've been studying for. Luck of best!
Bright side? We got things loaded and moving! We just had to fix a couple of bugs like positions getting constantly reset:
What's the most difficult part? Getting the DirectX side to work. The entire thing is drawn differently from the way we do the Sprite/SpriteRenderer setup, so I've had to install things like texture names, drawing frames from a spritesheet, and setup sprite width and height away from monolithic applications and magic numbers. Not much I can do until my other co-worker gets onto it. It's the same with collision, as the other one wants to work in Box2D but hasn't been here too much today.
We'll wait and see! I've also got a final tomorrow that I've been studying for. Luck of best!
Subscribe to:
Posts (Atom)

