About caribou (twitter: @caribouloche)

Entries

 
Ludum Dare 28
 
Ludum Dare 25
 
Ludum Dare 24
 
Ludum Dare 23
 
Ludum Dare 22
 
Ludum Dare 20

caribou's Trophies

caribou's Archive

My tools

Posted by (twitter: @caribouloche)
Saturday, April 26th, 2014 2:34 am

As requested and since i finally have a game idea i’m listing my tools :

  • Photoshop
  • GraphicsGale
  • Pyxel Edit
  • Sublime Text 2
  • sfxr

Programming-wise :

  • Client-side: Haxe/OpenFL/Enh/Anette
  • Server-side: Haxe/Enh/Anette
  • Enh: my entity system library with network support
  • Anette: my network library
  • Pyxel Edit map importer

Pyxel Edit map importer for Haxe

Posted by (twitter: @caribouloche)
Saturday, April 26th, 2014 1:47 am

If you’re using the awesome pixel editor Pyxel Edit (free version) and you happen to be a haxe user, you can probably use my importer.

https://github.com/Dvergar/PyxelEdit-Map-Importer

This is a really simple project but this is still time you can save for something else. You can basically retrieve a tile array of each layer and this is framework agnostic; but if you’re using openFL, i made a helper.

Here is an example on how to retrieve datas for three layers named “background”, “walls” and “objects” in Pyxel Edit and draw them on screen:

import flash.display.Sprite;
import openfl.Assets;

import pmi.PyxelMapImporter;
import pmi.OpenflHelper;

class Main extends Sprite
{
    public function new()
    {
        super();
        var pyxelMap = new PyxelMapImporter(Assets.getText("assets/map.xml"));
        var background = pyxelMap.getDatasFromLayer("background");
        var walls = pyxelMap.getDatasFromLayer("walls");
        var objects = pyxelMap.getDatasFromLayer("objects");
        var tilemapBackground = OpenflHelper.getTilesheetArray(background);
        var tilemapWalls = OpenflHelper.getTilesheetArray(walls);
        var tilemapObjects = OpenflHelper.getTilesheetArray(objects);
        var tilesheet = OpenflHelper.getTilesheet("assets/map.png");

        tilesheet.drawTiles(flash.Lib.current.graphics, tilemapBackground);
        tilesheet.drawTiles(flash.Lib.current.graphics, tilemapWalls);
        tilesheet.drawTiles(flash.Lib.current.graphics, tilemapObjects);
    }
}

How to make a cheap multiplayer online game in 48H

Posted by (twitter: @caribouloche)
Wednesday, December 18th, 2013 10:47 am

Network libraries banner

