Developer diary

Shadow mapping: soon on github

I began working on putting the shadow mapping tutorial on github, it will be easier to update code & the wiki is quite nice for a tutorial

It’s still a work-in-progress : Github project & Wiki/Tutorial

I began working with some scripts (pandoc) to convert pages to html/pdf so it means:

  • Github will be the work repository for both source code & tutorial
  • Release will be available on this website with Source code (zip) & tutorial (html & pdf)

And of course I will accept pull request on both wiki & project if someone wants to add/change something.

Read more

Shadow mapping: Multiple Render Target

Multiple Render Target

As I said in a previous post I have been working with Multiple Render Target as a test and I have been able to get a working sample based on the Shadow Mapping tutorial.

It means instead of rendering the whole geometry multiple times (1 time per light + 1 final render) it is only rendered once (and position & colors are saved in this step to two separate textures).

It turns out that with the tutorial sample this method is actually slower, as time gained in shadow mapping and render phases is lower than time needed to build the G-buffer.
But if the geometry is more complex (tested by duplicating the scene 25 times) then it becomes quicker.

capture_2015-03-08_21-06-25_0885_ShadowMapping_

So I think I will create a part 5 of my tutorial soon with MRT (or maybe two parts, part 5 being some cleaning and part 6 being MRT), this part will be desktop only as it needs to call some Lwjgl functions directly.

But I don’t know if I will actually use that in my next engine, the scene has to become fairly complex for it to becomes useful (or I need to find some ways to optimize that).

Read more

Next engine, MRT

Next engine

I am currently thinking on the architecture of my next game engine, and first I need to do some studies on the underlying graphical/game engine to be used:

  • Unity 5: it seems to be more affordable now, but every time I read about implementing some voxels in it on reddit it seems only some prototype that rely on “hacks” are developed, when it comes to doing on actual game it is a lot more complex. And second thing is that it is not really linux friendly (game I have tested have some bugs due to Unity, and there’s no editor yet)
  • Unreal Engine: it was already affordable, but now it’s just free ūüôā they are more linux friendly, but I don’t really know if voxel engine could be done, needs more investigations (but I think it will be like Unity)
  • LibGdx: I love this engine, but if I want to do some more complex stuff I might be limited by OpenGL ES 2. For 2d it’s enough but when it comes to 3d it might be too limiting.
  • Lwjgl: I have enough 3d knowledge now to work directly with Lwjgl, problem is it does not support Android, so I will have to drop all android support.

What I might end up doing is a mix between the LibGdx & the Lwjgl solutions, basically I will sometimes have to call directly some Lwjgl functions on desktop, and have some workaround on Android (for example no shadows on Android, but shadows on desktop). And even maybe try to have an OpenGL 3 context in LibGdx (but again just for desktop)

 

MRT

In light of above “solution” I have played a bit with¬† Multiple Render Target today, in order to have them working you need to call a Lwjgl function directly.

So what I did is implement a custom FrameBuffer that supports MRT, basically the initialization method becomes something like:

...
handle = BufferUtils.newIntBuffer(numTexture);
gl.glGenFramebuffers(numTexture, handle);
...
gl.glBindFramebuffer(GL20.GL_FRAMEBUFFER, handle.get(0));
for (int i = 0; i < numTexture; i++)
{
    gl.glBindTexture(GL20.GL_TEXTURE_2D, colorTexture[i].getTextureObjectHandle());
    gl.glFramebufferTexture2D(GL20.GL_FRAMEBUFFER, GL20.GL_COLOR_ATTACHMENT0 + i, GL20.GL_TEXTURE_2D, colorTexture[i].getTextureObjectHandle(), 0);
}
IntBuffer drawBuffers = BufferUtils.newIntBuffer(numTexture);
for (int i = 0; i < numTexture; i++)
    drawBuffers.put(i, GL20.GL_COLOR_ATTACHMENT0 + i);
Platform.instance.glDrawBuffers(drawBuffers);
...

Where Platform.instance is an interface that gets implemented in the Desktop project

import org.lwjgl.opengl.GL20;

public class LwjglPlatform implements IPlatform
{
    @Override
    public void glDrawBuffers(IntBuffer buffers)
    {
        GL20.glDrawBuffers(buffers);
    }
}

And then I can call the different render targets in the fragment shader

gl_FragData[0]     = vec4(1.0,0.0,0.0,1.0);
gl_FragData[1]     = vec4(0.0,1.0,0.0,1.0);

It seems to work fine so far, but I just began playing with that. I began working on a pull request on LibGdx to add cube map support, but sadly MRT being desktop only I think it couldn’t fit in LibGdx, so I won’t include this part. But:

  • I’ll try to come up with a clean version that could be download here
  • I’ll try to update my shadow mapping tutorial to include a part 5 using MRT

