You are browsing as a guest. Sign up (or log in) to start making projects!

1h 3m 19s logged

introducing platform objects.

Instead of relying only on the bottom of the screen as a floor, I created a simple Block system. Each block represents a solid object in the world that the player can stand on.

This required restructuring collision logic so that the player is no longer only interacting with the screen boundary, but with multiple objects.

I also started separating the world into a list of objects, which is an important step toward building full levels later.

Key Improvements Made …:

  1. Added Block System

A simple block class was introduced to represent platforms.

  1. Object List System

Instead of hardcoding collisions, all blocks are stored in a list so the level can be expanded easily.

  1. Basic Collision Detection

A simple collision check was added to stop the player falling through platforms.

Problems Encountered …
Problem : Player clipping through platforms

When first adding blocks, the player would sometimes fall through them or “stick” inside them.

Cause:
Collision was only being checked after movement, not corrected properly.

Fix:
Added positional correction after detecting collision:

0
1

Comments 0

No comments yet. Be the first!