Work in Progress

Hollow Knight Prototype

8

McPepic 2021-11-29 17:23 (Edited)

Just a little test that I’ve been working on.

I’ve never posted anything to the site before, so I’m hoping you guys like it.

Left/right to move
Up to jump
B to attack (purely visual at the moment)

The screen also scrolls now!

I rewrote the whole program because the code was super messy and it was really difficult to add more to the program. If there’s anything you think I should add at this stage of development, please let me know!

Update:
Camera implemented and background scrolling completely reworked.

Spikes and sword/nail don’t do anything yet. Just aesthetic (for now)

Update 2?:
Knockback added when nail hits spikes or wall
Destructible scenery

UI overlay added (working but unused for now)

Hollow Knight.nx | Open in app
2021-12-16 19:40
Hollow Knight.nx | Open in app
2021-12-11 18:57

Timo 2021-11-29 17:31

Nice graphics!
I played the original and liked it… except that I didn‘t finish it because I got lost…


G-9 2021-11-29 18:44

Nice :) but why didn’t you assign jump to a button ?


was8bit 2021-11-30 20:21

Beautiful graphics :)

I cannot reproduce getting stuck, and by falling and a speed 1 that directly won't get you stuck in the floor... I am using an iPad.... what device are you using when you get stuck??


Timo 2021-11-30 20:55

Me? Nono, I mean the original game: https://youtu.be/kWo5g-tsBNk


McPepic 2021-11-30 23:01

@Timo was8bit was talking about the note that I made in the description about the player getting stuck in the floor while playing.

@was8bit I am using an iPad as well. I think it has something to do with the player jumping onto the platform and my iffy collision code. I was just wondering if there was a better way to handle that.


was8bit 2021-12-01 01:29

As i cannot reproduce the "stuck" condition, it would be hard to fix until we knew why it sticks.. so i would say your approach should be ok...

If you keep your solid graphics as solid blocks (8x8) then Timo's method is the best...

https://lowresnx.inutilis.com/topic.php?id=318

It checks all 4 points around your character... assuming your character is also nearly a full 8x8 block...

If you want pixel control, SPRITE HIT with individual sprites automatically detects contact at the pixel level.. so i created this approach...

https://lowresnx.inutilis.com/topic.php?id=2014

Which detects surrounding cell blocks, creates temporary sprites which duplicate the position and cell content as a sprite, SPRITE HIT with your player temporarily moved, and allow the move if no contacts, return player to original position if contact is made... then remove all the temporary sprites.,,

This method would only be needed IF you have jagged edges on everything, and wanted pixel precision reaction...

Honestly, for most games, keeping everything withing their 8x8 pixel blocks, and using Timo's approach, should work perfectly every time :)


McPepic 2021-12-01 03:26

@was8bit Alright, thank you. I realized that the problems were happening when the player jumps into the side of the platform. I appreciate the help.


was8bit 2021-12-01 05:40

Glad i could be helpful :)


was8bit 2021-12-01 07:10

@ Timo, i reviewed your link to the original game, and i can tell you i could probably never get past the first screen... i might win a award for being able to die the quickest ;)

The only thing im a master at is finding cheats for games, and using the cheats... my only hope to get past the first level of any game ;)


McPepic 2021-12-02 18:35

@was8bit I solved the problem. I just had to adjust where the game checks for collision to be next to the base of the player instead of halfway up. Thanks for the suggestions.


was8bit 2021-12-03 04:49

I glad u got it fixed ;)

Yes, manually doing the checks can take careful thought. :)

For less smooth and less pretty but super easy to code is limit everything to cell block size and limit movement from cell to cell... you can smooth their transition or just jump to the next cell, but all you have to do is do one CELL.C check and this will work 100% of the time ;)


SP4CEBAR 2021-12-12 22:20

I love the animation!


SP4CEBAR 2021-12-12 22:24

Jumping while at the right side end of a corridor makes the character clip trough the wall (thus moving upwards)


McPepic 2021-12-13 03:25

@SP4CEBAR I actually realized this pretty fast while messing around. I haven’t uploaded it yet, but I already worked out a fix and that is no longer happening. I really appreciate the tip, though!


SP4CEBAR 2021-12-13 10:55

Nice


was8bit 2021-12-17 09:46

Your latest update plays very smooth... :)


McPepic 2021-12-17 17:17

@was8bit Thank you. It took a little bit to figure out the math for the camera and how to combine it’s position with the player & background, but now I can center it at any position on the screen. (Also the fact that the background scroll is inverted on NX caused some confusion)


was8bit 2021-12-18 04:29

Yes, what you did was impressive, I never have a moment where I’m not sleepy... it takes a very clear focus to get all the math just right...

for me, if there are too many layers of math happening, it’s hard for me to wrap my mind around all of them at the same time...


G-9 2021-12-19 17:01

i love the camera !


McPepic 2021-12-20 03:15

@G-9 Thank you! I think it came out pretty good. (The next update that I post will have it slightly changed, but I think it’s a little better feeling)


was8bit 2021-12-25 00:51

Grahics are awesome :)


Log in to reply.