GD2D: dev log #6

Now I want to render level. This task consists of several subtasks:

  • Output some random tiles from GD2;
  • Read level from GD2, output it (just tiles, without objects, doors or enemies);
  • Output objects, doors, hero and enemies (as they can move, they should be separate sprites, and not be displayed in the tilemap.);
  • Add another camera (for level), move it along with hero.

Luxe already have built-in tilemap, so at first I decided to try it. I don’t found any documentation or examples how to use Tilemap directly, instead of every example of tilemap use TiledMap to load map from file.

Continue reading

GD2D: dev log #5

This time it will be very small post. Did you know, that luxe engine has built-in debug console, that is enabled by default even in release builds? To reveal debug console, press grave accent key on desktop or simultaneously put 4 fingers on the screen on mobile devices.

While it is useful when debugging, I think that is should not be included in release build. To disable it on release builds (and leave in debug), add following to your project.flow:

if : {
    "!debug" : {
        build : {
            defines : ["no_debug_console"]

See you later!

P.S. If you know that the game is written using luxe engine, try to reveal debug console 🙂 Maybe game authors forgot to disable it before publishing.

GD2D: dev log #4

Today I want to add initial support for Android and iOS devices. I want to handle hardware back button on Android, and handle onResume / onPause events both on Android and iOS (I’m not an iOS developer, so I guess it will be viewWillAppear / viewWillDisappear or applicationWillEnterForeground / applicationDidEnterBackground or something like that).

Initially I think that onPause / onResume will be the hardest part, but hopefuly luxe is based on show, which is based on SDL2 itself, and it handle these events for me.

Continue reading

GD2D: dev log #3

Next what I want is to create several screens (menu and game), transitions between screens (simple fade in and fade out), add preloader with simple progress bar, output background image on menu screen and render some text.

Luxe has built-in state machine, but this state machine is tightly coupled with game lifecycle (eg. can receive onmouseup, onmousedown, etc.), what makes it sitable for screens and transitions between them. There are several examples which demonstrate how to use states properly.

But these examples have one “feature”…

Continue reading