Read more

Alien Blitz: site update, update

Site update

I did not update this website for quite some time, most screenshots were outdated, there were missing links, old text,…

So I’ve updated a bit everything with accurate information

  • The press section (alien blitz sub section) is now up-to-date with new screenshots, video, and links. There are also more art in different format if needed.
  • I’ve removed most of the snorms pages, just keeping a smaller one with links
  • Updated alien blitz pages with missing links (the iOs version was not even mentioned) and updated screenshots
  • Updated the greenlight banner, I was using a third-party service but it was quite slow and logo was not working anymore, so I transfered everything on my website directly

Of course I do all this mainly because I want to contact press soon, so everything needs to be cleaned.

 

Update

My last release has been rejected on iOs, apparently it couldn’t start on last iOs version, problem is it is working fine on my end but I was testing the dev version, not the release. So I changed a few things but most importantly I updated LibGdx and robovm, I was a few version behind and there were some bugs corrected since.

It also allowed me to test the beta system for App Store (TestFlight), I just had to generate a new provisioning profile, install TestFlight and that’s it, I can test release build more easily now. So I know the new build I am pushing definitely works on my iPod touch with iOs 8.1.3.

I also found a little bug in the French translation, the end of level stats were messed up, nothing huge it was just a graphical error, but I have updated Android version too then.

Read more

Alien Blitz: greenlight

Greenlight

Greenlight page has been updated, I’ve updated video and screenshots using last build.

Video is almost the same as the mobile version trailer, but using the PC engine, I’ve also encoded it in 60 fps. There might be a few frame drops now and then because my PC can’t record at a stable 60fps (it’s just a dual core, and Alien Blitz already uses 2 threads), but overall it should be nice.

This video also has the new camera (closer to the mecha), the new vision system and borders around sprites.

bullet hell falling rocks fireballs over lava over poison over water rocket vs rocks smoke

 

 

 

Read more

Alien Blitz 1.3.1

Alien blitz has been updated !

This update does not add any new content, it tweaks balance, make some graphical changes and correct a few bugs.

You should really vote on Greenlight to make this game available on Steam (Linux / Windows / Mac) with more content & better graphics !

Changelog version 1.3.1

Balance:

  • Limited power up to one per type per mission
  • Less munitions can be stored
  • Ammo boxes content has been tweaked
  • Ammo consumption reduced for chain lighting, railgun, bombardment, grenade launcher, shotgun & double shotgun
  • UZI will shoot a different number of bullets depending on level
  • Ammo price increased and level dependent in nigthmare mode
  • Less health in medkit in hard & nightmare difficulties
  • No more level cap

Update:

  • Updated nightmare / new game +: increased monster level, weapons can be upgraded to level 40
  • New model for mecha
  • Material element will not use rock wall attack when not used as a boss
  • Free munitions for shotgun in first 2 levels
  • Reduced video memory consumption
  • Small performance upgrade
  • Fade out at end of level
  • New item pick-up effect
  • New advanced option screen
  • New end of level screen

Bug:

  • Misplaced textures on left walls
  • achievements sometimes not displayed
  • bad conditions for no damage achievements
  • few rare loading lags on Android
  • decoy power up not working
  • Added way back to start on 2 levels in episode 2
  • Material element randomly waking up

Update has been pushed on:

Update should be available soon depending on platform (immediately, few hours or few days).

Read more

Alien Blitz: new mecha model, misc

New mecha model

The new mecha model is now official, I could make the few needed animations (walk/jump) and everything’s fine

capture_2015-02-24_15-25-12_0382_Alien_Blitz_

It doesn’t change that much, it just looks smoother and uses a bit less video memory.

 

Misc

Some misc changes:

  • You can’t buy infinite number of power ups anymore, only one of each type per map (was too cheaty at high level since player has lot of money available)
  • Ammo needed for bombardment has been reduced
  • Ammo price has been increased in new game +
  • Corrected a few rare loading lags on Android
  • Corrected the decoy power up that was crashing the game

As always I end up building a release, doing a few tests and then decide to change a small thing; so I have to build a new release and so on… This is an endless process…
So if I don’t find anything else to add this release might be published soon (at least on Android, I had a few licensing trouble with iOs lately, I can now test on my iPod touch but I hope I can also publish it)

Read more

Alien Blitz: low poly mecha

Low poly mecha

I’ve been playing with blender latelly, I wanted to try to do some low poly stuff. Usually beginners tutorials teach you how to use blender and create a tree, the result is usually pretty good.
But when I tried to apply what I learned to do a mecha… yea it was pretty much horrible, I’m no artist ūüôā

