• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Super beginner Issue

L

lfrench316

Guest
Hey,

I'm really new to development and i guarantee im going to get flamed for this post.

I am struggling to input enemy collisions with player in 2d platformer.

The closest i came was a collision that bugged and crashed the game.

Anyone got some direction on this?

Safe
 

Sabnock

Member
can you give a bit more detail on what you are trying to achieve?

I am guessing that if you are doing a platform game you have already understood the basics of the collision systems?
 
L

lfrench316

Guest
Hey Sab,

Yeah I've got basic collisions down in terms of my player can walk on objects and stops at walls. (The very basics)

What i would like would be for him to take damage when he encounters an enemy by walking into him.

(At the moment they just pass by him in the layer underneath)


So far they have no weapons /projectiles

Everything is neatly input into its own layer.


I have a feeling its going to be something similar to the collision code for a static object? (if place meeting?)

Along with definiing player Hp variable?
 

Sabnock

Member
place_meeting(); Instance_place(); and many other types listed in the manual depending on what it is you are trying to achieve.
 
Layers aren't really important for most basic game logic, btw. They're a draw order thing. Anything to do with collisions, etc, doesn't necessarily have to do with layers (you could make it so that it would effect things, but that would complicate it unnecessarily).
 
L

lfrench316

Guest
Update - I have manage to initiate game restart when a character collides with another thanks to someones suggest to revise the manual!!

Really helpful community!
 
Top