You are browsing as a guest. Sign up (or log in) to start making projects!

Godot Game

  • 7 Devlogs
  • 43 Total hours

Very preliminary idea, but basically about using a sledgehammer to escape a infested space station, imagine Red faction and Just Cause but in space and 2D, so explosions, lots of "particles", and plenty of destruction.

Open comments for this post

4h 5m 18s logged

enemy attacks/better particles.

This took some work, but not really…
The enemy can now attack and hurt the player :happi: the codes really just the same as the player attacking the enemies. Theres a hurtbox in the player that gets hit by an area in the enemy that makes them take damage.

The particles took some more difficult work. Godot has CPU and GPU particles, which apparently are different, it just depends on what in your computer renders them. I used GPU particles, because they run better and can collide with things. I whipped up a sprite sheet for the particles in Aseprite, which looked a lot better than the weird purple generic Godot things. The particles only collided with light occluders??, so I added an occlusion layer to the tile map, at some point I hope to create a better system for when they hit the ground, but thats not my priority right now. :thumb-sam:

Next STEPS!!!!!
-main thing is that the enemy has a lunge attack that I haven’t implemented yet, so thats next.
-starting on the player sprites, this is a LOT of work, so its gonna take me a lot of time, but no time like the present :smile-3d:

0

Loading discussion…

0
3
Open comments for this post

5h 14m 14s logged

Some more enemy development!

-first “enemy” in the game, a pretty basic little thing.
-designed on Aseprite, took some time to set up with hakatime, but turns out I was using a version only used on Mac OS, so no kidding it was giving me trouble
-I created unused animations for a lunge and whip attack animations that I will implement soon (?).

NEXT STEPS :D :Down-is-better-than-up: :
-stop the player from colliding with the enemy’s hitbox, it’s very annoying, and in the future will we a necessity for having many creatures in the same room
-add the enemy attacks, I’ll probably just use a raycasy to see if the players close enough, and then make it hit, pretty simple…

Also get Aseprite, it’s like 20 bucks but it’s a really good software, also it’s just really good for game making. gasp :D

0

Loading discussion…

0
2
Open comments for this post

10h 9m 18s logged

Basis of an enemy AI!!!
the beginnings…
I feel like ten hours is a little much for just this, but there was so much work to do.

The main step began with a pretty simple area. It just detects if the player enters. The code uses the player position (or “target” position in the code), and subtracts it from the enemy position, if the numbers greater than 1 it moves one way and if less than -1 other. (The buffer in-between the 2 is just for smoothing)

If the player is within the hitbox, the enemy shoots out a ray cast towards the player. If it touches the player, it lets the enemy move, if it hits a box or the ground first it doesn’t, pretty simple, till you realize what can go wrong…

For clarification i have NO CLUE why any of what i did helped, but it did so yippee!!! The first problem was that the enemy would only detect the player if they were off the ground. I tried to fix this by forcing the ray cast to not interact with the Tile Map (which wouldn’t have worked anyways, because it still needs to so the objects can block the enemy’s sight). I set a piece of code to print what the enemy was interacting with, and it turns out it was the background? (I know, weird?) I seperated the background and collision ground into 2 tile layers, then turned of collisions for the back layer.

After that there was some glitchy stuff which you can see in the video a bit, but I fixed almost all of it with literally one if statement that only lets the player become a target for the code

(My code is a modified version from this website) / / / / /
Godot 3.0: Visibility with Ray-casting · KCC Blog

0

Loading discussion…

0
1
Open comments for this post

4h 59m 13s logged

Devlog #4?

3 big things this time, physics blocks, destructive blocks, and stamina upgrades.