Assuming you know almost nothing about networking.

  1. Don’t make a MMO – it had to be in this list of course but more as a “keep it simple” rule
  2. You can actually make a MMO – honestly in a jam environment, mmo doesn’t mean much, so yeah you can make a game with mechanics revolving around unlimited number of players – if your server can’t handle it, you probably already won Ludum Dare anyway.
  3. Dont make an online game – unless you’ve got a good reason to, you’re going to lose a lot of time no matter what.
  4. Know your tools – If you can play with the network stuff beforehand, it’s better.
  5. Use a network library – ENet, Lidgren, Twisted… are great, if your game framework offers some network capabilities don’t bother and use that but avoid raw sockets ಠ益ಠ
  6. Unity networking is great for jamming – RPC & Component synchronization are fun things to play with; maybe less approachable than a simple simple send(x, y) though but this depends on the library and how you like to approach code.
  7. Consider using a game networking service – This is actually highly recommended, it wasn’t in this list at first because there wasn’t point 4. but things like SmartFoxServerPhotonCloudPlayer.ioFirebase are really great, they basically offer you an API client-side and handle all the server stuff themselves. It makes a lot of points disappear (like 5.); try the Firebase online tutorial, it’s damn simple. If you’re in a strange setting or if you don’t want to go this path try to estimate the time of handling the server hosting, port forwarding, firewall surprises and policy servers in some cases.
  8. Don’t make a dedicated server – aka don’t put all the logic on the server. Unless you’re comfortable with it, just make a simple server relaying messages between clients. If you’re using point 7. it’s already done for you.
  9. Client-side logic is alright – this is a jam.
  10. Cheaters are fine – The logic is on the player side, anyone can break things, but you don’t care.
  11. Don’t mind serialization – strings/JSON are probably fine too (don’t think in bits, obviously).
  12. Use reliable messages – If you’re using TCP you’re set, and for UDP libs, any decent one should have this option. You probably don’t want the hassle of handling unordered and missing packets for a jam. If you’re using point 7. it’s probably abstracted.
  13. Think networking / organize your code – this is probably the most important. Every line of code you write you should think about what message you will send and how you will consume it at the other end, so present your datas correctly. This is probably less significant when you’re not in a dedicated server setting but this is a good rule to separate your logic from your rendering anyway.
  14. Starting your project with network code is not a good idea YMMV – i used to make networking work before any game-related code but this is actually a real drag when tweaking & playtesting. It seems a bit idiotic to playtest a multiplayer game without players so you probably don’t want to do that (◑◡◑) but do as much as possible in local : art, game feel, rules (keep in mind point 13.) and then switch to the netcode. Having to start a server + client instance to tweak something while noticing this little network bug that prevents you from fixing this other thing is really annoying.
  15. Finish your game in the first 24H – Spend the first day making your game, spend the other one with network code, tweaking & playtesting. Try to give the right amount of YOLO-coding, be a bad coder when you can be bad (there’s a lot of room for this), be a tad less bad when it matters : game crashes. Don’t underestimate the productivity gained by time pressure aka the last hours : you probably don’t want to handle unexplored areas (networking) under too much time constraints, keep the constraints for what you know best so code it early, but not too much.
  16. The Jam (72H) is probably more realistic.
  17. Turn-based games are good for a jam.
  18. Real-time games are fun, but probably not a super idea for a first multiplayer game.
  19. Don’t dive into all the Gafferon Games / Valve / Quakeworld / Quake3 articles that you bookmarked a while ago.
  20. Send your player position to the server is simpler than inputs – remember jam.
  21. Keep your lag compensation really simple – when receiving a player position don’t do any dead reckoning, extrapolation… make a simple interpolation : player.x += (net.x – player.x) * 0.3
  22. Variable-timestep loops are ok
  23. You might need a physical server of some sort – use your computer, a raspberry or the free amazon vps tier (Credit Card needed) or use point 7. and you’re set.
  24. Don’t be overwhelmed by the amount of points – PhotonCloud/FireBase/Player.IO/SmartFoxServer make things really simple, forget this list and play with their API. “The secret to writing a networked game for Ludum Dare is to avoid writing networking code” as a redditor said and those services try to do just that.
  25. Be highly suspicious of do’s and don’ts lists
  26. Those lists often make the author sound pretentious – what legitimacy does he have ? All those do this and do that :3 There’s not only one way to do stuff, what if i want to tunnel a UDP packet into a TCP packet into a UDP packet ?
  27. All those rules are probably not applied by the author himself – i feel like most of those rules are mostly reaction rules to what people doesn’t succeed at. It’s a kind of never reached nirvana for the author, something that you frame in your room and stare at while working out, naked.
  28. It will never work as planned – You’ll probably end up doing netcode in the laSOCKET EOF SOCKET EOF SOCKET EOF SOCKET EOF SOCKET EOF SOCKET EOF SOCKET EOF SOCKET EOF SOCKET EOF SOCKET EOF SOCKET EOF SOCKET EOF SOCKET EOFSOCKET EOF SOCKET EOF SOCKET EOF SOCKET EOF SOCKET EOF SOCKET EOF SOCKET EOF SOCKET EOF SOCKET EOF SOCKET EOF SOCKET EOF SOCKET EOF SOCKET EOF SOCKET EOF SOCKET EOF SOCKET EOF SOCKET EOF SOCKET EOF SOCKET EOF SOCKET EOF SOCKET EOF SOCKET EOF SOCKET EOF SOCKET EOF SOCKET EOF SOCKET EOF SOCKET EOF SOCKET EOF SOCKET EOF SOCKET EOF SOCKET EOF SOCKET EOF SOCKET EOF SOCKET EOF SOCKET EOF SOCKET EOF SOCKET EOF SOCKET EOF SOCKET EOF SOCKET EOF SOCKET EOF SOCKET EOF SOCKET EOF SOCKET EOF SOCKET EOF SOCKET EOF SOCKET EOF SOCKET EOF SOCKET EOF SOCKET EOF SOCKET EOF SOCKET EOF SOCKET EOF SOCKET EOF SOCKET EOF SOCKET EOF SOCKET EOF SOCKET EOF SOCKET EOF SOCKET EOF SOCKET EOF SOCKET EOF SOCKET EOF SOCKET EOF SOCKET EOF SOCKET EOF SOCKET EOF

How to become a horrible network programmer in only 48H

Soldiers banner

