Tuesday, 22 December 2015

libGDX jam

I am taking part in the awesome libGDX jam with the theme "Life in space". As per rules of the jam the devlog of my game can be found here: http://itch.io/jam/libgdxjam/topic/12172/loganthemansters-dev-log
The code of my entry will be published to GitHub.

Sunday, 20 December 2015

Mario is finished for now...

This will be the last version of my Super Mario Bros. project for now. I've learned a huge deal and got most of the stuff to work the way I wanted it to. There are still some things missing (e.g. the invincibility star or some eye-candy like the animations for the coin blocks) so maybe I will come back to it again.

Here is the latest executable (should theoretically run under Windows, Linux and Mac as long as you have JRE 8 installed).
If someone is curious: all jars I created while I was working on this project are located here.

Friday, 11 December 2015

There are some bugs you just don't want to fix...

Mario just ate three mushrooms here:

Friday, 30 October 2015


While following the tutorial that I wrote about in my last entry I got stuck on the lesson about spawning items - my game randomly crashed the JVM when spawning a mushroom with a very nice fatal error:

# A fatal error has been detected by the Java Runtime Environment:
#  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x0000000066bcbd0d, pid=156, tid=7088
# JRE version: Java(TM) SE Runtime Environment (8.0_45-b15) (build 1.8.0_45-b15)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.45-b02 mixed mode windows-amd64 compressed oops)
# Problematic frame:
# C  [gdx-box2d64.dll+0xbd0d]
# Failed to write core dump. Minidumps are not enabled by default on client versions of Windows
# If you would like to submit a bug report, please visit:
#   http://bugreport.java.com/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
Today I finally had the time to dig into my code (since I don't use Brent's code 1:1, I like to "tidy it up" after each lesson so it adheres to my own standards) and managed to find the culprint.

The problem was in the end that PlayScreen.update() tried to set the boodies of destroyed Goombas active - that caused the Box2d engine to try to access memory that is not available anymore (Box2D is written in C, there is just a tiny Java-Wrapper around it so it can do that).

The solution is something like this:
In PlayScreen.update() instead of

if(enemy.getX() < player.getX() + 224 / MarioBros.PPM) {

do something like

if(!enemy.isDestroyed() && enemy.getX() < player.getX() + 224 / MarioBros.PPM) {

For that to work we need to create this variable and method in Enemy:

protected boolean destroyed;

public boolean isDestroyed() {
                return destroyed{
and remove the variable "destroyed" from Goomba and Turtle.

My own current progress can be found here.

Saturday, 26 September 2015

As my first actual project I am following this awesome tutorial on recreating the classic NES game Super Mario Bros.
You can find my current progress here.

Saturday, 11 July 2015

First post


My name is Dawid and I am a Java developer. I am trying to get into games developement in my free time and that's what this blog will (hopefully) be about.
Have fun reading ;)