COMPLETED [Homebrew] Snake Port (LovePotion)

Discussion in 'Switch - Emulation, Homebrew & Software Projects' started by Shrike, Mar 11, 2018.

  1. Shrike
    OP

    Shrike Advanced Member

    Newcomer
    3
    Mar 10, 2018
    Germany
    [​IMG]


    NEW UPDATE: SNAKE Version 4 (New Style, Now working with 5.x.x )

    Hey I'm back (again) and I have a brand new version of Snake for LovePotion with me (thx TurtleP & Mik & Co for all the help <3 Bless your discord server).
    This time Mik (Renbo Design) from the "Tiny Turtle Industries" Discord supported me with his great artworks. <3 !!!
    In addition to that, this is the first time the game is compiled to only 1 NRO file, instead of a whole folder with Lua files.
    If you want to look at the code anyways (maybe for learning some LovePotion/Lua) just contact me.
    Also this version works with 5.x.x and every other firmware.
    Don't forget: The 2 player-mode is started by pressing "+" on the right joycon.

    Graphic & Performance Improvements:
    • Complete new graphic style, thanks to Mik (Renbo Design)
    • Vibrations are now implemented but you need to (re-)activate them from the switch main menu
    • Only 1 NRO file for the whole game (no more messy folders!)
    • Works with every firmware (Please report if it doesn't !!!)
    • You can skip the into-screens by pressing "A" or touching the screen.
    How to play in 2-Player-Mode:
    To activate 2-Player-Mode, the second player just needs to press "+" on the right joycon.
    In this mode you will loose your tail when you die and after 90 seconds the player with the longest tail wins ! :yay:
    New in this version: There is now a timer where you can see how much time is left.

    How to run:
    • Extract inside your /switch folder and run Snake.nro with hbmenu
    • Use the DPad keys or left-joystick for navigation (Player2: x,y,a,b or right-joystick)
    • Press "+" on the right joycon to start into 2PlayerMode
    • Restart the game to get back to SinglePlayer
    • Battle your best friend for a round of good old snake....
    • ..... ?
    • Profit!

    Videos:


    Old videos from version 2 & 3
    Known Bugs:
    Fixed Bugs / Improvements:
    Snake Version 1 Post

    PS: If you want to upload this game on any homebrew-appstore-whatever .. Do it! :) You're doing a great job!!
     

    Attached Files:

    Last edited by Shrike, Jun 23, 2018
  2. Xandrid

    Xandrid GBAtemp Advanced Fan

    Member
    5
    GBAtemp Patron
    Xandrid is a Patron of GBAtemp and is helping us stay independent!

    Our Patreon
    Mar 27, 2016
    Nigeria
    Nice!
     
    Last edited by Xandrid, Mar 11, 2018
  3. kane159

    kane159 GBAtemp Regular

    Member
    3
    May 28, 2013
    Taiwan
    Awesome!


    從我的iPhone使用Tapatalk 發送
     
  4. Technicmaster0

    Technicmaster0 GBAtemp Psycho!

    Member
    8
    Oct 22, 2011
    Gambia, The
    A few bugs:
    -the points to eat spawn completely randomly; not just on the grid of the snake
    -The "eat" sound came once although I didn't hit a dot
    -The sound stops to work after having eaten a defined amount of food or having restarted (I'm not sure what triggers it)
    -The snake doesn't start with 1 length in the original game
    -a dot to eat spawned within the snake once
     
  5. pwsincd

    pwsincd Garage Flower

    Member
    10
    GBAtemp Patron
    pwsincd is a Patron of GBAtemp and is helping us stay independent!

    Our Patreon
    Dec 4, 2011
    Manchester UK
    lordelan likes this.
  6. sirphayze

    sirphayze Happy camper!

    Member
    1
    Oct 30, 2015
    In the gray area!
    SWEET! I can finally throw away my Nokia 8850. =)
     
  7. Baoulettes

    Baoulettes The lonely man

    Member
    4
    May 25, 2011
    France
    C:\Users\Baoulettes\Desktop\GBATemp
    About point count you could setup something fancy with texture?
    Like a texture that display ''Score : '' and then each number as texture with variable as number so you can actually count it in code ? :)
     
  8. Shrike
    OP

    Shrike Advanced Member

    Newcomer
    3
    Mar 10, 2018
    Germany
    They should spawn somewhere on the screen (except inside the snake .. I actually forgot to check that xD)
    Thats the code atm:
    Code:
        self.x = love.math.random(50,1220)
        self.y = love.math.random(50,680)
    Switch's sceen size is 1280x720...

    I guess the dot just spawned right under your head .. lucky :)

    I was having that trouble, too .. Maybe something with the sound buffer ?? I couldn't find a solution for this .. Its an issue inside LovePotion itself I guess...
    We have to remember LovePotion for switch is in a very early version itself..

    Ahm .. It should .. And it was for me .. Maybe the first dot spawned right at the start right under your head ??
    That would be the solution for your 2 other quotes, too..
    Does it always have 1 Tail @ start for you (BESIDE the head) ?
    Then maybe there is something wrong with picking a random seed... (so its always the same random values every game)

    Yeah like I said .. I did not check this .. lul .. next version, I promise :D

    Actually I thought about this .. But is soo much work xD .. I was just too lazy ..
    Because I hope in a few weeks (months?years?) we will have the textfeature anyways .. access to the gpu would help a lot I guess :P
    Let's just wait and I will add it when texts are working :)

    @All

    Thx for the feedback <3
     
    Last edited by Shrike, Mar 11, 2018
    lordelan and Baoulettes like this.
  9. Technicmaster0

    Technicmaster0 GBAtemp Psycho!

    Member
    8
    Oct 22, 2011
    Gambia, The
    But they should only spawn in the grid of the snake, so that they directly align to it. It would be better to use something like
    Code:
    self.x = sizeOfSnakeBlock*love.math.random()
    self.y = sizeOfSnakeBlock*love.math.random()
    I've attached an image showing the problem, too.

    No it spawned at another position before the sound came.

    It works like that, but the snake in the original snake games starts with a tail.
     

    Attached Files:

  10. lordelan

    lordelan GBAtemp Addict

    Member
    9
    Jan 4, 2015
    Germany
    Hey cool. Didn't notice you finally put out a successor app for the Wii U app store. Great work @vgmoose

    Also great to see new HB getting released especially by newcomers @Shrike (and especially by a german newcomer :D).
     
  11. pwsincd

    pwsincd Garage Flower

    Member
    10
    GBAtemp Patron
    pwsincd is a Patron of GBAtemp and is helping us stay independent!

    Our Patreon
    Dec 4, 2011
    Manchester UK

    yeah its pre pelease to iron out bugs .. would be cool for some feedback ...
     
    lordelan likes this.
  12. Tsubakiandou

    Tsubakiandou Mystery member

    Member
    2
    Oct 15, 2016
    Japan
    who needs smash bros or Pokemon on switch when you have snake?! this is why i bought a switch:creep:
     
  13. Shrike
    OP

    Shrike Advanced Member

    Newcomer
    3
    Mar 10, 2018
    Germany
    UPDATE: SNAKE2 (+2PlayerMode)

    Hey I'm back and I have a brand new version of Snake for LovePotion with me (thx TurtleP & Co for all the help <3 Bless your discord server).
    This time you can battle your friends and family !
    I also improved some of the graphics and fixed some of the bugs of the first version.

    2PlayerMode:
    To activate 2PlayerMode, the second player just needs to press "+" on the right joycon.
    In this mode you will "only" loose your tail when you die..
    After 90 seconds the player with the longest tail wins ! :yay:

    :!: IMPORTANT BUG: If you play with 2 players, better one of you uses the joystick of his joycon!
    Because of an internal LovePotion Bug pressing 2 buttons (of 2 joycons) the same time will block the input on the left joycon :(
    This can be pretty gamebreaking in Multiplayer.. :sad: This Bug does not occur when using the joysticks, though...

    Here is a video:



    How to run:
    • Extract inside your /switch folder and run LovePotion.nro with hbmenu
    • Use the DPad keys or joystick for navigation (Player2: x,y,a,b or joystick)
    • Press "+" on the right joycon to start into 2PlayerMode
    • Restart the game to get back to SinglePlayer
    • Battle your best friend for a round of good old snake....
    • ..... ?
    • Profit!
     
    lordelan and Cid2mizard like this.
  14. lordelan

    lordelan GBAtemp Addict

    Member
    9
    Jan 4, 2015
    Germany
    Fantastic update!
     
  15. Shrike
    OP

    Shrike Advanced Member

    Newcomer
    3
    Mar 10, 2018
    Germany
    NEW UPDATE: SNAKE Version 3 (with 2PlayerMode, vibrations & BIG performance updates)

    Hey I'm back (again) and I have a brand new version of Snake for LovePotion with me (thx TurtleP & Co for all the help <3 Bless your discord server).
    This time you can battle your friends and family !
    I also improved some of the graphics and fixed some of the bugs of the first two versions.

    Graphic & Performance Improvements:
    • There is now a score for player 1 and 2.
    • Vibrations are now implemented but you need to (re-)activate them from the switch main menu
    • Also in 2Player-Mode you will have a timer where you can see how much time is left.
    • Performance is now much better because of LovePotion is working much faster now. Almost every bug from version 2 is now fixed because of that.
    • Additional I now have a "Intro Preloader" which you can see in the video below..
    • Oh.. and the hbmenu entry has now it's own icon and name :)
    How to play in 2-Player-Mode:
    To activate 2-Player-Mode, the second player just needs to press "+" on the right joycon.
    In this mode you will loose your tail when you die and after 90 seconds the player with the longest tail wins ! :yay:
    New in this version: There is now a timer where you can see how much time is left.

    Here are some videos:

     
    Last edited by Shrike, May 17, 2018
    lordelan and hippy dave like this.
  16. lordelan

    lordelan GBAtemp Addict

    Member
    9
    Jan 4, 2015
    Germany
    Would you mind giving me a hint what LovePotion is?
    Is it a game engine?

    Very cool update btw as usual!
     
  17. Shrike
    OP

    Shrike Advanced Member

    Newcomer
    3
    Mar 10, 2018
    Germany
    Yep. It is based on Love2D (or Löve). A framework for making 2D games based on the program-language LUA.

    From: https://love2d.org/

    @TurtleP ported Love2D to the 3DS and now he is porting it for the Switch, too. ( What is a great job btw, thank you, if you read this :P )
    This port of Love2D is called LovePotion.
    The great thing about LovePotion is, that you don't need to program on a low level like C or C++.
    This makes it a lot easier to get all kind of 2D games to the switch.

    From: https://github.com/TurtleP/LovePotion/releases/tag/switch-1.0.0

    Hope this helps you :yay:
     
    lordelan likes this.
  18. Tsubakiandou

    Tsubakiandou Mystery member

    Member
    2
    Oct 15, 2016
    Japan
    lordelan likes this.
  19. lordelan

    lordelan GBAtemp Addict

    Member
    9
    Jan 4, 2015
    Germany
    Very helpful and interesting, thanks for that! :)
     
  20. Shrike
    OP

    Shrike Advanced Member

    Newcomer
    3
    Mar 10, 2018
    Germany
    [​IMG]


    NEW UPDATE: SNAKE Version 4 (New Style, Now working with 5.x.x )

    Hey I'm back (again) and I have a brand new version of Snake for LovePotion with me (thx TurtleP & Mik & Co for all the help <3 Bless your discord server).
    This time Mik (Renbo Design) from the "Tiny Turtle Industries" Discord supported me with his great artworks. <3 !!!
    In addition to that, this is the first time the game is compiled to only 1 NRO file, instead of a whole folder with Lua files.
    If you want to look at the code anyways (maybe for learning some LovePotion/Lua) just contact me.
    Also this version works with 5.x.x and every other firmware.
    Don't forget: The 2 player-mode is started by pressing "+" on the right joycon.

    Graphic & Performance Improvements:
    • Complete new graphic style, thanks to Mik (Renbo Design)
    • Vibrations are now implemented but you need to (re-)activate them from the switch main menu
    • Only 1 NRO file for the whole game (no more messy folders!)
    • Works with every firmware (Please report if it doesn't !!!)
    • You can skip the into-screens by pressing "A" or touching the screen.
    How to play in 2-Player-Mode:
    To activate 2-Player-Mode, the second player just needs to press "+" on the right joycon.
    In this mode you will loose your tail when you die and after 90 seconds the player with the longest tail wins ! :yay:
    New in this version: There is now a timer where you can see how much time is left.

    How to run:
    • Extract inside your /switch folder and run Snake.nro with hbmenu
    • Use the DPad keys or left-joystick for navigation (Player2: x,y,a,b or right-joystick)
    • Press "+" on the right joycon to start into 2PlayerMode
    • Restart the game to get back to SinglePlayer
    • Battle your best friend for a round of good old snake....
    • ..... ?
    • Profit!

    Videos:
     
    Cid2mizard, Dutt, hippy dave and 2 others like this.
Loading...