Good job, you’re now a horrible network programmer.. but what makes you different from 99% of the world is that you actually finished a multiplayer online game while people are still struggling to pack as much datas as they can into one byte. And the good news is that nothing prevents you to improve your network code with proper design.

How to improve

I feel bad for some of those points so i want to correct a few things.

  • A dedicated server is generally a better way to separate your network code from your rendering code, it’s also a good training for organizing your code.
  • Use a fixed timestep loop, it makes synchronization way better and lag compensation easier.
  • Don’t actually send your player position to the server, send inputs (you can even pack this into one single byte !!!)
  • Use UDP for realtime games, and don’t use reliable messages as stated above. UDP by its nature doesn’t guarantee much when sending a message and you probably don’t want the hassle to handle this in a jam. Otherwise, UDP is great, use it, whenever you can. TCP is perfectly fine for more slow-paced games, it doesn’t mean TCP doesn’t work for realtime games, it’s just a weird choice when you have UDP standing there, waiting for a hug. But World of Warcraft is TCP blablabla… ಠ益ಠ
  • Actually read the Gafferon Games / Valve / Quakeworld / Quake3 articles; this is still a drag to actual productivity if you’re falling into all these optimizations. Keep it simple but not necessarily at JAM-quality.

Note that you might question my legitimacy and i have no answer, most of my LD games are mostly crap, the last one is bad or probably average at best but this is not a game-design post, this is a “netcode takes time, here some tips to give you more time for game-designing while being a worse network programmer than you were before even starting” post.

multi2

You can click the GIF to have a look at my average (jam) entry.

I’m also using this post to make a list of multiplayer online LD games, if you happen to have made one, tell me in the comments or @caribouloche.

Death & pseudo-leveling

Posted by (twitter: @caribouloche)
Monday, December 16th, 2013 2:34 pm
death

Poc Poc Poc Bwaaahh…

Seems like i finally fixed the server but i need to see how it behaves with real players. I might be able to make a build in one hour or two.

Health bar, Red overlay and no game :'(

Posted by (twitter: @caribouloche)
Sunday, December 15th, 2013 4:12 pm
multi

:'(

The game is working in multiplayer but i have an annoying issue where a player disconnection make the server crash.

I suspect a socket block error killing the app but being silenced by my try/catch that i’m using for buffering datas, not sure about that but i’ve been spending way too much time on a non-game-related bug and while i’m often glad to make the stretch until 3AM i don’t feel like i’ll be able to wrap this up on time.

I might participate in the Jam but i’m really uncertain that i’ll be able to fix this bug, seems too obscure and tight to my whole net lib to go the YOLO way. I’m a bit sad but it was a really good stress for my libraries :)

I hope to finish it at some point though.

:'(

Solitaire Bug

Posted by (twitter: @caribouloche)
Sunday, December 15th, 2013 5:19 am
solitaire

Dat wave

Take that you… clone

Posted by (twitter: @caribouloche)
Sunday, December 15th, 2013 1:49 am
takethat

Poc Poc Poc Poc Ouch Ouch Poc Ouch Poc Poc Poc Ouch Poc

Too bad you don’t have the sound :'(

(just kidding, there’s none)

More Pew-Pew

Posted by (twitter: @caribouloche)
Saturday, December 14th, 2013 12:50 pm
pewpew

Pew Pew

Screenshake & sticky bullets

Posted by (twitter: @caribouloche)
Saturday, December 14th, 2013 11:37 am
screenshake

Poc Poc Poc Poc Poc Poc Poc Poc Poc Poc

I lost a bit too much time on the animation and flipping code, been annoyed by offsets…

The animation  is kinda meh but i will come back to it if i’ll find the time; i will continue working on the feeling part a bit and i then i’ll start adding the server.

Collisions

Posted by (twitter: @caribouloche)
Saturday, December 14th, 2013 7:06 am
collisions

Got collisions working.

SOLDIERS !

Posted by (twitter: @caribouloche)
Saturday, December 14th, 2013 2:14 am
character1

Pew Pew !

Perspective Abomination

Posted by (twitter: @caribouloche)
Saturday, December 14th, 2013 1:46 am
abomination

:'(

Super-secret-multiplayer-online-gamedevs-circle

Posted by (twitter: @caribouloche)
Friday, December 13th, 2013 10:48 am
d5RCQcZ

Wootsch wootsch

 

Failing Making multiplayer online games most of my LD’s i’m really curious to know who’s with me in the genre, there were a few but really fun ones a few LDs ago, i remember a fighting platformer and some really frenetic  and good-looking mining game (WITH LASERS).

