Homebrew Need to find out the color of a pixel at a specific point for my Snake port

AsadSolos

Member
OP
Newcomer
Joined
Oct 3, 2022
Messages
5
Trophies
0
Location
Here
XP
56
Country
United States
Hi guys,
I'm making a port for snake on the 3ds for fun and I'm trying to see if there's a way to get the color of a pixel on the top screen of the 3DS at a point. Reason why is that I need to find a way to stop the game when the snake goes over itself, and the only way I can think of is having something in my main while loop that says that when the snake goes over a pixel that is green colored, the game should end. I don't really know if theres a function that can get the data of a specific pixel, and more specifically the color. If there is one, please let me know :D
 

funstuff3929

Member
Newcomer
Joined
Apr 7, 2024
Messages
14
Trophies
0
Age
24
XP
6
Country
Australia
i'm not sure if you can read the screen directly, but you could try saving the board state in a matrix. where 1 represents a snake block, and you add one to where the snake head is, and if it adds up to two, the snake hit itself.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    BakerMan @ BakerMan: oof