Friday 28 November 2014

Old school controllers to USB projects

I started some electronic projects to convert old school game controllers to USB controllers. They can be found here:
The project names are quite self explanatory. They are still in progress. The hardware part is done with Kicad. I didn't produced the boards yet, so I'm not 100% sure of the footprints I created for these projects. The software was tested on a teensy++ 2.0 board with real controllers. These boards are quite similar from the boards I intent to make, so there should be very little problem adapting the software to the final product.

Software TODO list:
  • Rework sources to make them easily customizable, and include alternate firmwares for other devices than controllers (ex mouse, multitap, etc..).
  • Make them compatible with PS3 home button would be a plus.

Hardware TODO list:
  • The MegadriveControllerToUSB project could be used for Vectrex controllers too, I need to check if it's worth doing the modifications for compatibility.
  • I thought of including holes for ICSP connector and serial for debugging. I'm not sure if I should just replace those with simple contact point to reduce the pcb footprint. ICSP won't normally be used (bootloader can be used to re-program), same with serial for debug.
  • For the moment the boards are bare with no casing. I would like a casing, but don't want to sacrifice the compactness of the board for this. They will stay like this until I find a satisfactory solution.
  • For Turbografx, Megadrive and NES the clock is used to handle auto-fire features. I need to check the real consoles controller check frequency to produce a similar auto-fire rate. I'm not even sure if this is not game dependent.
I also intent to make a similar board for playstation controllers, including the step-up voltage for driving motors. This board should be very handy for making a USB midi controller out of an old guitar hero controller.

Sunday 27 April 2014

[LD29] Gold Diver

Here is my entry for Ludum Dare 29. Unfortunately the game is not finished. It's kinda workable, but misses a lot of features and packs a lot of bugs. I guess you can still get a little kick out of it with the proper alchool level in the blood, and the proper sleep deprivation ;)

Ludum Dare entry
Mac64
Win64
Flash
Sources
The game is not finished, but I hope you's like to check it out. It's a spin on the AntEater ardace game. The diver has to get passed the obstacles to get the gold treasures. Hit the action button to rewind the breating pipe and go back to the boat.

Keyboard Controls:
arrows+spacebar

Gamepad controls:
direction+A button

A lot of things are missing on what I was planning:
  • missing animations/graphics for sharks and crabs
  • missing sound overall
  • harpoon for the diver
  • droping the treasure when shooting harpoon or when getting hit.
  • Shark is attacking the diver and not the breathing pipe, but crab where supposed to attack the breathing pipe and not the diver. forcing to get some strategy to get to the loot.
  • Moving slower when bearing a treasure.
  • ....
My main problem that made me fail the Jam: I'm still not fluent enough with Haxe and HaxePUNK. I'll still recommend HaxePUNK despite all the problems I had with it.

Thursday 10 April 2014

I'll be there for you - Insanity Jam 2014

Last week I participated in the Insanity Game Jam. The goal was to generate a random crazy game idea from the generator and make a game out of it. My generated idea was "An indie game where you resurrect your friends with your friends.". The result is a puzzle game where you transplant organs from one friend to another in order to get everyone alive.
You can download the game here: Mac (x64) Win (x64)
The game entry for the jam is here.

Thursday 27 March 2014

Fighting Games History v1.0

As a toy project for learning HTLM5/CSS and JavaScripts I created a timeline that represents the history of all the fighting games. You can check the source code everything is in there. Be warn it's pretty ugly yet, i'm still learning. But I think it's not that bad. All the data is the HTML document, the core layout is handled with CSS, and Javascript is used to handle fine positioning of the elements and adding eye-candy graphics using canvas. It is a first version, I intent to add more games and more features like displaying additional informations on user interaction.

Friday 5 July 2013

Code reviews of horrors

This made me bang my head on my desk so hard I almost broke my glasses:

lock (new Object())
{
    // Code exprected to be thread safe...
}

Don't think it needs more explantation.

Wednesday 15 May 2013

Building Cairomm on windows

Just a quick post to document the few troubles I had building cairomm on Window. Here is my setup:
- Windows 8
- Visual Studio express 2012

I started using this awesome post that details the procedure step by step. It's globally still valid but as time goes there are a few tweaks that have to be done. Here is an updated procedure.

Setup

Install MinGW. Assuming you installed MinGW in "C:\MinGW" type the following command to install MSYS and all the tools for development:
mingw-get install msys-dvlpr

Download the sources for the following components:
- zlib
- libpng
- pixman
- cairo
- libsigc++
- cairomm
I recommend decompressing the source trees in the same directory next to each other, and removing the version information. For example rename the libpng-1.5.15 directory to just libpng. It will save some Makefile edition.

Open a cmd.exe terminal and run "c:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\vcvarsall.bat". This will set-up the proper environment for building with Visual Studio tools.

Building Zlib

Go in Zib directory and run:
nmake /f win32\Makefile.msc

Building libPNG

Go in libPNG directory and run:
nmake /f scripts\makefile.vcwin32
The script is hard coded to find zlib and will work if you named the directory as told.

Building pixman

Now we have to use MSYS. The Makefile will still use VS compiler, but it is not suitable for nmake. Open a MSYS console by running the command:
c:\MinGW\msys\1.0\msys.bat
In this console navigate to you sources directory (use "cd /c/Path" instead of "cd C:\Path"). Go in the pixman sources an run:
make -f Makefile.win32

Building Cairo

Still in the MSYS console, go in the Cairo sources directory and run:
make -f ../Makefile-cairo.win32 CFG=release

Build libsigc++

Now we are going to use Visual Studio for building our components. You can just open and build the project using libsigc++\MSVC_Net2010\libsigc++2.sln

Building Cairomm

Now is the build part. We have to manually configure the Visual Studio project in cairomm\MSVC_Net2010\cairomm.sln.
In Configuration Properties>C/C++>Genereal>Additional Include Directories add path to:
- cairo\src
- libsig++
- libsig++\MSVC_Net2010
In Configuration Properties>Linker>Genereal>Additional Library Directories add :
- cairo\src\release
- libpng
- zlib
- libsigc++\MSVC_Net2010\Win32\Release
In Configuration Properties>Linker>Input>Additional Dependencies add :

- cairo.lib
- libpng.lib
- zlib.lib
- msimg32.lib
- sigc-vc100-2_0.lib


When building cairomm-1.10.0 I had the following error:

Error 11 error LNK2019: unresolved external symbol "public: __thiscall Cairo::Device::Device(struct _cairo_device *,bool)" (??0Device@Cairo@@QAE@PAU_cairo_device@@_N@Z) referenced in function "public: class Cairo::RefPtr<class Cairo::Device> __thiscall Cairo::Surface::get_device(void)" (?get_device@Surface@Cairo@@QAE?AV?$RefPtr@VDevice@Cairo@@@2@XZ) C:\Users\antoine\Documents\Visual Studio 2012\Projects\PuillotPouillot\cairomm\MSVC_Net2010\cairomm\surface.obj cairomm-1.0

After investigation it turns out there was a missing file in the solution. In project cairomm-1.0 under Source Files click Add>Existing Item... and select the file cairomm/device.cc. This should fix the problem and end building the project.

Hope this will help.