I am making a topdown crypt of the necrodancer clone and I am trying to figure out how to make collision for it, is there any easy way to do this?
what I tried to do was make an array and put each block on and make you unable to walk on any block on the array, for some reason it blocks me when I check for 1 block by itself but not when its in the array. binary the game10-17-2022_23-21-23.wick
i did some digging, and found something that probably will help.
and thanks @Hamzah_Alani for the solution,as well as @Greg for helping out here.
ive even somewhat created some basic wall things based on @mojad 's project, so, yeah, credit to you too.
wall demo10-18-2022_9-43-50.wick (2.6 KB)
each wall pushes the ball away once it touches it. it can kinda frisk-dance along the sides, but it works fine.
neither of these help with my game, I need it to check if the clips around the player (check the wick file I sent) are hitting the blocks and if it is then to not allow the player to move in the direction of the clip.
all I need to do is know how to add a clip to an array and check if something is hitting that array.
well, i…
dont know what that is :/. what i did do though is changed it to where if it hits b1 or b2, the h objects set a variable to 0 instead of 1. but, every tick where its not touching a b object, it sets a variable to 1, and enables the player to move. i think what you were trying to do was to make it to where if you touch a 1, then it acts like a wall and you cant move. i’ll continue working on the whole wall thing, but this is what i got done so far.
there, i finally finished making all of the walls. it took a bit, but its pretty simple. if a wall touches one of the h objects, it will jam up the variable and won’t be 1 until the object isn’t touching the wall anymore.
edit: almost forgot to add wick file
binary the game10-18-2022_11-16-55.wick (11.3 KB)
thanks this helps a lot.
youre welcome ;)
Seems like lazybutter already gave you a working solution so you might not need this, but if you’re interested, here’s another method for creating walls using an array (this uses the same method I used in my 500 clones project, except walls aren’t broken apart).
binary the game10-18-2022_13-18-10.wick (5.5 KB)
(To add a wall, put it’s name inside of the this.blocks array, inside of the default script of the frame)
this works much better, I may actually use this and see if it is really better.
is there a way for the blocks to add themselves to the array? if so it would be much better
(I might actually use @lazybutter’s version as I can streach the objects and they would still work (and it would reduce lag))
now I need to make a beat system which I tried making it allow you to move when the lines at the bottom are in a certain area but that makes you unable to move sometimes even though you are hitting on the beat. binary the game10-18-2022_11-29-37.wick
i made a new project variable to where you have about a window of two ticks before you miss your chance. i made two bars on different sides revolve around resetting the timer before the beat is reset. however, you can just spam the key that is in the direction you want to, so you may want to add a system to where you have to keep moving in order to stay alive. for example, maybe there’s a set amount of time before the room blows up, you know. you could also have a life mechanic where you lose a life every time you miss a beat(doesn’t work if you aren’t even trying, thats where the room thing comes into play), but everytime you pass a room flawlessly, you gain a life.
here’s the file:
binary the game10-18-2022_13-50-46.wick (10.3 KB)
I was thinking its going to be a crypt of the necrodancer clone, every beat you can move and the enemies can move but if you miss a beat only the enemies move.
makes sense.
it still doesn’t really work very good.
I might just drop the necrodancer theme
i wouldn’t really drop it, id keep a bit of it there, but with a bit of a new twist to it. getting away from enemies(or, navigating in general) is a bit challenging. but maybe every four beats, the enemy will move, which eases it up. maybe to keep it difficult, you’ll switch with the enemy every once in a while. so, you need to lure the enemy somewhere where it’ll easily get to the next room and then somehow wait for it while trying not to get killed.