Physics!:
-just a block but it’s a “rigid body”, so Godot gives it physics.
-It uses some “borrowed code” to detect if the player is colliding with something and then add the players velocity to it.*
-I had to change the hitbox of the floor to be a collision polygon, instead of one per block, which made the pushing kind of shotty.**
Destruction!:
-Really simple… just an enemy that can’t move or fight back. I added an animation so you can tell it’s getting hit but that’s the most complicated it got.
Stamina! (it’s better):
-I added 3 major things, though 2 of them are pretty small. First, I added a bar, Godot has a built-in progress bar node, so I just mapped the value from 0 - 10, and used the stamina value from the player as the value input
-SECOND! I changed the recharge, instead of a variable that goes up when a timer ends, it now uses a move_toward() function to make the stamina tick up smoothly.
-thirdibidily, a pause. Mainly because irl and in games you don’t just start recharging as soon as you stop moving. This uses a float that begins to tick up when the player starts moving, and when it surpasses a certain point, it allows the stamina to recharge.
Final stuff!!!
-I’ll start focusing on:
-more indepth weapons
-and maybe ai for enemies… probs something with raycasts………..

0

Loading discussion…

0
4
Open comments for this post

52m 22s logged

Sprinting!

took a bit, but I finally got sprinting to work.
Works pretty simply, the characters motion is determined by a speed variable, which just increases if the sprint button (shift) is held down.
Here’s the code:
if Input.is_action_just_pressed(“sprint”) and stamina >= 1:
state_machine.travel(“sprint”)
sprinting_timer.start()
SPEED = 200
sprinting = true
elif Input.is_action_just_released(“sprint”):
SPEED = 75
sprinting = false
sprinting_timer.stop()
I’m using an animation_tree for my animations, instead of just a player, this helps the transitions from animations feel smoother, so thats what the “state_machine” is. The “sprinting” variable is used to force other animations (e.g, for idling and running) to check if the player is sprinting, and thus not override the animation (the sprinting animation currently is identical to running, but when I start designing the character i’ll change that). The timer is just on a .5 sec loop, and makes the stamina decrease when it ends, the second bit of code checks if you stopped sprinting, and returns the SPEED to normal and stops the timer loop.

This code doesn’t actually fully work, as another if statement is needed. The extra “and” in the first check makes sure you can’t start sprinting if stamina is below one, but actually only checks once when you start sprinting, not constantly, so the sprinting doesn’t stop if stamina goes below 1 (like it should).
if stamina < 1:
SPEED = 75
sprinting_timer.stop()
sprinting = false

This code, unlike the first “if”, checks consistantly if stamina’s below one, and does the same job as if you let go of sprinting. This keeps stamina from going negative D:

In the future I plan on adding a gradient to the effect, so the speed up isn’t as jarring, but this is a good start!

Thanks to Brackeys for the current assets! (go watch his video on Godot, it’s very informative)

~wil

0

Loading discussion…

0
4
Open comments for this post

13h 9m 32s logged

Finally started to develop a “game”

made 3 things, Attacks, Stamina, and GUI

Attacks:
->use hurtboxes detect if an area entered, if that area is_in_group(“attackarea”) the hurtbox takes a damage variable and applies it to the thing it’s attached too (Player, enemy, etc)

Stamina:
-> A timer slowly makes it tick upwards, starts at 10, and goes down if the player jumps or attacks, uses a Global Variable allow the GUI to display the stamina (there’s probably a better way but I’m lazy ¯_(ツ)_/¯)

GUI:
->uses a canvas layer being displayed over a sub-viewport, which includes the coins and stamina, just displays text and then the quantities of each integer.

next steps:
->destructible blocks
->physics blocks
->stamina bar (not integer)
->sprinting (and smoother movement.

Thanks to Brackeys for the assets!

1

Loading discussion…

0
3
Open comments for this post

4h 51m 39s logged

Finally done learning basic Godot!!

My entire time has been dedicated to just learning how to use the software, and I’m glad to say I now have something to work off of. I still need to learn more, like GDscript, pixel art, and game design.

Next Steps!

-develop weapon (sledgehammer :D)
-destructible terrain elements (fancy walls that get destroyed)
-physics blocks
-begin designing character and aliens

1

Loading discussion…

0
2

Followers

Loading…