Uncovering the secrets of

indie game dev

Get all the news !

Never miss out any update.

Author: Oneiric Worlds

  • April 2014 Demo

    April 2014 Demo

    And here is the last demo of World of Thieves, a 3D adventure/stealth game between “Zelda” and “Beyond Good and Evil“. Don’t hesitate to test/share/reblog/comment/like if you want to help me!

     

    Survey: Don’t forget to complete the online survey after playing the game!
    Bug hunt: As usual, contact me for bugs or any feedback.
    Get all the news:if you don’t want to miss anything, subscribe!

    Install Notes

     

    • Linux

    Under Linux, you have to change the execution rights on the game file:
    chmod +x worldOfThieves.x86

    If you use this 32-bit version of the game on a 64-bit operating system,
    you may also have to install 32-bit libraries.
    I was successful with the following commands:
    On Ubuntu:
    sudo apt-get install ia-libs
    On Fedora:
    yum install libstdc++.x86
    … which doesn’t seem to be the exact same thing. But it did the trick for me.

    By the way, I noticed the game is really slow on my Linux systems. It was only playable with the lowest quality settings possible. Maybe this is due to my graphic drivers, but I’ll have to test further. It even crashed at the beginning of the pirate warehouse level. Don’t hesitate to tell me if you experiment such problems.

    • Mac OS

    Haha… I didn’t test on Mac, because I don’t have a Mac. But the beauty of Unity is that I can release on Mac from a Windows system anyway.
    So, if Mac users out there want to give it a try and tell me what’s wrong (or what’s right, hopefully πŸ˜‰ ), you’re most welcome!

    What’s new since the last demo?

    It’s been 3 months since the last demo, so what’s new you may ask? Well, probably nothing that you will notice :(… Because the main story, quests and levels are almost identical. So what did I do? I worked a lot on more core/fundamental stuff. This is the injustice of working on the development side… Almost all the work is invisible:

    • smoother camera moves
    • better camera collisions
    • lots of feedback added during fights: camera shake, blur, vignetting and chromatic abberations when a hit is taken
    • visualisation of sound waves on impacts
    • various post-processing effects: depth of field, bloom and screen space ambient occlusion
    • speech bubbles for the pirates
    • crouch position for the hero
    • blocking skills for the hero and the enemies
    • better collision tests for the climbing moves
    • charge animation for the hero mega attack
    • a few more items (not usable in the demo however): bomb, flute, cure fruit
    • hud/gui improvement for contextual actions, hints and help
    • 2 more collectable categories (not in the demo): ill animals that you’ll have to cure (only sheeps at the moment) and flowers
    • control redesign for item use
    • black stripes during dialogs/cutscenes
    • fully open world with continuous dynamic background loading (you won’t notice in the demo)
    • better path finding for enemies
    • music management system with music depending on the location of the playerΒ  and with smooth audio transition between zones
    • a few more buildings on Tera Island and some funky sheeps
    • re-recording of the intro music with better sound and rythm quality
    • music for Tera Island
    • shoot cool down for range weapons
    • different target icons for each range weapon (not in the demo)
    • game (and menus) playable with a joypad
    • fog with dynamic color changing
    • flag with physical simulation on the Thief Guild
    • redesign of the day skybox
    • better rendering of far away objects
    • dynamic light variation of “thin” objects (grass, ropes, …)
    • better answer selection in dialogs

     

    What’s broken since the last demo?

    You didn’t expect everything to be better did you? I’m aware of a few bugs/regressions:

    • The inventory is a bit less functionnal: you have to use the keyboard to change the current page (missions/inventory/map) but the mouse to select items inside each page. And sometimes the current page changes when you click somewhere else.
    • The new camera positionning algorithm is nicer, but less stable. It totally crashes the game in some very specific locations and I can’t spot why at the moment. I’m working on it…
    • On Linux, the image is locally reversed on impacts… This makes a strange effect.

    Controls

     

    • ZQSD or WASD: move the character. It’s both AZERTY and QWERTY compatible
    • Space: jump and climb
    • Shift: crouch and block
    • Mouse move: move the camera
    • E: weapon selection menu(useless in this demo)
    • Left click: main weapon (Bo) or contextual action
    • Right click: secondary weapon
    • Tab: inventory/map/missions

    Have fun! Peace!

  • Music!

    Music!

    Hi everybody,

    After a long silence, I’m going to talk today about music in the game, and more specifically how I make it. I recently tried to re-record the intro music because I had made it quite quickly in the first place.

    I – First audio tests: Ardour

    For the first music recording, I used the Linux software “Ardour”, which is the “equivalent” of Protools, a famous recording software in the audio/musical industry. It may not have all of its features, but it was enough for me. I quickly described this setup at the beginning of this post.

    The sound softwares are really great (and free) under linux, and they have a very different philosophy than the ones of Windows or Mac: they all rely on a “sound server” software (called JACK) which is designed to treat the audio information with a minimum delay to have a real-time response, but, above all, ALL audio softwares are compatible between them because they use the same Input/Output interface (relying on JACK, the sound server). So, under linux, each software has a speciality (audio recording, post processing, effects, synthetizers, drum pattern creation, score editing, midi recording) and you can mix them as you want, whereas on other OS, it is generally difficult to make softwares from concurrent companies communicate between themselves.

    The incredibly powerful and intimidating interface of Ardour, the reference of audio recording softwares on Linux.

    However, in my case, the problem is, Ardour is above all an audio recording software, which means it is designed to record REAL instruments, if you have the good microphones, and hardware setup. It is very powerful, and I recorded the intro music with my simple Yamaha Keyboard, but I’m not a perfect musician, and I could hear a lot of mistakes (on the rhythm especially). In this case, there is no other solution than to re-record again and again to correct the mistakes. Moreover, I am limited to the (poor) sound quality of my little keyboard, which sounds a bit cheap.It’s not a big problem in the kind of video game I plan to do (because, except in big productions, it’s quite rare to have a symphonic orchestra recording the music), nevertheless, this poor sound quality annoyed me.

    Here is the first try of the intro theme recorded directly in audio from my keyboard:

    If you can’t see the audio player above, try this link

    So after testing “real” instrument recording, I switched to another pipeline: MIDI recording.

    II – The promise of MIDI tools

    As a lot of compositors, I finally chose to use a MIDI sequencer in order to create the musics. I use LMMS, a simple but powerful software from the Linux world (again) but which works also under Windows.

    [By the way, at the moment, I use it with Windows because my full pipeline production is a Windows-based (for development, graphics, audio…) but all the softwares I use also work under Linux… except Unity, my software development tool. But when they’ll decide to port it to Linux, I can switch my full pipeline production under Linux for better stability while keeping the exact same softwares.]

    Anyways, what is a MIDI sequencer?

    A MIDI (Musical Instrument Digital Interface) sequencer is a software that enables you to write/record musical scores, but in a simplified version (not the real classical notation, even if it is sometimes also possible): when I “record”/”write”, the computer doesn’t actually record the SOUND coming out of my Yamaha keyboard, it records the NOTE, its PITCH and DURATION (with a few more informations), and it creates a simplified musical score with these notes. The 3 big advantages of this method are:

    • You can make many change AFTER having recorded the musical part: change the sound of the instrument by using what we call “soundfonts”, change the tempo, …
    • You can correct errors with a simple click on the score (move a note, change a duration, change the velocity…)
    • You can “quantize” the score, that is to say that every note is played with a perfect timing according to the tempo of the song (thus, there is no rhythm approximations).

    Of course, not everything is perfect, but this new process simplifies a bit the musical creation.

    For each recorded instrument part, you have to select a “soundfont”. This is pretty much the same thing than a “font” for a text except it doesn’t define how characters will look like, it defines how notes will sound. This is some kind of instrument bank. And there are lots of them on the internet, with different qualities, sizes, and instrument types. In the end, I’ve got many more sounds available than the simple sounds from my Yamaha keyboard, with a better quality too.

    The LMMS MIDI sequencer. In the left window, the blue segments represent different pattern/melody parts. Each line is a different instrument with different settings. For each blue segment, you can modify it note by note on the right window (the “piano roll”) where you can add notes, delete them, move them, change their duration or velocity… As you can see, it’s not a real musical score; the visual representation is quite simplified and intuitive.

     

    III – Installing LMMS

    [This part is a bit technical, so go to the next one if you want]

    So this seems quite cool, but setting up the software correctly took me some time, because I have a basic soundcard. Indeed, on Windows, the sound drivers always introduce some “lag” when recording from audio devices. It seems to be a known issue. Thus it is impossible to record from my keyboard because each note is systematically played 1/4 beat late. This drived me crazy.
    Fortunately, the ASIO company has some kind of “generic no lag driver” which seems to do the trick. But this new driver seemed not to be supported by LMMS natively. I had to find a precompiled DLL driver library with the ASIO driver support and replace the native LMMS DLL driver library.
    I wouldn’t have had those problems under Linux, but this finally saved me a lot of reboots when working on audio composition.

    However the version of LMMS I got also had a MIDI recording problem with soundfonts tracks (Haaa, free software πŸ˜‰ ). But the community is great, and a new version correcting the problem was released a few days after.

    The last problem was using soundfonts. I found a huge soundfont with great quality but it needs more than 1.5 GB in memory (yes, you read well), and the 32-bit version of LMMS can’t load it. So I finally had to re-setup my whole pipeline in 64 bits (LMMS + real-time DLL drivers). To this point, I still have a few audio output problems from time to time, but it’s globally OK.

    Achieving to have a “stable” setup is sometimes long and difficult, but once it’s done, you can finally work! Because yes, until now, I haven’t produced anything.

    But after trying various instruments, learning how to use the software (I read the documentation and tutorials for a few hours), I finally could re-create the intro theme! And here is the same song than before, but recorded in MIDI with a better sound quality (I hope):

    If you can’t see the audio player above, try this link

    All this work for this 1 mn of the same music… Depressing isn’t it? But now I know I can easily create other music, and that’s the good part. This first part took me several days to achieve, but after that, I created another test track in a few hours only. Meanwhile, I keep listening to the original soundtracks of my favorite games on youtube for hours to understand how they are built. Very enlightening πŸ™‚

    IV – Integrating the music in the game

    Now I have musics of better quality, but how are they played in the game?
    In the game, I created a few different “musical zones”. When the character enters a zone, it starts the corresponding music (with a little fading-in for a smooth start). An when the character leaves, it stops the music.
    But this is not as simple as that, because sometimes, I want a different music for a little cinematic taking place somewhere where there is already a musical zone. So I added some kind of priority information for nested musical zones. Moreover, I also have to deal with memory managerment (musics have a huge impact on memory use) and I must clean them when the character leaves a zone, especially now that the world is streamed into memory…

    Anyways, that’s the basic process of creating a music for a video game. That was a bit complicated to setup (especially using LMMS under Windows with my poor sound card), but this should be easier now to create additional musics.

    Thanks a lot for reading until here, and see you next time, maybe for an updated demo!

    Peace.

    PS: The final news which made me depressed: the last version of Ardour (the soft I first used) now handles MIDI recording/editing… But I didn’t see that before. Anyways, my work in MIDI is not lost, since I should be able to import it in the new Ardour version. I might give it a try one day, but I’ll have to update all my linux installs. I guess I’m not finished with all that musical stuff…

  • Game communities and vote!

    Game communities and vote!

    Hello everybody!

    I just post a quick news to tell you that World of Thieves is now visible on Indie DB and Steam Greenlight communities, and if you want to help, now is the time πŸ™‚

    Game Communities?

    For those of you who don’t know, these are the most active indie game communities on the net.
    They are dedicated to expose the games of indie developers to players in order to build a community around each game. It enables players to give their opinion and propose improvements directly to the developer. This is incredibly valuable for me, as I already got a lot of feedback on what is good or bad about my game.

    Vote for World of Thieves!

    Steam Greenlight is also dedicated to submit game ideas/prototypes to players to see if they want it on Steam (the biggest online video game store…). If enough votes are reached, the game is distributed via Steam. So, if you want to see World of Thieves on Steam (even if it’s only in a few months), don’t hesitate to vote for it on this page. You’ll need to have a Steam account to do so.

    Oh, and by the way, you may have noticed, but I recently redesigned the website to get a nicer presentation.

    See you!

  • World of Thieves goes Open World

    World of Thieves goes Open World

    Hi again folks…

    [WARNING: This is a crazy technical article. Pursue only if you’re mad]

    As promised in my last post, here is a pretty technical article to show you the kind of problem I run into and to give you a hint on how I spend my days losing my hair. This one is a pretty complicated one and kept me occupied for the last 2 weeks, because it forced me to change a lot of things in the code of the game even if I though “no problem, I planned it well, everything’s gonna be okay”. How naΓ―ve…

    The final goal is to have a continuous world without any loading time between zones.
    Why an open world you may ask? Because, at the beginning, I set myself 3 major guidelines about my game:
    – freedom
    – humour
    – oneiric world

    And every choice I make at any step of the development follows these 3 “rules”. This ensures me that the game, even if not perfect, will have some coherent content and some kind of art/feel direction. Thus… having an open world helps a lot for the freedom feel. Plus it’s a crazy challenge, and I’m a crazy guy :).

    As you may have seen in the demos and videos, the world of my game is a big ocean with various islands on it (yes, just like Zelda Windwaker). At some point the player will have the ability to travel on the ocean (on a turtle’s back πŸ˜‰ ) and can go pretty much everywhere he wants. This means islands/levels must be loaded dynamically according to the player’s position/direction in the world.

    I – Unity Limits (Yes I finally reached some)

    I use Unity to create my game and (luckily?), Unity provides 2 functions to load a new level “in the background” so that you don’t notice any lag:

    • LoadLevelAsync: loads a new level in background. Once loaded, the new level replaces the current one.
    • LoadLevelAdditiveAsync: Same thing, but adds the content of the new level to the current one. This is obviously what I’m going for here.

    But this is theoretical only. Unity is a great software, but some points are still under heavy development. These ones are. And it impacts the game in a way I didn’t think about: after using LoadLevelAdditiveAsync, all the IA agents of the new level crash.

    This occurs because the IA uses a “NavMesh” (= Navigation Mesh) to represent the walkable areas in the level. The IA can only walk/move/search a path on the NavMesh. Problem is, Unity only authorizes 1 NavMesh to be loaded in memory at a time, and you can’t load a NavMesh using LoadLevelAdditiveAsync. Technical limitation. I can’t argue.

    The NavMesh: enemies can only walk on the blue zone. The computation of this 3D NavMesh is a quite complex task…

     

    II – Time for Hacks

    I found a hack on a forum post : using LoadLevelAsync (which actually loads the new NavMesh in memory) and tagging all objects of the current level not to be destroyed (a cool feature I discovered while reading the forums. Great community by the way).
    This is supposed to do the trick but it rises 2 more problems:

    • LoadLevelAsync is not actually a background task. It really freezes the game for a few ms, and it IS visible.
    • Cool, the NavMesh of the new level is OK, and the IA too, but what happens if I go back towards the 1st level (which is still visible but with no corresponding NavMesh and no IA)? If I wan’t to reload only the NavMesh of the 1st level… I can’t without reloading the whole level, which may result in objects flickering during the reload.

    At this point, I’m faced with Unity bugs I can’t fix and I’m left with a few options:

    • Wait for a bug fix from Unity about the NavMesh+LoadLevelAdditiveAsync problem. I don’t think it will come before I release my game, the Unity guys have loads to do and this is not a priority.
    • Use a 3rd-party library. I must find one that does NavMesh generation and path-finding, is real-time, and dynamically loads levels.
    • Recode everything that is not working. Not impossible (I already coded a real-time A* path-finding algorithm for World of Ninjas, but it works only on a 2D grid)… but hardly realistic. Good guys spent months developping systems much more reliable than anything I could do in a few weeks.
    • Find another workaround. I didn’t find any when I spent a few hours on forums and faqs.
    • Give up. This is a serious option. I can perform the navigation part on a 2D map where you click where you wan’t to go. All islands would be accessible too, and it won’t change the gameplay on each island. Maybe I’ll even consider that if I achieve to createΒ  a “real” open world but it’s not fun to explore.

    But before giving up I heard a lot of good things about a 3rd-party library implementing the classical A* path-finding algorithm: Aron Granberg A* path-finding library.

    Β Lots of levels loaded together!

     

    III – A new lib: A*

    Cool! A new library full of promises. But before commiting to this, I have to test that every basic IA feature already provided by Unity is implemented in this library.

    I start with the free version of the library, which means… there is no NavMesh generation available (only on the full 100$ version). Of course, I can buy the full version, but I’m not sure this library solves my “dynamic loading” problem. I must first test it on this specific point.

    I know that Unity can generate NavMeshes (I used them before). So I write a script to convert Unity NavMeshes to the library NavMesh format, which enables me to use the library path-finding on NavMeshes from my real levels.

    But there is already a problem: the path-finding behaves weirdly and sometimes IA makes huge detours to get to some point. It seems to be a known issue… This is because of the NavMesh topology: a “good” NavMesh for the A* library is supposed to have some kind of grid pattern on it to avoid big triangles next to small triangles. Unluckily, NavMesh generation in Unity doesn’t expose some “grid size” or “max edge length” parameters, which means I can’t test that the path-finding behaves correctly with a “good” NavMesh.

    IV – Another new lib : RAIN

    I heard about another path-finding library: RAIN. Totally Free, but sparse documentation. I tested it mainly to assess its NavMesh generation algorithm and hurrah! It can generated “grid”-NavMeshes. So I write another script to convert RAIN NavMeshes to A* NavMeshes, with very few documentation… Tough time! And… I get a few errors during the convertion but the NavMesh seems to be generated anyway. I test it with the A* path-finding, and it seems OK! The IA behaves well.

    Now, by combining 2 external libs, I have some basic IA behavior. I am at the same point that with Unity path-finding before.
    I must now tackle the REAL problem: dynamic NavMesh/IA loading.

    V – NavMesh dynamic loading

    It seems the A* library provides a way to export a NavMesh in a text file to load it dynamically at run time. Exactly what I need (theorically πŸ˜‰ ). After a few tests, it seems to work at least for “little” files. But of course loading a new NavMesh gets rid of the previous one. I have to be cautious while activating/deactivating IA agents. But this means I need to write another script to convert the A* NavMesh in a text file during level generation.

    The usual test level for enemy/IA behavior

     

    VI – Integrating everything

    OK. Every test I’ve made until now was of course on temporary/separate IA agents. I must know rewrite the code of the real enemy IA in my game to make them use the new A* library. And of course, I have a few problems because the library doesn’t provide exactly the same callbacks/hooks for various states (path is computing, agent has arrived at destination, etc…). But finally, the IA works just like before, and I can dynamically load a new level with correct IA behaviour.

    VII – Final surprise: progressive activation

    But… for larger levels, the loading seems to lag. How it this possible? I made all this to finally realize that the Unity fonction LoadLevelAdditiveAsync lags? Did I do something wrong?

    And indeed, after a few tests, it seems that the loading itself doesn’t lag. It’s the activation and start scripts of all the loaded objects (IA/vegetation/animals…) that occur on the same frame that makes the game lag!

    So I have to disable all the loaded objects, and activate them one by one on each frame. But this leads to 30 seconds to load a 1800 element level. So I optimized this to load many objects on one frame if they are light (a simple crate), and only one if it’s a complex one (enemies). I dropped down to 3 seconds to load the same 1800 elements.

    VIII – Making it automatic

    Cool! It works on a few levels that I placed “by hand” on the global world! But, in the end, I’ll have many levels, some of which may change in location. I have to set up a pipeline to ensure that every step I manually made is correctly and systematically handled for every new level.

    I set up a special “world” mesh file made in Blender to precisely locate every level in the world. Each individual level is stored in a separate Blender file and centered on a (0,0,0) position.

    The simple world mesh locating all levels in Blender. The big and small spheres respectively represent the loading and activation zones.

    When loading a level from Blender in Unity here’s the (almost automatic) process:

    • Find the final level position in the “world” mesh
    • Move the whole level to the final world position (while converting coordinates conventions)
    • Convert every Blender object in a “smart”/”scripted” Unity object
    • Create the NavMesh using either the Unity or RAIN NavMesh generation
    • Convert the Unity/RAIN NavMesh to A* NavMesh
    • Plug the generated A* NavMesh into the A* path-finding Object
    • Convert the A* NavMesh to a text file
    • Deactive all objects in the scene so that they won’t be activated simultaneously after a dynamic load

    … And that’s pretty much it… For the offline level edition part.

    At run-time here’s what happens:

    • If you enter a level zone, the level is dynamically loaded, but nothing is activated yet. Only basic (and huge) island meshes are visible
    • If you get closer, the text file NavMesh is loaded, object activation starts and within a few seconds the whole level comes to life.
    • When you leave the activation zone, all objects are deactived, but the NavMesh is still in memory (in case you want to come back πŸ˜‰ )
    • When you leave the level zone, the whole level is destroyed.

    I had to carefully study the distance at which each loading/activation occurs. Because I don’t want to start activating very far away levels, but I still want them to be visible at a fair distance. I must also care about the distance between the islands: if 2 or more activation zones overlap,Β  many levels are loaded at the same time, and this may seriously slow down the game.
    In brief… all this things are to be tuned and balanced.

    Sooooo…. This was a huge journey through incredibly complex features, but I now have an open world running at 50 fps in average and at least at 20 fps during loading. Now, you know why the game hardly changes between 2 releases πŸ˜‰

    For the brave guys who read until here, here’s a video of the dynamic loading of the levels. I use a super-graple enabling me to move from one island to the other, even if the aiming is sometimes a bit difficult… And you may notice the distance between islands is perhaps a bit long.

     

    To avoid seeing islands popping from nowhere when the player enters a loading zone, I added fog (classical trick in video games).

     

    IX – Even more problems

    For the sake of clarity I didn’t talk about every problem I had, but for the guys who would like to set up a similar structure, you have to know:

    • The A* lib has some cache information about the NavMesh, and it’s sometimes necessary to “rebake”/”rescan” the NavMesh after loading it. But this is absolutely not real-time friendly.Β  I have to make additionnal tests, but it seems to be necessary only when playing in the editor when you modify a preexisting NavMesh. In the release, this may not be necessary.
    • LoadLevelAdditiveAsync is absolutely not async in the editor. It freezes the game. You have to make a release exe to truly test real-time loading.
    • Loading lots of level simultaneously totally messed up with all the automatic triggers I used to launch dialogs/cinematics or whatever. I had to fix all those things happening at the same time while I was still far away from the actual islands.
    • Because I now dynamically load levels, I also must dynamically save all the local modifications of the player: if he takes a pickable item, unlocks a door or a chest, I must keep track of it even if the level is unloaded before he gets to a save point.
    • A few objects don’t support activation/deactivation at all: clothes. This breaks the physics simulation in the best case, crashes in the worst. I had to find a workaround consisting in only disabling the cloth component instead of the full object… which makes my code look like crap.

     

     

    I used clothes simulation to add huge flags above the Thief Guild (the only graphical change for 2 weeks…)

    That’s all for the crazy stuff. See you next time! Peace!

  • Thomas Zighem Interview

    Thomas Zighem Interview

    Hi everybody,

    It’s beenΒ  a while! Don’t worry, I still work on World of Thieves… Lately, I’ve been trying to add continuous background loading of the levels. This means I should be able to create a small “open world” within the game. But more on that later!

    This quick post is just to share a little interview with you. I recently came across the dev blog of Genesia, an excellent old strategy game we played a lot with my brother when we were kids. The developper is trying to create a remake on new platforms (Android, IOS…). I contacted him as a huge fan and as an indie colleague to ask him a few questions about his work. The guy was very cool and took the time to explain me a lot of things. It was very nice and motivating to speak with him!

    You can see the “interview” (in French, sorry) here: http://www.genesia-game.com/fr/blog/35-courrier-des-fans.html.

  • The indie life 2

    The indie life 2

    It’s a bit difficult to keep the motivation this week, so here’s another little comic about how I spend my days. It’s not that obvious to track bugs…

  • The Indie life

    The Indie life

    An old little comic I made when I started to create my game… I originally wanted to create a few strips like this one to share what I do in another way than technical articles. Maybe I’ll do more of these in the future.

    Maybe some of you already saw this on my deviant art profile or my art blog…

  • New updated demo for Windows, Linux and MacOS

    New updated demo for Windows, Linux and MacOS

    And here is the last demo of World of Thieves, a 3D adventure/stealth game between “Zelda” and “Beyond Good and Evil“. After all the amazing feedbacks I got, I thought it would be cool to fix all the biggest (and really annoying) bugs of the last demo. Don’t hesitate to test/share/reblog/comment/like if you want to help me!

    Survey: Don’t forget to complete the online survey after playing the game!
    Bug hunt: As usual, contact me for bugs or any feedback.
    Get all the news:if you don’t want to miss anything, subscribe!

    Install Notes

    • Linux

    Under Linux, you have to change the execution rights on the game file:
    chmod +x worldOfThieves.x86

    If you use this 32-bit version of the game on a 64-bit operating system,
    you may also have to install 32-bit libraries.
    I was successful with the following commands:
    On Ubuntu:
    sudo apt-get install ia-libs
    On Fedora:
    yum install libstdc++.x86
    … which doesn’t seem to be the exact same thing. But it did the trick for me.

    By the way, I noticed the game is really slow on my Linux systems. It was only playable with the lowest quality settings possible. Maybe this is due to my graphic drivers, but I’ll have to test further. It even crashed at the beginning of the pirate warehouse level. Don’t hesitate to tell me if you experiment such problems.

    • Mac OS

    Haha… I didn’t test on Mac, because I don’t have a Mac. But the beauty of Unity is that I can release on Mac from a Windows system anyway.
    So, if Mac users out there want to give it a try and tell me what’s wrong (or what’s right, hopefully πŸ˜‰ ), you’re most welcome!

    What’s new?

    • QWERTY and AZERTY compatible controls by default
    • save bug fixed
    • more save points
    • inventory interface actually showing and describing the objects
    • real 2D map system accessible with TAB
    • (hopefully) better missions/tutorials timeline
    • presentation screen when new weapon is received
    • music (test πŸ˜‰ ) during the introduction cutscene
    • sound and music fading during load screens
    • chest opening animation
    • waterfall shader
    • both clicks available in the weapon selection menu
    • various HUD/GUI fixes
    • Linux and Mac versions

    Controls

    • ZQSD or WASD: move the character. It’s both AZERTY and QWERTY compatible
    • Space: jump and climb
    • Mouse move: move the camera
    • E: weapon selection menu
    • Left click: main weapon
    • Right click: secondary weapon
    • Tab: inventory/map/missions

    Have fun! Peace!

  • Waterfalls and sleeping water

    Waterfalls and sleeping water

    Hi there!

    I will just write a quick article on this week’s work: creating the appearance of waterfalls and water/lakes which are not the main sea.

    The final look of waterfalls.

    Indeed, I want a world with various (floating) islands and some waterfalls. Maybe you noticed it, but there is already water in the video game. I previously worked on the main sea of the world, and it wasn’t that easy to set up a look that I found OK. I finally chose to have a purely reflective water. The big problem is that displaying the main sea is quite computationally expensive.

    If I want to add other water planes (for example a lake on an island) or waterfalls, I can’t use the exact same approach because it will seriously slow down the game. Plus, for a simple plane, computing the reflection is “quite” straight-forward, but for complex shapes (a waterfall), the computations are more difficult and the graphical pipeline of the GPU is not well suited for such a task. So I have to use a work around if I don’t want to spend days developing an incredibly complex material that nobody will notice anyway.

    I finally choose a combination of various classical techniques used in video game/real-time applications…

    I – Environment(cube) map

    An environment map is some kind of “spherical” texture (actually it’s computed from the faces of a cube) that is applied on a mesh according to its normals. The idea is to “fake” the reflection of the environment on the object.

    The environment map fakes a perfect reflection of the environment. This works well with a sphere, but it’s less convincing with other mesh primitives.

    Technically, it is possible to compute such a normal map in real-time to obtain a “true” reflection of the environment. However, as usual, this is quite GPU-heavy (you have to make 6 renders of the scene to create the real-time reflection texture). Furthermore, even with real-time computed reflections, the mapping itselft is still a fake one, which won’t fool the careful viewer’s eye.

    Thus, I choose to use a pre-computed environment map: I simply use the cube map of the sky (see this post for more details).

    II – Moving normal maps to create waves

    Then, to break the perfect flatness of the water, I add 2 normal maps that moves at 2 different speeds. It creates a nice effect of moving waves. By the way, it’s the same trick that is used to create the waves on the main sea material.

     The environment map with normal maps to simulate waves

    III – Moving foam texture

    This one is a simple classical moving texture added on top of the moving waves. To keep consistency with the rendering of the main sea, I use pure white for the foam, and I play with the alpha channel to modulate the visual impact.

    The white foam above the water.

    IV – Distortion of the foam texture

    Because I want the foam not to be straight on this moving water, I add distortion to it by altering the texture coordinates with a noise texture (actually, this is the wave normal map with a different scale and speed).

    Foam with distortion!

    V – Day time aware material

    The final step is to make the material reacting to the day time. Indeed, the sky/environment is evolving (there is a day/night cycle in the game) and I can’t have a night reflection in full day, this totally breaks the visual integrity of the scene. So I need to carefully blend the day and night environment map of the sky according to the virtual time of the game.

    Day reflection

     Noon reflection

    VI – Tweaking and particles

    The final difficulty is adjusting all the material parameters of this “fake” water, to match most closely the main sea water. Because the algorithms behind the rendering of these 2 water styles are different, it’s strictly impossible, but I have to minimize the visual gap.

    The main sea water material with real reflections.

    The lake water material with fake reflections.

    As you can see on the above screenshots, for lake and other “sleeping” water planes, the differences with the main sea water can be obvious according to the camera viewing direction. But for the moment, I can’t do better.

    Maybe, later, I’ll modify the main water rendering shader to make it structurally closer to the fake water one, so that it can be easier to have a similar look (without losing real reflection on the main water of course). Or maybe I’ll find anoter way to have real-time reflections on lakes too without hurting too much the GPU (I already tried… but failed… for now).

    For waterfalls however, this fake water is quite OK, I guess because all waterfalls have the same material. By the way, I must add particles to create the splashing waters.

    A waterfall with splashing water particles.

    So, that’s all for today! I hope this detailed water material post was interesting for you…

    And, I didn’t talk about it in this post, but I made a loooot of bug fixes thanks to all of you guys who tested the last demo. Thanks for your amazing feedback! I plan to release a new demo with lots of major fixes at the end of the week, so that new testers can find new bugs πŸ˜‰

    See you! Peace!

  • Creation of Tera Island

    Creation of Tera Island

    Hello there,

    Sorry I didn’t have a lot of time after releasing the last demo, but now I can post a few explanations of my last month work. In this post, I focus on the creation of the hero home island, named Tera (for the moment at least).

    I – Getting the idea

    As usual the most difficult part is to get a clear idea of what the island looks like. That’s why, in the video game industry, some people focus only on this job: the designers. Very often, everything starts from a painting showing the major features of a landscape and the main mood. In my case, I only made a few doodles to get the basic idea. Once the bacic shapes are set up, everything else is polishing.

    A few digital sketches laying down the main idea: a ruined/partially destroyed house. As you can see, all the sketches are not perfectly matching. I try many things and I keep only a few ones.

    I also use traditional drawing. The nice thing about it is that I can draw anywhere on a moleskin if I’m not at home when having an idea.

    So, after making all these sketches, I ended up with the hero home being a former library partially destroyed. I like the idea of a library because I can add many books leading to various side-quests. I also want the hero to share this shelter with other people who may help him. I’ll talk about that later.

    II – Modeling and texturing

    Once the concept is done, I use Blender to create the full 3D model. There are 2 major works in here:

    • I have to create something visually nice, by playing with textures and geometry, by avoiding obvious repetitions, by inserting various little items to create a lively house… This is the “artistic” part.
    • I have to think about the way the player may interact with the decor: is the door wide enough for the character to go through? Can the hero jump high enough to pass through windows? Can he climb this wall? This is the “technical” part. 

    How the hero home looked after the first day. Not brilliant…

    OK, it’s getting better, but there is still a lot of work!

    The 2nd (“technical”) point is very tricky, because there are so many complex geometrical configurations that may arise from the artistic creation that I can’t assure the character will always behave correctly everywhere (the algorithms controlling the player moves are far from perfect). Of course, I make a lot of tests to check that every move is OK in cluttered places, and I have some technical guidelines for 3D modeling (avoid small walls, try to keep at least 1m between various stuff…), but this isn’t enough. That’s why testers are really helpful on this particular point!

    The actual look of the hero home (in game)

    Furthermore, some items are interactive and may behave differently according to the player actions. And, of course, I must test especially the actions I wouldn’t think of, like what happens if the player attacks a wall while trying to jump near a swinging lantern? There are an infinite combination of such unlikely (but not impossible!) actions that it can’t possibly be all tested. Another huge burden about this technical part is that if I change (for example) the jump height of the character, I should theorically test again every place of every level already made.

    At this point, I have something playable and not too harsh on the eye, but I should really add more items (jars, books, decoration here and there, etc…) and refine texturing and modeling to make the place more believable.

    Carpets help to break the monotony of the wooden floor.

    III – Temporal variations

    Once the place was created, I realised I didn’t think at all about the evolutions it could go through… According to the story, the game starts after a storm that broke the wooden pontoon joining the hero home to the main island of Tera. This is of course a gameplay trick to prevent the player to go to the main island where there will be side quests, and to force him to accept his first mission before going further. But once the first mission is complete, the pontoon should be fixed. This means that levels/decors are dynamically evolving according to the player actions.

    To tackle this problem, I subdivised all levels in a “static” part and a few “dynamic” parts loaded only if the player accomplished some particular actions.

    A broken pontoon, at the beginning of the game
    The fixed pontoon, after the first mission.

    So that’s all for Tera Island. In the next post, I’ll talk about the new characters, and how I made them. By the way, thanks to anybody who tested the last demo, I got nice feedbacks, and a lot of things to correct! See you!

  • Mail subscription problem

    Mail subscription problem

    Hi,

    It seems that there is a problem with the mail subscription. This post is just a temporary test to solve the problem. You can still try the demo and give me a feedback to improve it πŸ™‚

    Peace!

  • New characters: Tal and Terry

    New characters: Tal and Terry

    During the past month, I added 2 new characters to the game:

    • Tal, the hero friend/sidekick that helps him during the missions
    • Terry (and his brothers), the guys running the earth-ship business, enabling you to travel between the various islands.

     

    I – Tal

    While creating the new Tera island, I wanted the hero not to be alone. So I worked on a few friendly characters that may help him. I started writing down a few notes on a simple text file to have the basic style/look/behaviour of those characters. I found out that working with text files is quite nice. You don’t have to write perfect sentences, you can only write a few evocative words that help you to exactly visualise a place or a character and it’s very fast! I use tons of text files when I have to think about the story, characters, levels, tutorials, items, bonus, ennemies, planning, gameplay… Some are huge, other are very short, but all are “alive”: I constantly add/remove/change/correct stuff.

    A part of the character files, in French (sorry I’m more at ease with French when it comes to quickly write down ideas), with lots of mistakes.

    For the hero sidekick, a girl named Tal who can communicate with him at any moment, I wanted a computer/mechanical geek girl, quite funny, who sometimes makes laugh of the hero (this may only be seen in dialogs, I guess). I ended up with the following character:

    You may see that it’s not a perfect match with the description in the file, but that’s not a problem. The description is just here to help me getting started.

    Of course while creating a new character I always go through the same process: concept, modeling, texturing, animation, behaviour. All are done in Blender, except the last one, which is actually coded/programmed in Unity. If you’re curious about the character creation process, you can check out this tutorial I made a while ago.

    The behaviour can be quite difficult to code, because it heavily depends on what the player (you!) has already accomplished. For example, when you talk to Tal, she may speak about the storm that broke the pontoon, or your last mission, or may react to something you just found. And of course, the more missions/possible actions, the more dialog lines she may say.

    Tal, in game.

     

    II – Terry

    Terry is one of the guy running the earth-island posts. You can talk to him to go from one island to the other. I wanted the kind of cool blond surfer guy with a tribal tattoo. For the concept, I didn’t use a character file, because he’s a quite secondary character, and I didn’t have to think too much about his background. I made a simple drawing:

    A simple sketch of Terry

    Which ended up in 3D:

    Terry the earth-island guy

    For the behaviour, I was faced with a new problem: the player has to answer during dialogs (choose a destination), and has to pay to travel. So I modified the dialog system in order to add possible answers with associated actions. This complicated seriously the dialog tree! By the way, I also used this new dialog system for selecting tutorials on the thief guild island. This finally rised the dialogs to 100 lines, and the translations to 200 lines (not all translations are in dialogs).

    Oh… and a rather practical consideration: Terry stays at the main island earth-island post. Thus, he can’t be on every island at the same time. So, I decided he’d have brothers on each island to manage the local earth-island post. Thus I had to code some dynamic name changing according to the location.

    The earth-island post of the pirate warehouse island.

     

    III – Various stuff

    In addition to the previous stuff, I also worked on various “little” things:

    • A cutscene to present Tal, and the hero home the first time the player is on Tera Island
    • 2 additional tutorials at the thief guild, enabling you to learn how to use the Bo (to fight) and the slingshot (to shoot little stones)
    • A specific font to make the world more believable. I used it on Tal computer screen, but also on signs, and I may use it on other places as I keep on adding stuff.
    • A new interface (HUD) to see the mission list
    • Real credits, with your name inside if you helped me in a way or another πŸ˜‰
    • A new skin for the website. But I think you already noticed πŸ˜‰

    So that’s all for now. See you soon!

  • World of Thieves – New Free Demo

    World of Thieves – New Free Demo

    And here is the last demo of World of Thieves, a 3D adventure/stealth game between “Zelda” and “Beyond Good and Evil“. Don’t hesitate to test/share/reblog/comment/like if you want to help me!

    This is the end of December demo!This is the first “complete” demo, with all levels built together, and a global (simple) story going on. And from now on, you can complete an online survey to tell me about the game.

    Controls:

    • QSDZ or arrows: move the character. By default it’s AZERTY-friendly, but you can change the config in 5s on the splash screen.
    • space: jump and climb
    • mouse move: move the camera
    • mouse wheel: zoom
    • left click: attack
    • multiple left clicks: chain attacks
    • hold and release left click: mega attack
    • hold right click: aim with secondary weapon
    • release right click: shoot with secondary weapon.At the moment, you can’t shoot while running.
    • E: weapon menu (useless in this demo)
    • A: mission list
    • Tab: head up display of the map… if you have one.

    There are four weapons (but only the bo and the slingshot are effective in this demo):

    • Bo (woodstick): basic melee weapon
    • Slingshot and stones: use it to catch the attention of enemies. 
    • Bow and arrows: to make enemies sleep.
    • Graple: useful to get onto unreachable walls.

    Easter Egg: OK… That wasn’t intended but there is still something quite funny to discover in the title menu… Beware it’s quite difficult to find

    Bug hunt and feedback: As usual, contact me for bugs or any feedback.

    Have fun! Peace! and Merrrrrryyyyyy Christmaaaaas!

  • First stealth level

    First stealth level

    After this week demo, I will talk about little enhancements and the creation of the first stealth level in a pirate warehouse!

    I – Little enhancements

    • I added a new screen for object discovery: the first time you find a casual item or every time you find an important item, a little screen pops up to explain what it is an how it works, with a little animation of the item.
     The new item discovery screen
    • I also tested to add a cast shadow everywhere, just to see the effect. Maybe it won’t make it until the end, but it’s not too expensive to test (in terms of work). This made me discover a lighting bug: there is some light flickering when the sun sets down and the moon raises because Unity only renders shadows cast by the most powerful light. So I had to smooth light transition between the sun and the moon.
    • Then I wanted to work on the graple animation of the character, because it’s the only one that hasn’t been set yet (even if only in a rough state). I had a very hard time designing the graple itself, to the point where I gave up because I was losing too much time on it. Maybe later… But I set up the basic aiming and flying animations, which makes the trick already.
     I belieeeeeve I can flyyyyy : the graple animation! (This item is not usable in the demo…)

    • And finally I worked a bit on the AI of the enemies: I added some reaction when they see one of their colleagues down. So now, they can check out the fallen guy and look around if they spot you. The problem was that I wanted them to remind which guard was down, otherwise, they would check each time… So I implemented some kind of relatively simple memory to avoid this stupid behaviour.

    II – Item creation and level design

    Another big part of this month work was to create items, including modelisation and texturing of simple objects: nets, pontoons, lanterns, various wood stuff, ramps, ramp poles, chests, doors, switches, keys, ropes, apples, map, …  But, of course, modeling a door and a switch does not make them interact together. So I coded “simple” (and obvious) systems to make a switch open a door, a chest give items once opened, an apple restore life, …
     

    Aaaah! Lantern and fireflies… πŸ™‚

    Meanwhile, I gathered all those items to construct a “simple” level. I wanted to create the first stealth level (even if you can fight against the enemies). By the way, it would be the first level with pirate enemies. In order to create this first level, I made various logical schemes (even if not very complicated), and ended up with a simple level design: a warehouse secured by a magnetic key where pirates keep their stuff. I added 2 other “big” buildings around to make it more believable: a restaurant (where the guys would eat) and a dormitory set up in a former sailing ship (for the pirate-ish look). I wanted wood, sails, nets and ropes everywhere to accentuate the style.

    Once the basic idea was established on the paper, I created the level in Blender using it as a level editor rather than using Unity 3D (which is supposed to have level editor capabilities), because I found out that object positioning is not that precise in Unity. Moreover, and most importantly, I can’t model objects in Unity, I can only copy and instantiate objects already modeled in Blender.

    The level in Blender. I used a lot of “empty”s with special names to create all the “complex” objects (hero, enemies, doors, chests…) that will be replaced in Unity.

    So, I enhanced my simple script dedicated to parse a level created in Blender to partially convert it into smart objects inside Unity (I already talked about this basic blender editor stuff here). I had to find a way to give “parameters” to objects in Blender that could be reinterpreted in Unity, for example: a parenting link is used to represent the key-door relation, a simple tag in the chest object name describes what can be found inside, same thing for a map point name, etc…

    The level once imported in Unity. Complex objects are not replaced yet.

    The level in Unity after replacing all the complex objects.

    But… actually finishing the level (or at least polishing it until it had a nice look) took quite some time! I had to place more than 1800 items in this level! And it’s really not big… Creating content may be longer than I expected… :p

    See you next time!
    Peace!

  • World of Thieves – New Free Demo

    World of Thieves – New Free Demo

    And here is the last demo of World of Thieves! It’s a 3D adventure/stealth game between “Beyond Good and Evil” and “Zelda”.

    This is the end of November demo! I’m still quite unsatisfied with it… πŸ™ There are still crazy bugs in the climbing system and this first “stealth” level is not finished yet (so, once you found the red magnetite, there’s nothing more to do except exploration). And the usual posts are coming to explain how this is done.

    Controls:

    • QSDZ or arrows: move the character. By default it’s AZERTY-friendly, but you can change the config in 5s on the splash screen.
    • space: jump and climb
    • mouse move: move the camera
    • mouse wheel: zoom
    • left click: attack
    • multiple left clicks: chain attacks
    • hold and release left click: mega attack
    • hold right click: aim with secondary weapon
    • release right click: shoot with secondary weapon.At the moment, you can’t shoot while running.
    • e: weapon menu
    • tab: head up display of the map… if you have one.

    There are four weapons (but only the bo is effective in this demo):

    • Bo (woodstick): basic melee weapon
    • Slingshot and stones: use it to catch the attention of enemies. 
    • Bow and arrows: to make enemies sleep. You need 4 of them to stun an enemy
    • Graple: useful to get onto unreachable walls.

    Easter Egg: OK… That wasn’t intended but there is still something quite funny to discover in the title menu… Beware it’s quite difficult to find

    Bug hunt and feedback: As usual, contact me for bugs or any feedback.

    Have fun! Peace!

  • Gameplay video – Pirate warehouse

    Gameplay video – Pirate warehouse

    Here is another gameplay video of World of Thieves. This time, it’s the pirate warehouse level. If you plan to play the demo, don’t watch it, or else it will spoil you what you have to do.
  • Water interactions

    Water interactions

    Hi everybody!

    Here is the usual sum-up of my recent activities, mainly water-character interactions here.

    I – Swimming animation

    OK! The first idea was to enhance the swimming of the character. So I first worked on the swimming animation in Blender in order to make it more believable (if you played the last demo or watched my last video, you may have noticed that there was no swimming animation).

    And once the animation was done, I had to work on the transitions with the other possible states of the character. The more states already exist the more complex it is to insert and “connect” the new one. So I worked mainly on the following transitions:

    • swim / climb: the character  can now fall down into water while he is climbing, or jump out of water to a wall
    • swim / walk: the character can progressively come from a slight slope beach into water and once he is in a deep enough water zone, he transitions to the swimming state.
    A very basic animation. But, we’re only going to see the head out of the water anyway.

    The final tweaks needed were on the swimming speed and “inertia”. Of course, in water, a body is subject to the Archimedes principle as well as to some liquid friction. I started by coding the exact “realistic” forces, but those are not “reactive” enough to make the game nice to play. So I had to tweak the values and coefficients in the equations to give the game a good response time. But I’m not still quite satisfied with it. This may require more work.

    II – Particles effects

    Now the character swims! But visually, the moves in water seriously lack some water reaction.
    I needed to add a few things:

    • a more or less huge splash when the character jumps into the water from a relatively high level
    • little splashes when the character walks in a bit of water
    • falling droplets from the character when he comes out of water
    • ripples and foam around the character while he’s swimming
    • ripples and foam around land and platforms immersed in water
    • little water splashes for small object falling into water (arrows and stones mainly at the moment).

    And finally, I had to set up the exact same water particle systems for ennemies.

      Simple ripples and foam around the character
      Foam around a little island and water splashes while the character walks in the water. Well, OK, it lacks a beach…

      Little droplets falling from the character after a swimming session. Subtle… But more obvious with the animation.
      Ripples around ennemies in water. This required to correct all the sizes and parameters of the water effects.

      A few more updates are coming, hopefully with a new level in the next demo at the end of the week.

    • Gameplay Video

      Gameplay Video

      A little gameplay video of the current version of World of Thieves. There are still bugs, but you can get an idea of the style of the game.

    • World of Thieves – Fight Demo

      World of Thieves – Fight Demo

      And here is the last demo of World of Thieves! It’s a 3D adenture/stealth game between “Beyond Good and Evil” and “Zelda”.

      Actually this demo is a single whole new level (some kind of pirate marina) to test the fight system. But you can also try the stealth approah if you want πŸ˜‰ However, I don’t think this level will be in the final game, it’s only a test level. There’s no real goal except getting all the 74 “magnetite” bonus items. But you can wander around and see what happens.

      Controls:

      • QSDZ or arrows: move the character. By default it’s AZERTY-friendly, but you can change the config in 5s on the splash screen.
      • space: jump and climb
      • mouse move: move the camera
      • mouse wheel: zoom
      • left click: attack
      • multiple left clicks: chain attacks
      • hold and release left click: mega attack
      • hold right click: aim with secondary weapon
      • release right click: shoot with secondary weapon.At the moment, you can’t shoot while running.
      • e: weapon menu

      There are four weapons:

      • Bo (woodstick): basic melee weapon
      • Slingshot and stones: use it to catch the attention of enemies. 
      • Bow and arrows: to make enemies sleep. You need 4 of them to stun an enemy
      • Graple: useful to get onto unreachable walls.

      Easter Egg: OK… That wasn’t intended but there is still something quite funny to discover… beware it’s quite difficult to find

      Bug hunt and feedback: As usual, contact me for bugs or any feedback.

      Have fun! Peace!

    • Hero equipment

      Hero equipment

      In the previous post, I talked about having pirates who track the player. But the hero doesn’t have any means to respond. So, as he is a thief, and not an assassin, I will give him non-lethal weapons: a wood stick, known as a “Bo” in martial arts, a bow with sleeping arrows, a slingshot, and a graple (at the moment at least). Those are quite classical, but offer different kinds of gameplay. I have a mile-long list of what additional features I could implement but you have to start somewhere πŸ˜‰

      I – Bo

      The most basic weapon and surely one of the first you’ll have in the game. I wanted to create various moves that can be chained in order to create combos. It brings visual variety and may add a bit of strategy to choose the best moves according to the surrounding enemies. For now, I have set up 3 different moves, that you can perform by clicking repeatedly on the left mouse button. Setting up the time frame tests to chain the combos was a bit difficult, because according to when the player hits the button it may be too late in the current animation to softly blend with the next combo move. So I implemented special curves on each animation ruling when a click triggers the next move and when it’s too late. 
       The first simple move with a trail render

      To add some “cool” effect while working on the Bo attacks, I added a trail render on this weapon. A trail is calculated by building a stripe mesh between the successive positions of the weapon. But the problem is, if the weapon is too fast, there are not enough points to make a cool smooth trail. So I had to use a clever interpolation trail script nicely provided by the Unity community. This effect is quite nice, but I didn’t want it on every frame (for example when the player is walking, that’s unnecessary)! So here again I added some custom curves to the animation to trigger the trail effect only during the hitting phase.
      Talking about the hitting phase, this was really harsh to implement because even if Unity provides collision detection, a few issues have to be addressed:
      • what happens if an enemy collides with a weapon that is not performing a hit move?
      • what happens when the move is so quick that the weapon goes through an enemy without actually touching him in any frame?
      • what happens if a weapon touches an enemy twice (or more) in a move?
      So I  used custom curves again for effective hit timing, and I set up quite a large collider for weapons, which is actually the case in a lot of games: I watched videos of Zelda and Beyond Good and Evil (my usual references) stopping them on nearly every frame to analyze the range of the weapons, the look of visual effects and the timing of animations. They are absolutely not realistic, not even precise, but they are very fun: for example, have you ever noticed that in most games a hitting move is actually slower than the move to get back to its start position? I hadn’t until I had to code it, which is quite strange because in reality you expect the hitting move to be the fastest of all…
      I also added a unique id to every hit move to easily check if the hit has already been taken by an enemy or not. This is more useful than a simple “invincible state” for a few seconds after a hit because in combos, 2 successive hits can be very close to each other. 
      Mega Attack! A 360Β° quick turn with a longer range.

      Then I added some kind of “mega attack”, which is also classical in video games: press a button for a few seconds and release it. I added a different trail effect, and changed the impact force. But I had a big problem with the circular animation I wanted to set up for this special move: the hero performs a 360Β° move while hitting, but the rotation interpolation made him turn in the wrong way at the end of the anim because it was using Euler angle interpolation and not Quaternion (yes, math stuff). So I had to recreate it again, and I didn’t get it perfeclty right yet, but the move is so fast that it’s really hard to see the flaw while playing.
      Another problem (yes there are tons of them!) is the holding of the weapon: it’s in the back when you don’t use it, this is quite common. But when you start a hitting move, does the player first grab the weapon then hit requiring two click from the player (just like in Zelda?) or does it perform both moves at once? And once the attack is performed does he keep the weapon in the hand? Do I use a button to put it back on the back? Is is automatic? 
      At first I thought I could use the same weapon-grabbing system as for the pirates, but this might be a mistake, because, for the player, what I want above all is reactivity and simplicity in controls. That’s not a problem if the enemy performs a weapon grab move quite slowly before hitting (that’s even actually very useful , because the player understands that the enemy is going to attack him), but for the player this goes against reactivity. When you hit a button to perform an attack, you want it to be fast (sometimes you are in urgent situations!). So I chose to perform both the weapon grabbing and the attack in the same move. Then, I set up an automatic detection of alerted enemies nearby and recent attack activity to automatically put back the weapon on the back when everything is quiet again. And as I could continuously check this “fight mode”, I added some kind of guard/defense position while fighting.

       Guard position. It works also with the Bo in the hand.

      I also noticed that aiming precisely with the Bo during a fight was quite difficult, so I added some automatic detection of the nearest enemy in the direction of the move. This simplified a lot the game, but makes it quite fun I think.
      To conclude on this part, I will just talk about a tricky bug I spent a lot of time on: what happens when you click so fast that it passes between all triggers? To debug this, you have to click in less than 0.01 s, and be able to pause the game just after! So I set up a few indicators that should be framerate independent to carefully detect very fast input change. These bugs occuring on just one frame are really hard to catch. It’s already physically hard to make them occur… But those “frame perfect hits” are used a lot by professional gamers to hack/”speed run” games. You can find impressive videos of those abuses on the net. And there are a lot of games out there whose behaviour is somehow undefined if the player performs incredibly fast and complex inputs. And I bet I still have loads of bugs like this…

      II – Arrows

      OK, next weapon! Yes, the long first part was only for the Bo! Bow and arrows seem quite simple to implement… But as usual they aren’t. The more I have to code and create “simple” things, the more I understand they are never that simple. And it can be so tempting by looking at the work of other people to think that what they do is simple, but I think you can’t tell if you haven’t tried. 
      Sooo… the first problem is : first-person view (aim as if you were looking with the eyes of the character) or third-person view (aim from the back camera)? The first-person view is more immersive but breaks the perception of the game and is more difficult to use in a fight. The third-person view doesn’t break the game perception, but it’s quite complex to code because what you see/aim from the camera is not necessarily shootable from the character… even without talking about gravity. We can find both styles in video games, but I have a preference for the 3rd person view, and I actually would like to have a fight system enabling combos between range and melee weapons, so I want a reactive arrow aiming (and thus, nothing disruptive with a camera change).
      But even with those considerations, questions are still there: I have to set up a sight icon, but when the player shoots, will the arrow reach the exact point the sight aims at (which requires complex calculations anticipating gravity and all obstacles on the path)? Or is it mostly some kind of helper towards which the player always shoots in the same way, and then gravity does its job? I chose something in between as usual: within the range of the bow, the sight icon represents exactly the spot where the character will shoot because within the range, arrows go straight without gravity being applied. Beyond this range, gravity is applied, and precision of the shoot is not guaranted: the sight icon becomes red. But you can shoot anyway and see what you get.

       You can shoot here.

       But you can’t reach this far away arch. Or at least, not precisely. And yes, you may recognise the old bridge level from my very first demo. I still use those levels as tests.

      Another thing was: can the player shoot while running or moving? I thought the answer was no… Because you can rotate the camera with the mouse (to aim) and move the player with the arrow keys, enabling him to aim at a specific point while going in the opposite direction. This requires complex animation blending (running and aiming at the same time) that I don’t have the time to set up at the moment. Maybe later… because I found out this burdens the fight game experience.
      On a more artistic side, I had to create the bow and arrows and carefully place them in the hand of the character. A quite annoying problem I was faced with was: is the bow visible when we don’t use it (like the Bo in the back)? If I choose to make eveything visible is the back (or somewhere else), this may visually clutter the character, plus I need moves to get every weapon. And there are a bunch of games out there whose characters take out weapons/items from nowhere, and that’s OK. So at the moment, the code enables to hang weapons everywhere on the character, but I think I won’t use it for every weapon.

      III – Flingshot/stones and graple

      Functionnally, Stones are quite the same thing than arrows (so the problems were already solved!), except they don’t send the pirate to sleep, but catch their attention by making noise. Of course, I had to model the flingshot and stones and adapt them to the aiming position.

      A well-aimed shot with the slingstone and every enemy will come to the hit point. OK, here I aim very badly…

      Concerning the graple, it enables to quickly jump onto a wall, even if it’s not normally reachable by climbing. I always thought this was very cool in the Zelda series. This will be used to get to unreachable areas in the game. It still uses the same targeting system, but I had to make more checks to ensure the target was actually climbable, but this test was already (more or less) coded in the climbing algorithm. At the moment there is no visual item for the graple, it seems more like some kind of magic teleportation. This will be fixed later.

      IV – Various stuff

      I also added a simple item/weapon selection menu. At the moment, you can only change the secondary item (right click). The primary item (left click) is always the Bo.

      A very simple weapon selection menu (well inspired from World of Ninjas… :p)

      And with all these weapons, another raising problem is the priority between them: what happens if the player starts clicking left, them hold it for 0.5s and then adds a right click on top of that, releasing first the right click, then the left one? Which weapon is prioritary? Some of the weapons react to pressing down a button (simple Bo attack, bow aiming), others on releasing it (bow shooting, mega Bo attack). Some need to be “charged” by pressing the button for 1s (mega Bo attack), others don’t (graple). How to combine all this while maintaining a consistent state within the player? And what happens if, in top of that, the player calls the weapon selection menu which preempts every click? What if this is the main menu? What if both at the same time while pressing both mouse buttons? Which events are preempted and which still go through? This was a huge mess to sort out.

      Aside from these annoying technical problems, I also worked on little things here and there: I started to code the swimming ability, I added 3 climb animations, 2 species of butterfly randomly flying around and avoiding the player, I corrected bugs, …

       Ooooh! Butterflies everywhere!

      Next I’ll have to polish everything in here, from animations and timing, to speed of the enemies, their reactivity and the power of all weapons in order to make it more well-balanced. But this phase couldn’t be tackled without having all the basic moves/behaviours coded! We are nearly done! OK, that’s all for today, I hope it wasn’t too much, but problems this month were really tough!

      See you in the next post for the fight system demo, and maybe a gameplay video if I have time πŸ˜‰

      Peace!

    • Bringing pirates to life

      Bringing pirates to life

      Hello everybody, it’s been a while!
      I finally managed to get back to work after these long holidays… And since the beginning of October, I’ve worked mainly on the combat system, and interactions/items/weapons. So the incoming demo will focus on this part. I won’t post again the tutorials and 1st level, even if I fixed a few bugs on them. And today post mainly describes the creation of enemies.

      I – Moving Pirates!

      OK, let’s start by talking about pirates! Of course, it doesn’t make any sense to code weapons/interactions if there are no other characters to interact with. So I finally used my old pirate character (see this post) to bring him to life. I added a few animations, especially punching, aiming, being stunned and seizing a weapon. By the way, I used a quite singular weapon I had the idea of a while ago: an anchor. It can be used either as a melee weapon (it goes well with the tough bad-guy look of the character as well as the overall sea theme) or as a range weapon (it looks so much like a giant crossbow!).
      This is a big anchor πŸ™‚ And yes, I made a test level where you can walk on water. Just for fun.
      Once every models and animations are created, the most difficult part comes in: synchronizing everything in the game. Because depending on the state of the pirate, the weapon can be held on his back, or in his hand. As the character is deformed by a skeleton, this means that the weapon is linked to a particular bone to follow the movement of either the hand or the back of the pirate. But when the character reaches for the weapon, this link changes. And it has to change at a very precise time and place. This is very long to set up and finely tune, because it involves a lot of going back and forth between the 3D modelisation software (Blender for me) and the game engine (Unity), as well as executing the game frame-by-frame.
      The precise moment when the weapon goes from the back to the hand of the pirate. This seems so simple when you look at it… But I spent hours on this.
      So I finally set up something I hope is quite generic and flexible: the pirate can carry various weapons and can have different moves to automatically catch the right one. With this sytem, I should be able to create enemy variations quite easily: various weapons, ammo, strengths, speeds, aggressiveness, textures and skins… And of course, the pirate should be able to choose his weapon according to some kind of analysis of the surroundings….
      I also added a few particle effects and sounds on the hits.

      II – Reacting Pirates

      …Which leads us to the high-level AI (artificial intelligence): now that basic moves are set up and well coordinated, I want my pirates to have some kind of “intelligence”, or, at least, believable behaviour. And this is generally a huge burden in video games, even the most recent ones. I already tested a few simple algorithms myself in my little game World of Ninjas as to how enemies can react to the player behaviour. 
      I kept the same global scheme, and, for the moment, in World of Thieves, enemies basically shoot at the player when they see him, try to get close to him and punch him when they don’t have any arrows left, and search for him when they can’t see him anymore. Of course, it is impossible to create a perfectly realistic behaviour, because there are so many things to take into account. So, as usual, I asked myself a lot of questions, like:
      • Do they have an infinite number of arrows? If yes, they don’t ever have to come close to the player, but that’s obviously unrealistic.
      • Do they punch with their bare hands or with the anchor? Can they switch? If yes, when would be the moment?  
      • When they “die” (fall asleep actually), what happens if they’re holding their weapon? Do they keep it in the hand? Do they put it back on their back (which is in no way likely to happen when you fall asleep)? Do they leave it away on the floor? If it goes away, the player will surely try to catch it and will be disappointed if he can’t.
      • If a pirate has many weapons, how does he choose the one to use? 
      I’m lucky they don’t have infinite ammo.
      Usually all these questions lead me to think about “what would *I* do?” Then, “Is it interesting for the gameplay?”, then “How many additional modeling, texturing, animation, coding, and sounds this ‘simple’ move will require”? Is it even possible to code such a behaviour for a real-time game? Does the fun it gives counterweights the required time and problem solving to set this up, which you can’t obviously know without actually doing it?
      And one always has to sacrifice some aspects to save others. It’s ALWAYS a matter of compromise.  But at the end, the only question I should have to ask myself is “is it believable enough to have fun?”. And I regularly see people playing my game without even noticing all the little behaviour/logical flaws I see everywhere.

      III – Cycling the behaviour

      So I’ve got something quite OK for the fight attitude. But I want my game to be a “non-killing” game. So enemies won’t disappear when you beat them. They fall asleep where they are. But this raises other problems: 
      • Do they fall asleep forever? 
      • If no, when do they wake up?
      To this point, I thought it could be done easily: they sleep for a while, then wake up with their full strength and they’re back in the game, remembering nothing because they are stupid pirates.
      But while coding attacks from the player (more on this in the next post), I noticed that it would be funnier if there was some kind of impact projecting the enemy back (as in a lot of video games by the way, that’s no coincidence). But, by adding those impacts, enemies may be thrown away in areas where they are not supposed to walk (sloppy roof, water, another enemy, a big hole from which they can’t get out…). This simple decision made me think a lot about what an enemy who falls in such an area should do? Just disappear? Dig and get back to his previous place? Be killed? Teleport back?
      The hero can do a lot of moves, but the enemy doesn’t have the climb ability (for purely technical Unity reasons), so I had to find something else…When I was sick of spending so much time on such an insignificant choice, I finally gave up and chose to make the ennemy stay there, and “reset” to his start place when the player is far away and doesn’t look. While waiting, I will make him have a funny animation like playing dices, playing with his parrot, drinking rhum or whatever a pirate does when he waits. About the water, if they fall in the sea, they just stay there too, enjoying the calm while floating on their back. I like the idea of “water-addicted” pirates who become useless once surrounded by water. Of course, I’ll have to make this funny by making them say stupid things like “Oh I forgot how cool it was to take a bath”, “Waaaaaaateeeeeeer”, and other “Ooooh the sky is so beautiful from here”, in short, things a really-tough-pirate guy would certainly not do. But, hey, this is a humorous game, and those guys already have a “Mom” tattoo.
       Bath for everyone! And yes, in this level, you can’t walk on water. I had to test the swim and floating moves πŸ˜‰
      That’s incredible to see how a simple decision as “arrows project back enemies” impacts other aspects like “can the psychology of the pirate justify its non-action in water?”. Everything is so intricated if you want to create something consistent (not necessarily realistic, but consistent in its own way)!
      So at the moment, pirates react… But they are still quite stupid (it’s Artificial Stupidity), you can check it in the next demo πŸ™‚
      In the next post I’ll talk about creating the equipment/weapons for the main character.
    • Demo World of Thieves

      Demo World of Thieves

      Here is the last demo of World of Thieves! It’s a 3D adenture/stealth game between “Beyond Good and Evil” and “Zelda”.

      Controls: arrows or [zqsd] + space + mouse. By default it’s AZERTY-friendly, but you can change the config in 5s on the splash screen.

      Easter Egg: OK… That wasn’t intended but there is something to discover in the menu or the cutscene… beware it’s quite difficult to find! Have fun.

      Bug hunt and feedback: As usual, contact me for bugs or any feedback.

      Have fun! Peace!

    • Demo World of Ninjas

      Demo World of Ninjas

      Here is the enhanced demo of World of Ninjas! It’s a 2D top-down view stealth game, somewhere between “Commandos” and “Hotline Miami”, where you can create your own levels.

       Game Rules

      • Goal: On each level, get the sword(s) and escape far away from the buildings (in any direction you want). Just get far enough (in reality you have to leave the level area).
      • Controls: arrows or [zqsd] + space + mouse. By default it’s AZERTY-friendly, but you can change the config in 5s on the splash screen.

      Level Editor

      • Use Paint or whatever image software you like to create a PNG file with a black background in the “Levels” directory. Levels don’t need to be huge to be fun; 100x100px is already enough, but you can create whatever size you want.
      • Blue pixel (0,0,255): player (it’s the minimum requirement for a level to be playable)
      • Red Pixel (255,0,0): enemy. Don’t put too much of them, it can slow down the game, but it depends on the power of your computer…
      • Yellow Pixel (255,255,0): path for the enemies. An enemy will follow a path if he’s just NEXT TO a yellow pixel. You can use a single yellow pixel to make an enemy move to it an look in that direction.
      • Grey Pixel (128,128,128): wall
      • White Pixel (255,255,255): goal (sword). You can set multiple goals if you want
      • Purple 1 (255,0,255) : life bonus
      • Purple 2 (255,64,255) : ammo bonus
      • Purple 3 (255,128,255) : bomb bonus
      • Purple 4 (255,192,255): mine bonus
      • Green (0,255,128): a cherry tree:)

      Don’t hesitate to check out the available levels to get an idea of the color use. Be careful, you need to use the exact color codes (R,G,B) described above.

      Don’t hesitate to send me your levels if you achieve to create something cool :). May be I’ll add them to the next version of this game! And as usual, contact me for bugs or any feedback.

      Thanks guys, and I hope you’ll enjoy it!
      Peace πŸ™‚

    • Cutscene and polish

      Cutscene and polish

      Hi everybody,

      It’s been quite a long time since the last post (and it will be even longer until the next one).

      I – So… What did I do?

      During this month of August, I worked on a lot of different things…

      • First, I worked on the graphics of World of Ninjas (my speed-dev week game, made at the end of July)
      • Then I worked on creating a “cut-scene” engine for World of Thieves. Hence, I could create a short animated introduction to the game. And I’ll be able to (hopefully) easily add other ones in the future. This will be the focus of today’s post.
      • I also cleaned the code and the resources because it’s starting to get huge! I have nearly 2Go of data among which 3D models, textures, sounds, … All this MUST be structured and well organised when you have to fix bugs, improve graphics, correct sounds; otherwise, you spend hours searching for the last version of the resources.
      • While I was creating the intro cutscene, I really noticed the lack of music, and I felt inspired to set up a complete workflow for music creation. I spend 2 days trying to configure a Computer Aided Music pipeline… UNDER LINUX: Jack (fundamental real-time sound server) + Rosegarden (midi composer and partition editor) + Fluidsynth (synthesizer) + Hydrogen (drum-specialized midi composer) + Ardour (multi-track audio recording and mixing) + Audacity (sound modification tool)! Yes! Because I always did CAM under Linux, and I think the softwares are really great and FREE of course… But you have to be willing to spend a few days trying to understand them. More on this later πŸ™‚
      • Finally I added some polish to the game: icon, title menu, some help in tutorials and notifications when you get an object, additional graphic improvement and of course, as always, fixing bugs and lags…

      So, today’s post will focus on the animated introduction of the game.

      A screenshot from the opening sequence

      II – Creating an opening animation

      If you have already tested the previous demo, you may have experienced a few difficulties to get into it. That’s because there is no global introduction to the game setting up the “context”. All games have this kind of introduction to enable the player to progressively enter the game. Even movies have them. Introduction sequences are often wide shots where you can have a grasp of where and when the action takes places. With this in mind, I made a storyboard about this intro a while ago:

      A quite unreadable storyboard (in French) with a weird reading way πŸ™‚

      Of course, these are personal notes, and I have a very poor hand-writing, so you may not understand all. But the goal was for me to have a record of the general idea of how the camera moves, what happens on screen, what is the timing… etc. This storyboard was very optimistic πŸ˜‰ Finally, I simplified a lot of things… For example, at the beginning, there is only the hero on the boat at the moment. Maybe I’ll add more guys later. But those are not mandatory for the story understanding.

      III – New 3D models

      OK! I have the idea more or less clear in my head and on the paper, now it’s time to actually model all the stuff we’ll see. This includes:

      • The Thief Guild Island: until now, I only had the “inside” of the main yard. I have to add the “outside”, that is to say the whole island.
      • Various decoration stuff: fir trees, benches. I already had a few ones that I took from the Eagle Island.
      • The ship on which the hero arrives at the island. 

      This doesn’t seem that complicated…
      …except… that at the beginning, I don’t have a very precise idea of how they may look like. So I spend a lot of time trying to “design” their look. Do I want something curvy? Something blocky? What colors? what materials? Something original? Classical? Can the viewer/player understand what it is at first sight? Does it merge well with the graphical style? Of course, one can always say “I want something cool!”… But what is cool? Can we draw it? This pushed me to draw a lot of concepts. And it took me very long to achieve the result you’ll see in the next demo.
      The 3D model in itself is sometimes complex to create, but the idea is a LOT longer to flesh out. It’s a long period of trial and errors, coming back-and-forth between Blender, GIMP and a simple paper sheet. Moreover, you have to put this necessary time in balance with other things: do I have the skills to create what I have in my head? (Obviously, not yet…) Can I spend more time on this according to my planning? (Obviously, no again, I’m always late…)

      Some of the concepts I tried before I finally achieved something that “was OK” (but far from perfect). You may notice that this is a mess because I tend to draw everything at the same time: buildings, vehicles, characters… I just think about stuff… and they sometimes mix between them.

      The new Thief Guild Island and a “conceptual” Earth-ship: a floating island propulsed by two engines (the “floating” island has a “scientific” explanation, that will be detailed later in the game). It’s not just random stuff. By the way, my cartesian mind sometimes bother me when it comes to design, because I always think, “this is not possible in the real world”, and I have to find some (basic) believable explanation for everything I have to create.

       

      IV- Animating the models

      Nice! I have the models! But nothing moves by now… Luckily, this first scene doesn’t need a lot of animation. But there are a few ones: water splashes and foam around the boat, the running hero, the camera, and of course, birds and fishes.

      Surprisingly enough, the most difficult one to set up was the boat foam and water splashes, because they rely on particle systems that are really CPU-hungry! So, I spent a lot of time finely tuning the memory use to avoid any lag. But I can’t be sure it will be OK on any computer. Time and tests will say.

      I already had the animations of the hero, the birds and the fishes, so that was a bit of a relief, even if I spent some time on the hero trajectory.

      V – Adding sound

      And, no that’s not finished yet. Because a silent animation cutscene is quite weird. Here again, I already had the sounds of the sea, the wind, seagulls and fishes. But I spent sometime creating the engine roaring sound. I took a creative commons sound on the internet, but the problem was none of the sounds you find on the internet are loopable. Because I want my engine sound to play in loop (I don’t want to stock a 4h-length engine sound that will saturate computer memory).
      Hence, I used a software called Audacity (great free sound editor) to make the engine sound loopable without the ear being able to notice any peaks or clicks… This was quite new for me, but I finally achieve to made something decent by playing with various samples and alternatively fading them in and out.

      VI – Adding music… Wait! What?

      And that’s it! Because I didn’t have the time to create a full soundtrack for this animation. However, I tested it with the Ocean Theme of Zelda Windwaker, which is really the atmosphere I want for this game, and it’s kinda cool! But I won’t use this (c) Nintendo musical property in the end, neither in the incoming demo, for obvious copyright reasons.

      So, don’t go to far, there are 2 demos coming in a few minutes… 2? Yes! The graphically improved “World of Ninjas” and the classical “World of Thieves” with the introduction cutscene, the tutorials at the Thief Guild, and the Eagle Island level!

      See you soon!