DEV Community

Cover image for Boss 1, The Beast (Cosplore3D Pt:18)
Chig Beef
Chig Beef

Posted on

Boss 1, The Beast (Cosplore3D Pt:18)


This is a series following Cosplore3D, a raycaster game to learn 3D graphics. This project is part of 12 Months 12 Projects, a challenge I set myself. In this post we are going to work on the first out of 2 bosses, The Beast of Enikoko.


I started by making the sound track for Enikoko, which I adapted from an old project I had made to save some time. Since I now have 2 sound tracks I had to change how audio was handled so it can now process multiple tracks. We are then able to put the art we made into the game.

Enikoko but now with the beast

Dang, that's an interesting looking boss, let's see how it looks in the actual game.

Enikoko beast from the side

Enikoko Beast from the front

Stuff of nightmares, it's definitely interesting when this thing is floating towards you.

Fixing Shooting

Remember how we sorted that slice of enemies and items so that when we rendered them they were drawn correctly? Well, since the slice goes from furthest to closest, our gun calculates what it's shooting from furthest to closest, but this should be a simple switch.

for i := len(enemies)-1; i >= 0; i-- {
Enter fullscreen mode Exit fullscreen mode

Such a simple change but it really made it a lot better.

Boss's Power

I would like each boss to have a special power. The boss would be able to utilize this power every once in a while. For the Enikoko Beast, I think it's power should be to go invisible for a short amount of time. You only need to go invisible for a small amount of time to freak the player out. First we need a new power function.

type Power func(*Game, *Boss)
Enter fullscreen mode Exit fullscreen mode

We need to call this function at a consistent rate.

if b.powerCooldown <= 0 {
    b.powerCooldown = b.rop
    if b.power != nil {
        b.power(g, b)
Enter fullscreen mode Exit fullscreen mode

Then, we need to create our function.

func change_visibility(g Game, bBoss) {
    b.visible = !b.visible
Enter fullscreen mode Exit fullscreen mode

And that's all we need. The effect is great and quite worrying, you can never quite guess where the beast is going to end up.


We have one more boss to make, and then we've completed all the enemies. The Trash Crawler Champion is a boss that would be hard to beat (I think), because in the map there are currently all the trash crawlers already there to deal with.

Top comments (0)