An Undertale Fight

This is basically a fan made Undertale fight, not much unlike those labelled “Unitale,” but made almost completely from scratch (it isn’t a Scratch game, it’s in Greenfoot).

I unfortunately couldn’t finish the game due to the time constraints and testing, but I have most of the things that make it look like the game…sort of.

You can find the game here. Controls are in the description.

What’s in the game?

I was only able to put in two attacks, the boss sprite, the re-sizable box for the heart, the heart, the bottom buttons, the health bar, and the semblance of an unfinished attack mechanic. Some features I would’ve liked to include were menus for the other buttons, a game over screen, things for the boss to say, more attacks, actual turn based and automated combat, and an option for pacifist or genocide routes. Again, these were left unimplemented due to time constraints and testing.

The most fun, thought certainly frustrating, thing to implement, was the re-sizable wall. It was fun figuring out how to get the sides to elongate and move in order to make it look as close to a growing and shrinking box without hard-coding anything other than the location of the top wall, though sometimes it was difficult to know what to change when coding a different wall, especially when they seem to move up for no reason. If you copy pasted all the code from the walls you can screw around with their size by using the changeBX() and changeBY() methods found in the top wall.

Here is the code from the left wall, the most complicated wall:

        MyWorld world = (MyWorld) getWorld();
        int boxdown =((Down)getWorld().getObjects(Down.class).get(0)).getY();
        int getBX =((Up)getWorld().getObjects(Up.class).get(0)).getBX();
        int getBY =((Up)getWorld().getObjects(Up.class).get(0)).getBY();
        //this set controls how far from the center the wall is
        if (getX() < 400 - (getBX/2)) { setLocation(getX()+1*2,getY()); } if (getX() > 400 - (getBX/2))
        {
            setLocation(getX()-1*2,getY());
        }
        //this part controls how far from the bottom the wall is to keep
        //the top and bottom connected, and the box sealed
        if (getY() < ((boxdown - 250)/2) + 275) { setLocation(getX(),getY()+1*2); } if (getY() > ((boxdown - 250)/2) + 275)
        {
            setLocation(getX(),getY()-1*2);
        }
        if (st < getBY) { st += 1*2; } if (st > getBY)
        {
            st -= 1*2;
        }

The buttons don’t share one variable, but actually use separate variables which are all synced to change in the same way under the same circumstances. Is this method dangerous? Yes. Could it have been avoided? Yes, but I can be extremely lazy sometimes, and this was one of those times. The function which prevents the selection from sliding off in  a direction by holding down the arrow is something I was really proud of…until I found out about the other way in which Greenfoot registers key pressing.

I also think that the two enemies that I was able to put in were pretty cool, especially the accidental snake I made of sickles(Pro Tip: Hold down the ‘”s” button as you enlarge the box for a cooler snake).

The Sprites

As for the main boss, I basically created it off of what I though was cool, and I think that motorcycle helmets you can’t see through are cool.

The sickle was meant to go with a hammer as a little nod to communism, even though it doesn’t really need it.

People like bees, right? I’m putting them in anyway

The reason the button look really poorly drawn is because I can’t actually download most of the images for them from school because of blocking software, so I made some buttons that looked like mock versions of the real ones because I was not going to go through the painstaking details.

All of the pixel art I made for this can be found here. You can probably see some of the things I wasn’t able to put in but had time to make sprites for.

Leave a Reply

Your email address will not be published. Required fields are marked *