Skip to main content

Happy new year

First of all, happy new year. For some, 2009 was the year of the Ox and 2010 will be the year of the Tiger. For me, 2009 was the year of PewPew, and 2010 will be the year of PewPew 2!

In 2009, most of my time was spent on creating the engine and getting to know the iPhone. Now that the engine is done, I am almost exclusively working on the content: I am creating tons of new ennemies and even more levels.
I say "almost exclusively", because I actually did improve the engine. I did an important (though obvious) optimisation regarding the collision system (Chromatic Conflict is smoother now because of that), I made explosions luminous, and I am in the process of adding sound effects.

The light added to the explosions is just an expanding texture (not even billboarded) whose transparency increases until it becomes totally transparent. It's simple, but it looks real good, I can't wait to post a video.

The sound effects are handled with OpenAL. OpenAL enables you to specify the relative position of the sounds, though I don't know yet whether I will use this feature or not. Basically, this feature allows you to changes the volume of a sound effect, depending on the player's position. For instance, the nearer an explosion happens to the player, the higher the volume of the explosion will be. What's even more interesting is that the volume of an explosion happening to the left of the player would be higher in the left earbud than in the right earbud. You can create other effects, such as the doppler effect, but that would be overkill for PewPew ;-)

Comments

  1. Love pewpew, and can't wait for number 2!! Any updates as to how it's coming along? :P

    ReplyDelete
  2. Love pewpew too ;-)
    here's an update:
    http://pewpewgame.blogspot.com/2010/03/pewpew-2s-progress.html

    ReplyDelete

Post a Comment

Popular posts from this blog

PewPew Live's look in a nutshell

Occasionally someone will asked how I obtained the PPL look. In a nutshell: Draw everything with lines, including the text and the various icons. It's a lot of work, but besides looking unique it creates a consistent appearance which is a thing that a lot of indie games struggle with. The lines are screen-space projected lines with miter joins. Draw the lines with additive rendering. This means that if a red and green line overlap, the overlap will be yellow. There are a few things not drawn with additive rendering (like the background of buttons to improve readability), but they are exceptions. Add bloom. There's lots of different bloom implementations. Nowadays I use a bloom that is similarly to the one in  blender's eevee . If you see banding, use dithering. Optional: Add even more post-processing like (very slight) chromatic aberration, lens dirt, scan lines, curved monitor, and vignette. No post-processing, just lines Bloom! Ignore the missing bloom at the top All the...

A general state rollback technique for C++

I wanted to write this post for a while. It describes a C++ technique to implement rollback in the context of multiplayer games that I feel is quite interesting and useful. The tl;dr is: don't bother serializing individual objects, just rollback all the memory. Rollback-based multiplayer I've been working on a multiplayer version of PewPew, and for reasons that are outside of the scope of this post, I chose to implement multiplayer with deterministic lockstep and rollback. The basic idea behind rollback-based multiplayer is that the inputs of players are replicated to all the players. Whenever a player receives the inputs of another player, the state of the game is rolled back to the point where the input happened and fast-forwarded back to the present so that the state shown to a player takes into account the inputs of the other players. Because history is being re-computed, some events get undone. For example, it's possible a player saw themselves taking a bonus, but aft...

Ridiculously cheap depth of field effect for lines

I'm working on PewPew's sequel, for which I've revamped the graphics. Instead of drawing lines directly using OpenGL, each individual line segment is made up of two triangles whose vertexes are computed with shaders. Getting lines in 3D space to be properly displayed on a 2D screen is not trivial. In PewPew's sequel I use the screen-space projected lines, a technique very well described in the  Drawing Lines is Hard  post. The upside of drawing the lines yourself is that you are fully in control, which allows you to implement nice things such as joints, perspective, and even simulate depth of field. https://en.wikipedia.org/wiki/Depth_of_field Usually depth of field (DoF) in video games is implemented using a post-processing step that blurs the pixels with an intensity that is a function of the depth of the pixels. When we are rendering lines, we can approximate DoF directly when rendering the lines by having the vertex shader increase the width of lines and r...