Posts Tagged ‘base code’

Declaration of base code!

Posted by (twitter: @blubberquark)
Friday, December 11th, 2015 12:55 pm

I have written some base code to import Yarn conversation files into HaxeFlixel and called it FlxYarn.

look at it here:

Are you tired of writing your dialogues in HaxeFlixel games as big nested if-statements inside of monstrous loops? Then FlxYarn might be right for you!

two talking heads and speech bubbles

I have built a Yarn parser, loader, NPC dialog engine and speech bubble UI for HaxeFlixel. I finished just in time in time for Ludum Dare. Now we can split up the work on a story-driven game into code(Haxe), levels(Tiled) and dialogue(Yarn). Each NPC has his own state machine.

Conversation nodes can contain multiple speech bubbles and dialog options. Nodes can contain Haxe code for scripting, which will be executed with the HScript interpreter. You can share variables from your Yarn state with the game code.

screenshot of conversation node syntax

The Yarn dialogue editor was built by Alec Holowka and heavily inspired by Twine. The syntax you see above is half my own design, half based on Yarn and HScript. The <<run $X>> macro runs haxe statements. The <<print $X>> macro evaluates Haxe expressions and pastes the result into the conversation state. Links to other nodes have the same syntax as in Yarn and Twine.


yarn conversation state graph

Get Yarn Here:

Try out the cobbled-together nonsense Demo conversation between the neo-baroque technocrat and the spaghetti wizard (requires Flash):


Friday, April 17th, 2015 2:29 pm

I will be using which is just my basecode from LD30 but I put 32 instead of 30. how awesome right


Final preparations for the compo/jam?

Posted by (twitter: @go_go_goto)
Friday, April 17th, 2015 12:08 pm

