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)
}
}
}
As you can see, Trigger
s 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.
Designing Enikoko
Now that we can make it to Enikoko, we should start to design it.
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.
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.
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.
Top comments (0)
Some comments may only be visible to logged-in visitors. Sign in to view all comments.