DEV Community

Cover image for Enikoko, Level 3 (Cosplore3D: Pt:14)
Chig Beef
Chig Beef

Posted on

1

Enikoko, Level 3 (Cosplore3D: Pt:14)

Intro

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. We've done a lot of work on levels 1 and 2, but we haven't created a way to get from level 2 to 3 (we haven't created level 3 yet, but we can start by making the way to this level).

The Progressor And Trigger

In the lore of our game, the player places the Cosmium they got from Ankaran, and places it into a reactor. Then, they head back to navigation and land on Enikoko. In game logic, this means that the player walks over to a reactor, and the Cosmium is taken out of their inventory. They then walk back to navigation (which is where they spawned), and if they don't have Cosmium, then they progress to the next level.

type Trigger struct {
    x      float64
    y      float64
    w      float64
    h      float64
    action Action
}

func (t *Trigger) check_collide(g *Game) {
    x := g.player.x
    y := g.player.y

    if t.x <= x && x <= t.x+t.w {
        if t.y <= y && y <= t.y+t.h {
            t.action(g)
        }
    }
}
Enter fullscreen mode Exit fullscreen mode

As you can see, Triggers are pretty simple. We will place a trigger in front of the reactor (at the back of The Cosplorer), and it will take away the player's Cosmium.

The reactor at the back of The Cosplorer

Designing Enikoko

Now that we can make it to Enikoko, we should start to design it.

Enikoko in the level editor

Now, I know, it's a small level, and also, no enemies? Remember, in this level the only enemy is a boss, which we haven't even made yet, so we can't really put it in the level if it doesn't even exist yet. Also, the larger room in the map (which is meant to be for the boss) will probably end up being a lot bigger. It should also end up having a few columns, etc. Having a blank room won't make the boss fight that interesting, but we will implement that when we actually have a boss to create a world around.

Enikoko in 3D

And look at those trees! (so life-like).

And here is the end of the level, which in the lore is when we find more Cosmium and get onto a new ship.

The end of the Enikoko level

Next

We've got 2 more levels to create, one for the new ship, another for Schmeltool. Once we've finished these levels we have a lot of the gameplay finished, so we can start by making things look nicer. For example, I would like for items in the player's inventory to show up in the HUD. Furthermore, you can never tell when you're shooting, so some sort of animation would be nice.

Image of Timescale

🚀 pgai Vectorizer: SQLAlchemy and LiteLLM Make Vector Search Simple

We built pgai Vectorizer to simplify embedding management for AI applications—without needing a separate database or complex infrastructure. Since launch, developers have created over 3,000 vectorizers on Timescale Cloud, with many more self-hosted.

Read full post →

Top comments (0)

Some comments may only be visible to logged-in visitors. Sign in to view all comments.

Postmark Image

Speedy emails, satisfied customers

Are delayed transactional emails costing you user satisfaction? Postmark delivers your emails almost instantly, keeping your customers happy and connected.

Sign up