You can view this content for free after you Log In or Sign Up.
Devlog - Improved Stairs & Collision
I have done more work on the Beaumontvania Engine.
But first, to reiterate a previous point:
In Castlevania, players can jump through ceilings from underneath, but will be blocked from jumping into a block's side. I accomplished & discussed this in my last blog post.
While this behavior is perfectly fine, I did want to introduce some of the additional quirks seen in the Bloodstained: Curse of the Moon games (which also recreate classic CV). There are two features in particular that I wanted:
The ability to jump when there are blocks directly above you. In CV (and my engine), the player is unable to execute a jump if there is a block above their head when grounded.
The ability to jump through ceilings and land on top of them.
Although the player's jump is too low to naturally jump through ceilings, I want the engine to at least be capable of supporting this feature in the case of a double jump, for example.
However... There is an obstacle! The player's feet is constantly checking for collisions. If the player attempts to jump through a solid, the feet will detect [o_solid] and interrupt their jump - causing the player to immediately bounce back down.
I solved this by modifying the foot collision -- basically: if players are inside of a solid during a jump, then consider their character as NOT grounded, and do not interrupt their jump.
Behold! Unlimited Power! The ability to jump through ceilings.
---
This has caused bugs, however.
One issue is that players can fall through floors because portions of their body are technically inside of [o_solid] even when they should be grounded. I have fixed this (I hope).
Here's one such solution:
If players are jumping and within a solid... And their feet detects [o_solid] below, but the feet themselves are NOT inside of a solid, then treat the player as grounded. Otherwise, we can treat them as not grounded.
I hope they're fixed, anyway. But let me show you those bugs anyway, just for fun.
Bug. Player's knee is inside wall, so player's Feet Detection was never re-enabled.Bug. Player's back is inside wall, so Feet Detection was never re-enabled.Unrelated Bug. The body thought this area was a legal space to stand.
---
I have also implemented stairs (and much more efficiently than before). There might be one thing about the older code that is slightly better, but the newer code is faster, requires less lines of code, and requires less individual objects per staircase by default.
But I've also added a new feature - the ability to jump onto stairs.
This feature was not present in the original CV trilogy, but was seen various titles, such as CV: Bloodlines, Super Castlevania IV, Rondo of Blood, and even Bloodstained: Curse of the Moon.
This feature does make stairs a bit more complicated, and was the primary reason I never had it in the Prototype. Its inclusion also means that staircases now require additional objects... In fact, one additional object for every 16 pixels (or tile).
In the prototype, stairs were comprised of two tangible objects - a top & bottom entry point. The rest of the stairs did not exist; players were instead put into a unique state where they can only move diagonally until they exit via one of the entry points.
But to accommodate the ability to land ON stairs, every step needs an object to detect.
I hope there are no bugs present, but I would not be surprised if there were. I don't know if there's any real demand for it, but players can also lock their movement while holding A too. Player can Jump onto stairs, drop off stairs, and lock position.
I can use basic math to determine the correct coordinates for players to land.
If [o_stairs_mid] is drawn from its bottom-left corner (0, 0) and players run across the stairs in a perfect diagonal line, then coordinates for the top-right corner are (16, 16). If players land on the stairs on its 8th horizontal pixel, then their feet should also be on the 8th vertical pixel. But this is very tricky when dealing with gravity pulling players down in sub-pixels very quickly.
So: I find the difference between [o_player.x] and [o_stairs_mid.x] (origin: 0,0) to determine how far long the player is along the horizontal axis (let's say they're 12 pixels deep). I then take 12 and add it to the stairs vertical axis, ensuring a perfect 1:1 ratio.
So, when players enter the stairs while falling, I then FORCE them to those coordinates. This can sometimes result in an abrupt jittery animation though.
---
Oh, and players now have the ability to drop off stairs.
Although this feature was not in very many games, they were present in SC4 & RoB -- which are probably the two most iconic "classic-style" games in the franchise for many fans. That said, I was uncertain about its inclusion because:
It makes stairs less risky than they already were (due to Elayne's speed) since players can now instantly exit staircases on command.
Players may accidentally drop off stairs and die.
The Curse of the Moon games never included the ability to drop off of stairs despite allowing players to jump onto them. I can only assume the reason for this choice was because it was better for the game design & balance... So might it be a mistake for me to include it? I am also less inclined to give players methods to rush through or ignore tangible gameplay mechanics.
But it's good that my engine is, at the very least, capable of supporting these features now.
Поддерживать автора контента материально - единоразово или на регулярной основе.
Возможность общаться напрямую с автором контента через чат на сайте.
Подписаться
Этот веб-сайт использует файлы cookie для улучшения вашего опыта во время навигации по нему. Продолжайте использовать этот веб-сайт как обычно, если вы согласны с использованием файлов cookie. Ознакомьтесь с нашей Политикой Конфиденциальности для получения подробной информации. Выбирая Принять, вы даете согласие на использование файлов cookie.