-
-
Notifications
You must be signed in to change notification settings - Fork 490
Platform Engine
Note: The engine can be found here: https://tic80.com/play?cart=2367
The goal of Platform Engine is help quickly build and setup a side-scrolling platformer by having the most common mechanics setup; in an easy and extensive way. Enabling a programmer or designer to worry more about graphics and level design. The code is commented with how it is used/implemented to help make changes easier. It is best used for 16x16 sprites for the player, though with some changes to the collision variables it could be made to use 8x8.
A player that can move, jump, duck, and crawl. Ability to move through platforms. Easy to adjust player collision detection. Collectibles. Simple high score save system. Sample enemies that damage the player. Sample mouse code. Camera code for different scenarios (may break enemy placement). State machine by turning functions into variables. Win and non-win conditions.
This engine touches on many aspects that are found in platforming games, but is not a full set of gameplay mechanics. It is a foundation to start on your own games.
One massive tool included in the engine is the dynamic collision detector for the player. Below is the variables. The points that represent these can be see around the player from the information in game. (Pressing I in game)
coll={
tlx=1, --Defines where the left collider is
tly=1, --Defines where the top collider is
trx=14,--Defines where the right collider is
cly1=7,--Defines where the left top mid collider is
cly2=8,--Defines where the left bottom mid collider is
cry1=7,--Defines where the right top mid collider is
cry2=8 --Defines where the right bottom mid collider is
}
Changing these variables will allow the player to have different collisions. These can be changed during runtime, which enables things such as crawling.
TIC-80 tiny computer https://tic80.com | Twitter | Telegram | Terms
Built-in Editors
Console
Platform
RAM & VRAM | Display | Palette | Bits per Pixel (BPP) |
.tic
Format | Supported Languages
Other
Tutorials | Code Snippets | Libraries | External Tools | FFT
API
- BDR (0.90)
- BOOT (1.0)
- MENU
- OVR (deprecated)
- SCN (deprecated)
- TIC
- btn & btnp
- circ & circb
- clip
- cls
- elli & ellib (0.90)
- exit
- fget & fset (0.80)
- font
- key & keyp
- line
- map
- memcpy & memset
- mget & mset
- mouse
- music
- peek, peek4
- peek1, peek2 (1.0)
- pix
- pmem
- poke, poke4
- poke1, poke2 (1.0)
- rect & rectb
- reset
- sfx
- spr
- sync
- ttri (1.0)
- time
- trace
- tri & trib (0.90)
- tstamp (0.80)
- vbank (1.0)