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
59
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
  • Sonic Angel Knight @ Sonic Angel Knight:
    Catboy back in chat. :ninja:
  • Sonic Angel Knight @ Sonic Angel Knight:
    Don't forget to pet it for good luck
  • K3Nv2 @ K3Nv2:
    That cat bites
    +1
  • Psionic Roshambo @ Psionic Roshambo:
    Hmmm yes she does
  • Psionic Roshambo @ Psionic Roshambo:
    Float like a butterfly burns when I pee lol
    +1
  • BigOnYa @ BigOnYa:
    So does that mean your date was not good? It burns now?
    +1
  • K3Nv2 @ K3Nv2:
    Got two new stds in one night
    +1
  • BigOnYa @ BigOnYa:
    Giggity
    +1
  • The Catboy @ The Catboy:
    I don't bite! Minus the times when I did bite
  • The Catboy @ The Catboy:
    Like 5 minutes ago
  • K3Nv2 @ K3Nv2:
    Billie needs her lunch
  • K3Nv2 @ K3Nv2:
    Ffs papa brought back the cheeseburger pizza it's like the only decent pie they had since the 80s
  • BigOnYa @ BigOnYa:
    I'm not a fan of papa johns, but that does sound good. We hardly order out pizza, I like making my own, but when we do its donatoes
  • K3Nv2 @ K3Nv2:
    I get them like once every two months anymore
  • K3Nv2 @ K3Nv2:
    Just because it's half a mile from where I live
  • BigOnYa @ BigOnYa:
    Request next time you order, that Shaq deliver it to you
  • K3Nv2 @ K3Nv2:
    I want him to buy me a chain also
  • K3Nv2 @ K3Nv2:
    Open it right next to the one we have
    +1
  • BakerMan @ BakerMan:
    guys should i make a new thread and just count the amount of posts until kyle, luke or leo joins the thread for fun?
  • BakerMan @ BakerMan:
    kyle's fine, just waiting for that wario joke

    luke and leo though, they yap until the thread's enjoyability is about halved
  • K3Nv2 @ K3Nv2:
    Leo is Luke's alterego when he gets hard
  • BigOnYa @ BigOnYa:
    Luke is gone, he got banned. And I'm surprised Leo hasn't yet
  • K3Nv2 @ K3Nv2:
    Subway was actually pretty decent tonight
  • BigOnYa @ BigOnYa:
    Wut you get, a seafood and psi salad sub
  • K3Nv2 @ K3Nv2:
    Psi had my footlong meatball special
    +1
    K3Nv2 @ K3Nv2: Psi had my footlong meatball special +1