I’m in again hoping it will be better than my last one, aiming for some simple and decent mechanic to come out of my brain, more in the spirit of The last Square.

I’ll be using :

Who will dare making a MMO ?

I hate Sookie

Posted by (twitter: @caribouloche)
Friday, August 24th, 2012 4:21 pm

I didn’t like True Blood much but what i hated the most was that stupid Sookie character.

She’s now the name of my network library >:(

IDE : Sublime Text
Languages : Haxe (client), Python (server)
Libraries : NME / qookie (haxe),  sookie / twisted (python)
Art : Bfxr, Photoshop
X : Chronolapse, Snippy, Dropbox Screen Grabber

The Last Square – Post-Mortem & Timelapse

Posted by (twitter: @caribouloche)
Sunday, May 13th, 2012 6:07 am

What went right :

  • The whole code workflow : the past ludumdares contained some nice surprises, bugs, physics related issues… But from start to finish i didn’t encounter many problems on that project (if you don’t count network settings).
  • The server didn’t fall down \o/ (much).
  • Lidfrid which is another LudumDarer helped me gather attention on the game & debug stuff ! (check his game !)
  • Once people understood the rules it was fun to play (for me at least), some strategies were actually involved. Me & Lidfrid were more the middle guys while Amodo & Norgg were the kind to work on their own around the map :)

What went wrong :

  • I started late on the LD48, i wish i could have made it for the LD48 but i haven’t. It’s in the jam right now :3
  • I am not used to work with flash stuff and for whatever the reason i decided to host the web server myself instead of just shipping a *.swf file on a dropbox. Too much fight with my firewall.
  • Policy server file : when doing networking through a browser the server has to give the client a policy file. I spent quite some time trying to understand why the server wouldn’t recognize the client policy file request. I didn’t see one space at the end of the request…
  • A few server downtimes since the ip was actually hard-coded and my ISP is updating it every day i had to make a few changes but it was actually quickly fixed by changing / adding servers.
  • The font ! There’s a chat in the game so i had to find a cool font, i did find it but there were no punctuations, no numbers : just letters. It was a bit frustrating.

What could be improved :

I wish i would have allowed me a bit more time for the instructions, most players are complaining about that. Even with a screen at the start of the game, it didn’t work well, grey on grey  and just a few lines of text are not good enough.

After not understanding the rules you are not helped much within the game as well, there’s not enough visual feedback about where you can build a tower or when you can build them. The list of the players on the right were actually a ranked list, but i’m not sure many players understood that since there was no indication whatsoever. I should show the percentage of the map conquered and the % of the map you have to conquer to win the game. Basically more feedback for everything.

I’ve already made a *lagfree* version of the game but since it didn’t take much time to code, it would have been better added in the submitted version.

Future :

I’m going to put the project on github, i’m not sure i will work on it right away since i have other projects but after adding more feedback features as explained earlier, one cool thing would be to make it totally cross-platform between C++, Flash & HTML builds. I’ve actually used the flash networking library for that project but i’d like to use haxe networking and see how it goes.

 

Languages used :

  • Client-Side : Haxe + Nme  (mostly Flash lib)
  • Server-Side : Python + Twisted

Tools used :

  • Photoshop
  • Chronolapse
  • Sublime Text 2

 

Link to the game

Post-mortem & Timelapse

Posted by (twitter: @caribouloche)
Monday, December 19th, 2011 8:25 am

postmortem

I feel like i’ve experienced the exact same scenario as my LD20 :

I started late, trying not to aim too high, but still wanting to add some fancy stuff like XP, ending up at -5 minutes without any thought on level designing.

What went right :

  • I haven’t been stucked by any coding issue
  • It’s not as ugly as i thought it would be
  • I made a batman costume !
What went wrong :
  • I spent too much time implementing XP, thinking about level scaling, how you would xp… Next time, no leveling
  • Consequence of previous point is that i didn’t spent any time on the levels, and that’s what a game usually is, good level design
  • Shipping with bugs, i think i stupidly broke my score counter in the last 10minutes, also the level up window is buggy
  • No sound

I think i would have finished it with one more day but that would still be an unfunny game based on XP instead of cool mechanics. I’ll try to shape it into something playable in the future.

We all read articles about not being trapped by adding too much things, about cutting features, thinking small… But I still fall in those traps and that’s why Ludum Dare is fun and rewarding.

Let me share my admiration for “Step Off” by intmain, which has basically the same *concept* but is waaaay more fun, cool feeling and awesome graphics.

You can try mine here.

The timelapse:

[cache: storing page]