Just updated my LD32 repo at github ( with a blank game project (Haxe/OpenFL project for FlashDevelop).

I also put some code for a FPS/Resource monitor and the code I use to draw my company logo.

Is it ok to use this for the compo?

Also…gotta clean up my desk and get some snacks! I’m shivering >_<

I’m In! – Part 2: My Code Base

Posted by
Tuesday, April 14th, 2015 2:38 pm

Hello everyone, this is the second part of my ‘I’m In’. There will be one more part where I will list the tools I’m using. It’s a bit silly to do it in three parts but I’m still learning how all this works so I thought I’d take it slowly.

I’m hoping to use my CGS Framework for the compo which contains a collection of Unity3D C# scripts. CGS stands for Core Game Systems and it generally contains a bunch of useful tools that help speed up development:

  • Hierarchical state machine
  • Event driven communication between components
  • Unit test tools
  • Save/load functionality
  • Numerical ‘stat’ class that you can apply modifiers to
  • Physics based character controller
  • Item and inventory system
  • Debugging tools
  • Time and file utility classes

What I’m keen to know is whether or not any of these features violate the definition of ‘base code’ and therefore should not be included? If this is the case let me know and I’ll remove them and upload a revision.

Zip file of framework code:

CGS v1.0.3



Adding a script to my code base from this link:

To clarify, because I was sleepy last night, I’m using the C# script on that link for autosnap in Unity.

\o/ Godot Engine basic-y base code

Posted by (twitter: @crowbeak)
Sunday, April 12th, 2015 5:46 am

I’ve decided that unless I work with Eniko for this LD, I’m using Godot. As part of warmup/learning the engine, I’ve created some very basic stock stuff to start my game off with. As per rulez for the compo, I am making it available for everyone to use if they want.

Grab it here! (zip)

It has a splash screen on which the logo fades in and then out while a sound plays and a handy function for changing scenes that gets called at the end of the fade animation to bring up the start scene. The start scene is so small you can’t see it, but this also includes [what should be] working progress bar code for scene loading.

I might update this again before the jam starts, but in the meantime… \o/ Viva Ludum Dare!

I’m in with a Mac, an Oculus VR DK2, and SceneKit

Friday, August 22nd, 2014 5:06 pm

Base code:

Please use this code! I want games I can play on my new hardware.

But don’t use the included graphics (the holodeck wall texture and the eye-shaped flashlight mask)  if you’re doing the 48 hour compo (LD’s rules, not mine). If you’re doing the 72 hour jam, it’s not against the rules, but you’re being lazy. SceneKit is this easy.

The podium is technically code, not a graphic, but use it as an example of how to do nested animations (the ring rotates around the ball, and the question mark follows the ring while also rotating in place) or glowing materials or player interaction (it lights up if you walk over to it) or whatever, don’t just drop the entire thing in your game. It’s not a rule or copyright violation, just lazy.


  • LibOVR 0.4.1 support, including DK2 head tracking.
  • Multiple standard control schemes (WASD, click-to-move). “Forward” is where the player is facing (requires DK2).
  • Lights can autofollow the player. Spotlights can point where the player looks (requires DK2).
  • Lots of hooks for common game functions (example: if the theme is Don’t Stop Moving, put your punishment in stopMoving: in or your subclass of it).

Missing Features / Known Issues:

  • SceneKit is Mac only. There will not be a Windows version.
  • Chromatic aberration correction is missing, aka “something’s wrong with the colors”.
  • Only the OculusRiftSceneKitTest example has been updated. The other two are probably broken.
  • 2D movement (walking) is in, 3D movement (flying) is not.


Download the files from GitHub and start with the sample project OculusSceneKitTest under examples.

You will also need LibOVR. You’ll need a developer account, but it only costs an email address. You do NOT need an Oculus Rift. See the GitHub page for more details — Xcode is picky about where you put these files.

Replace HolodeckScene with your game.

Compile, test, distribute.

You can compile and run this without an Oculus Rift, but the screen looks like this:

OculusRiftSceneKitTest screenshot


and you’ll be able to move with WASD, but not turn (unless you code it yourself). Good luck testing that. 😉

Screenshots and gameplay videos should be viewable by Rift users if recorded and played in fullscreen mode. If you have a Rift, try viewing the screenshot with it! (click for full size)

Base Code LD30 (C++/SFML/OpenGL)

Posted by
Friday, August 22nd, 2014 5:00 pm

Once more partaking in the competition, but this time using OpenGL and SFML. The base code I intend to build on can be found here. Use at your own peril!

Base code! Also: Good luck everybody!

Posted by (twitter: @tolicious)
Friday, August 22nd, 2014 1:28 pm

I’m ready. Let’s do this.

Like every time, here is my base code: Prelude. (You’ll need RageSpline to use it completely.)

It does lots of cool stuff:

  • Unified button layout for XBox360 controllers on Windows (even with vibration there!) and Mac
  • Makes cool (optionally glowing) shapes (together with RageSpline)
  • Traversing spline paths (with RageSpline too)
  • Uses Scoreoid for a leaderboard
  • Basic text buttons and vanishing text for notifications
  • Easing
  • A few helpers for math, Unity and some general C# stuff

It’s a bit of a mess though. But hey, it’s mine. Good luck everybody!

Update update – 19th August 2015
Just in time for LD33 I’ve updated the base code to add menus, pathfinding and lighting, and tidy it up a little. See the readme on GitHub for details, and a bit of info about things to look out for (don’t enable Unity’s anti-aliasing!).
Oh, and you can now invert colliders if you want auto-tiled roads rather than walls.

As I was looking forward to LD30 I thought I’d make a little base code to make life easier and maybe allow more exciting designs.

Here it is on GitHub

Anybody can use anything in there for any purpose, but giving Colthor credit would be nice.

Obviously, one can’t use the sprites and tiles for one’s compo game (and probably wouldn’t want to); they’re mostly in there as documentation and to demonstrate that/how the code works.

There’s an entire Unity project as an example, but the important parts are:


Camera Script

“Assets/CameraSizer.cs” is the camera script, and it automatically adjusts Unity’s 2D camera so sprites are 1:1 mapped with the screen (or some multiple of). If the script’s PixelsPerUnit is the same as a sprite’s, it’ll be mapped 1:1. If it’s half the sprite’s the sprite will be pixel-doubled, and so on. Textures mapped to meshes (for instance, with the tilemap) or whatnot don’t work like this, o’course, so make sure you size them appropriately.


Tilemap with auto-tiling

is the tilemap. The .cs contains more thorough documentation, but it creates a Squares_X by Squares_Y tile grid, with each square Square_Size units to a side. It gets the data about which tile to use from LevelData, which is just a text string (0-9, A-F are ‘open’ tiles, X indicates a wall, all other characters should be ignored). “Assets/32tiles.png” is an example of the texture required.

The script then auto-tiles the walls, selecting the correct tiles from the given texture, and then adds box colliders for the walls as children to the attached gameobject. To reduce the number of colliders it groups them to cover multiple walls where possible – first making it as many tiles wide as possible, then as many tiles high. It would be possible to use a single polygon collider with several paths, but it would also be considerably more work, sorry 😉  (And maybe not faster.)

The gameobject’s origin is the bottom left corner of the map, and LevelData is mapped in the same way as the tile texture; the first character is the top left, the second row will start – assuming no ignored characters – at Squares_X, and the bottom right will be character (Squares_X * Squares_Y – 1).


I’ll try to back-port any improvements or bugfixes made over the course of LD30 for future jams!


Preload and base code

Posted by (twitter: @x_rxi)
Saturday, December 7th, 2013 6:59 am
 Another Ludum Dare, another preloader -- It's surprisingly fun to make coloured pixels do different things...

Another Ludum Dare, another fancy preloader.


I had success using Haxe + NME last Ludum Dare, so I’m planning to use the same combination again, I’ll also be using much of the same base code. In addition to this I’ve derived some base code from parts of my LD#27 entry which will give me some basic flixel-like functionality, I may not use all the code but I’m announcing it here in case I do.

You can download all the base code from here. An overview of the LD#27 base code I’ll be re-using can be found here, the new additions consist of the following:


An object which exists in the game, can be text, a single image or an animated sprite. Has very basic collision detection and very simple collision resolution.


Can contain a number of entities. Handles the updating of each of its child entities’ logic, their collision, and the drawing of the entities each frame.


A basic tilemap implementation. Handles loading a tilemap and displaying it on the screen, handles collision with an entity based on the tiles it could be overlapping with.


Parses Tiled CSV files (.tmx) into an object. This makes loading all the objects and the tilemap from a .tmx file a lot easier.


QQQQQQQ – Yet Another LibGDX Basecode

Posted by (twitter: @tkesgar)
Thursday, December 5th, 2013 6:07 pm

Well here I am with a LibGDX basecode for LD28. It is just a combination of various libraries I greedily taken from Badlogicgames forum ( – LibGDX creator’s forum. I haven’t tested it and will probably create a warmup weekend entry soon. My aim is to build a 2D game, maybe yet another platformer, maybe not.

Here’s the download link:

I’m very very sorry for the hugely inappropiate download link for the basecode, because I’m quite in a panic state when I upload it, so I just Googled a “free file upload without login” and upload it there. When I realized my mistake, I’m too lazy to upload the file to another place because it took a good 15 minutes to upload – by the way, I’m in Indonesia. I promise I’ll use a “more appropiate” download link next time.

At this time, I am quite busy with various projects and my personal website, but I think I have some spare time to create a warmup and test the basecode. There’s a college exam for the next week (from 9th to 14th), but it’s not much of a problem (heh). I’m racing to complete the projects before LD28. Heh.

Apart from the basecode, I also used Bfxr and Sfxr. Guess you have also downloaded it, so I don’t have to post the download link. I don’t know about background music and don’t know how to create one – perhaps I’ll try and come up with some “creative ideas”.

Announcing D announcement

Posted by (twitter: @RototoStudio)
Monday, May 23rd, 2011 7:43 pm

In anticipation of the upcoming MiniLD, I am hereby announcing the release of my base code, a platform game written in the D programming language.

This time the rules permit the use of unreleased code, but as this game was not written by me alone, I think it’s fairer to release it beforehand as per the usual rules.

And in case you’re wondering, while it’s working code, it’s not a finished game in the sense that we haven’t created any “real” map for it yet. It’s also a source-only release.

[cache: storing page]