Jump to content
IGNORED

Four-Way Gravitational Engine


Recommended Posts

In the last couple months I've been working on a project using "Fake Gravity Platformer Test with Shooting"
as a template.

The goal of my project is to create a Platformer with four-way gravity.

This is how the Code is supposed to work: First, it is decided which Code should be executed depending
on the current gravity, then every direction of Collision is represented by a Subroutine.

Each of those Subroutines follow the same scheme:
The Code tests if one pixel collides with the block and then tests for another one in the
same row/collumn (depending on which direction and which gravity)

This is supposed to create a glichless "Hitbox" for the player character.

This sadly doesn't work for a reason unknown to me
(The player can jump through walls or glitch his "head" halfway into a block supposed to be solid)

I've tried many methods to fix this issue:

-Make the Player Coords normal values instead of float, hoping it would help, but it didn't

-Tried different PlayerCoords-to-Block-Value conversions like
division, modulo and bitwise

-Change Order of Subroutines

I'm clueless and I've completely run out of ideas.

Does anyone know what the Problem could be?

 

I attatched the current state of my project:

 

Working CPU saving Grav Backup V2.txt

 

And how I'd imagined the working subroutine to look like:

 

Subroutine Example.txt

 

Sorry if this sounds unfriendy or something, this is my first post here...

(P. S. Visual Batari Basic v1.0 Build 568 used to work)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...