capture_2015-02-23_14-45-32_0067_g3dviewer_home_jb_jbs_Projets_Microbasic_AlienBlit

But then instead I tried editing the current model, and change it so that most voxels are replaced by faces, and this time result is pretty good (new one / original) :

capture_2015-02-23_14-30-07_0115_Alien_Blitz_ capture_2015-02-23_14-32-16_0040_Alien_Blitz_

It’s smoother, and when viewed from farther away it looks a lot nicer than current model.

capture_2015-02-23_14-44-44_0731_Blender_home_jb_jbs_Projets_Microbasic_AlienBlitz_

And even better it uses less faces/vertices, so that’s very good.

I will continue working on that, I am currently implementing an armature

capture_2015-02-23_16-04-08_0939_Blender_home_jb_jbs_Projets_Microbasic_AlienBlitz_

I know LibGdx can use this armature directly, but it’s not part of my engine, so I think I will just export the different animation steps (using this armature of course) as I was doing before (it’s just a few exports anyway). But for a future engine it could be very useful.

 

 

 

Read more

Alien Blitz: new game +, tests

New game +

In new game + / nightmare mode the mission level has been changed, it now starts higher (65 instead of 45) and ends higher too (110 instead of 100)

And now mission rewards are considered level 65 in new game +, so for example when completing the first map you will get money & xp as if you completed a level 65 map (was considered level 0 before, as it is level 0 when playing normal playthrough) BUT last map is also considered level 65 (too avoid crazy xp/money you would get at level 110, you still get more xp/money than first maps though as there are more boxes and monsters)

The level cap has been removed, but starting at level 70 the way levels are computed change and it becomes a lot harder to get new levels.

And finally when in nightmare difficulty the weapons can be upgraded above level 20 (up to 40), but it’s very very expensive (and less efficient than upgrading previous levels, but at least you can spend some crazy amount of money on something).

 

Tests

Tests are going smoothly, there have been a few balance changes but no bug so far. So it’s good.

At first I just wanted todo a few tests on mobile and do a full run on PC with cheats, but I ended up doing a 100% hard mode legit run (mixing usb gamepad, moga gamepad, or just touch controls) on my Nexus 7 (old version). It went very well, just a few frame drops at a few places (crowded area) but nothing huge.

I am now continuing playing on the new game + mode (hence the balance changes), I am almost at the end and I am pleased as end is quite hard but not just impossible. I am even considering adding a new game ++ mode with increased difficulty (sort of like uvhm mode of Borderlands)

I’ve also changed 2 levels in episode 2, just adding shortcuts to go back to to the start (to avoid resetting level just for a missing monster/box/secret if you plan on doing 100%)

Read more

Alien Blitz: balance, ammo screen, misc changes

Balance

I’ve reviewed again how ammo are used/stored. What I was doing up to today was that, like all other weapon characteristics, ammo storage was increasing with weapon level. It means that at high level you basically have “infinite” ammo (well, you have so much to not worry about when using basic weapons).

So I’ve reviewed all that

  • There is still an ammo storage increase when leveling up weapon, but smaller (15% every 5 level)
  • Ammo box will not give more ammo depending on level on hard/nightmare difficulty, and less on normal (same as before on easy)
  • Lowered cell & explosive weapons base storage
  • Lowered cell consumption for: chain lighting, railgun
  • Lowered explosive consumption for: bombardment, grenade launcher
  • Shotgun will use a bit less ammo at high level (but still shoot the same number of bullets)
  • UZI will now shoot less bullets at low level (6 instead of 8) and more at higher level (10 instead of 8)

It does not change a lot of things at low level (episode 1), but at higher level it makes searching for ammo more important than it is now, and if you play in higher difficulty you will even have to buy ammos sometimes.

 

Ammo screen

The munition screen had not been updated for quite some time now, time for a small redesign

capture_2015-02-20_13-18-26_0659_Alien_Blitz_

It now has some icons, unused spaces have been removed, and you can buy either buy a small amount of munition, or fill up your storage.
Prices have been slightly increased.

And the first time you run out of ammo you get this help screen too

capture_2015-02-20_16-08-18_0149_Alien_Blitz_

Of course this message is only displayed once.

Misc changes

Some other changes

  • The first boss when used as a regular monster will not use the rock wall attack (when he throws rocks that stay on the ground to block player) as it is a bit laggy on low/medium end device
  • The first boss when used as a regular¬†monster will not awake randomly anymore
  • Added a missing sentence in the interlude screen in episode 1

Read more