Activity

diceysnikey

To prepare for the main menu, i restructured all my nodes. So now i basically have the main node that instances the menu, then the spawner, and the spawner instances the rest.
The video shows in the remote tab how the main node instances the menu, the menu deleting itself, and the spawner being added

Attachment
Attachment
Attachment
0
diceysnikey

This one took waaaay longer than expected. My first goal was to change the movement from keyboard keys to following the mouse. When starting that one, it led me to the first fix:

  1. Because i set the player position by the viewport, it caused a coordination deviation with the mouse position. I fixed it by placing the player at 0.0 and moving it to the start location by code.
  2. Then i could change the movement to the mouse. This took a while because I used the previous keyboard code as template, but this caused the player to jitter up and down when reaching the mouse because of the way i coded the velocity. It works good now
  3. I noticed that there is an option to “Snap 2D Transforms to pixel”, turning it on to make my texture snap to the pixel grid. I recommend turning this on too for people who have pixel-art textures.
  4. In the previous devlog, i added the signalbus. But i missed the signal connection between the player and ui, so i added a signal for it to the bus and changed it.

If next time there aren’t a million deviations like today, i will definitely add the main menu. And if the main menu coding goes by fast, then I’ll add the dangerous asteroid causing a game-over too

Attachment
Attachment
Attachment
2

Comments

3129289
3129289 1 day ago

I like it; you should add an animation so when the astroid is close enough they get sucked into the players mouth.

diceysnikey
diceysnikey 1 day ago

The ‘get sucked into the mouth’ part would be hard to implement because of the inner collision-outer collision mechanic, but i could add a crushing animation. I’ll definitely add it in the visual overhaul soon, thanks!

diceysnikey

I am getting more and more used to Godot, and its starting to get smooth.
This time, i fixed two bugs:

  1. Asteroid not being cleared when out of view
  2. Asteroid being eaten even when it didn’t touch the outer collision yet.
    The second bug took the most time. I had to setup a signal bus, and to my previous self-devlog: I understand signals 100% now :)
    But now I am kind of stuck, because I almost can’t think of anything new to add. I will do a complete visual overhaul, but only when I am sure that the gameplay is done. The only things remaining from the original scratch game are the main menu, increasing difficulty over time, and ‘bad asteroids’ leading to a game-over.
Attachment
Attachment
2

Comments

Kajmix
Kajmix 2 days ago

Hi ^^
I think you should add an animated space background and maybe some dangerous asteroids. If you eat one, it could explode and you die.

diceysnikey
diceysnikey 2 days ago

The animated background is a really good idea! When doing the visual overhaul sometime in the future, i’ll definitely do one. I already had the dangerous asteroid idea planned, coming probably in the next one :)

diceysnikey

I didn’t have much time today so this is a short one.
I modified the spawner so it now spawns multiple asteroids, at different y-positions inside the viewport, and different times between 1.5 and 2.5 seconds.
The only thing i was ‘stuck’ on for a moment was getting the random y-position to work, but I’m surprised at how quick i was able to make it work.
Next time I’ll fix the player collisions so only asteroids that passed the outer collision can get accepted by the inner collision as a point (see image for reference)
I am slowly running out of ideas to add. so feel free to give suggestions please!

Attachment
0
diceysnikey

The reason this took me so long is because signals were hard to understand. And it didn’t help that i kept seeing different results for godot 3 and godot 4 when googling for help.
What I added was two collisions to the player, one outer collision (changes to the open mouth sprite) and a inner collision (changes to the closed mouth sprite and emits a signal to the scoreboard) that get activated when the asteroid enters them.
I’m still not sure if I understand signals 100%, but at least i have something. You have to make it exist first to make it good later, right?

0
diceysnikey

I added the asteroid this time. It took a while because I am still figuring out Godot and all its stuff, but it worked!
Figuring out the instancing was my biggest problem, because I didn’t know that I had the player scene as the main scene, and so my spawner script didn’t instance. I fixed this by moving the spawner into the player scene. I tried setting my main node as the main scene, but the asteroid visibilty was a bit weird. Next time i’ll fix it, i dont know what stopped me really.
Right now the asteroid moves to the right, but doesn’t have any interaction whatsoever, it just slides forever to the right.
If there are any ways to do stuff better, then please comment! I am still learning, so any help is appreciated

Attachment
Attachment
0
diceysnikey

As an introduction, i want to explain the game idea I want to go for. It is based on a game I made in scratch a few years ago.
The player can control a character that can only move up and down on the y-axis. With that movement, the player has to catch objects that spawn from the left side.
I first made the sprite for the player and set up the movement. Getting into GDScript took a bit, but setting up the movement was relatively easy. Only problem is that the sprite looks weird for a few frames sometimes, you should be able to see that in the video. If anyone has any ideas on how to fix it, please tell me.

Attachment
Attachment
0