Gameboy Development Forum

Discussion about software development for the old-school Gameboys, ranging from the "Gray brick" to Gameboy Color
(Launched in 2008)

You are not logged in.

Ads

#1 2020-06-02 22:20:08

ZombiDev
New member
Registered: 2020-05-13
Posts: 2

Help with detect tiles

Hello, I am making a simple platform with zgb but I have a question,
How to detect the different tiles?
example if it's a ladder or a door

Offline

 

#2 2020-06-03 11:52:51

toxa
Member
Registered: 2020-02-13
Posts: 305

Re: Help with detect tiles

https://github.com/Zal0/ZGB/wiki/Collisions
i think TranslateSprite() returns you this info, but better ask ZalO.

Offline

 

#3 2020-06-04 02:10:13

Zalo
Member
From: Spain
Registered: 2016-07-26
Posts: 103
Website

Re: Help with detect tiles

The return of TranslateSprite is fine if there is a collision with that tile (some spikes on the floor, for instance)
For general purposes you should use GetScrollTile

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2005 Rickard Andersson