This site requires JavaScript, please enable it in your browser!
Greenfoot back

Report as inappropriate.

Portal
Portal presents ...

2025/6/9

Portal's Game Loop

(THIS IS JUST A QUICK DEMO - DOWNLOAD SOURCE CODE FOR ALL THE STUFF)

See the linked GitHub for full docs!

I didn't like act() very much... So I made an entire game loop for some reason!
Features:
> GameLoop - Custom game loop inspired by Robert Nystrom's sample implementation, with an FPS display and delta time included
> GameEntity - Replacement to Actor, which recieves ready(), process(delta), and physicsProcess(delta)
> CharacterEntity - A subclass of GameEntity with prebuilt position/velocity/direction vectors
> Input - A singleton designed to make handling inputs a little easier
> Vector2 - (x, y) coordinates with double precision
> Vector2i - Vector2, but with int. Cross-compatibility not guaranteed
> MathUtils - required misc math functions not provided by Java's default Math class
> TileMap - Basic TileMap system for basic level design
> Tile - Required for TileMap
> TileMapPathGenerator - A procedural generation algorithm for TileMaps, courtesy of CatsaCode
> imports Label and SmoothMover, those are not mine!

365 views / 21 in the last 7 days

Tags: with-source

open in greenfoot
Your browser does not support the canvas tag.
PortalPortal

2025/6/9

Seems like the web version is completely borked, works fine in the app

Want to leave a comment? You must first log in.

Who likes this?

No votes yet.