COMPLETED [RELEASE] Fruit'Y port for Nintendo Switch - Retroguru Team

Discussion in 'Switch - Emulation, Homebrew & Software Projects' started by nop90, Feb 28, 2018.


    7,029

    34
    Front-page COMPLETED
    fruity.

    Fruit'Y - Playing with edibles is heavily inspired by the Kaiko classic Gem'X, which has been seen on computers such as the Commodore Amiga 500, Commodore 64 and Atari ST.

    Although tiger mum forbids little Sheran to play with edibles, there is simply no way to stop him from playing with fruits found inside the deep jungle. Being shiny, smelling wonderful and tasting even better Sheran can't be kept away. So let's do the best we could do: Support him!

    The game consists of two boards of fruits. The left field belongs to Sheran who needs to reproduce the right field 1:1 being able to proceed to the next level. Sounds easy?!

    There is a total of five fruits. Once you control Sheran's prank and activate a field, the fruit inside the activated field morphs two steps, while the other fields located above, below, to the left and to the right, morph the fruit located inside only once.

    The order of fruits is shown in the middle of the playing field.
    Mango -> Turns into an orange
    Orange -> Turns into a banana
    Banana -> Turns into a pear
    Pear -> Turns into an apple
    Apple -> Turns into nothing, the apple disappears.

    Don't forget: Hit on the spot, the fruit morphs two steps, while the surrounding neighbour fruits only morph once. It's not difficult to understand, just play the first few levels.

    ------------------------------------------------------------------------------​

    The code is closed source and copyright of Retroguru (www.retroguru.com)

    Release link : http://www.retroguru.com/fruity/fruity-v.latest-nintendoswitch.zip
    Check the Fruit'Y page www.retroguru.com/fruity for other platforms ports of this game.

    This homebrew is based on libnx and uses the libSDL for Nintendo Switch

    Fruity Trailer



    Releases

    v1.0 RC1 (17 march 2018)
    - Added HW fullscreen scaling
    - Aded sound

    v0.2 alpha release (02 march 2018)
    - Fixed keys issue
    - Aded touch screen support

    v0.1 alpha release (28 february 2018)
    - No sound yet (audio not implemented in LibSDL for Switch)
    - Tested only on RyujiNX emulator.
    - On a real console could crash on exit (issue related to the alpha version of the libSDL port to Switch) - to be tested

    Screenshots

    Fruity.

    Installation

    Put the content of the zip in the root of the Switch SD card (maintaining the directory structure) and launch it with the HB laucher.

    You can run the game on RyujiNX too: extract the content of the zip in the %%appdata%%\RyuFs\sdmc folder and drag the nro file on Ryujinx.exe.

    Note: on windows the %%appdata%% folder is \Users\[username]\AppData\Roaming
     
    Discussion (34 replies)
  1. nop90
    OP

    nop90 GBAtemp Advanced Maniac

    Member
    11
    Jan 11, 2014
    Italy
    Rome
    Please test it on a real Switch an give me all the feedback you can.
     
    cearp and lordelan like this.
  2. pwsincd

    pwsincd Garage Flower

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

    Our Patreon
    Dec 4, 2011
    Manchester UK
    Oh cool new homebrew ... i cannot test on my switch (4.1) and it didnt load in RyuiiNX but i assume theres issues there... however .. i took the liberty of adding your app to our appstore here : https://www.switchbru.com/appstore/#/app/Fruity . Ill update if and when newer versions appear...
     
    KiiWii and lordelan like this.
  3. nop90
    OP

    nop90 GBAtemp Advanced Maniac

    Member
    11
    Jan 11, 2014
    Italy
    Rome
    I tested the code on RyujiNX and it works fine. Did you followed the installation notes at the end of the OP?
     
  4. pwsincd

    pwsincd Garage Flower

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

    Our Patreon
    Dec 4, 2011
    Manchester UK
    no i just threw the nro @ the exe .. ill look again later... when i have some time..
     
  5. plutoo

    plutoo Newbie

    Newcomer
    1
    Apr 4, 2015
    Hi, it works but input is all fucked up. Looks like you check key-held-down not key-up
     
    KiiWii likes this.
  6. nop90
    OP

    nop90 GBAtemp Advanced Maniac

    Member
    11
    Jan 11, 2014
    Italy
    Rome
    Did you read the notes at the end of the OP about RyujiNX problems?

    C'mon guys, don't be lazy, I spent time writing the OP infos! :D
     
  7. Technicmaster0

    Technicmaster0 GBAtemp Psycho!

    Member
    8
    Oct 22, 2011
    Gambia, The
    Pressing exit did nothing/ restarted the game but didn't exit to hblauncher. HOME-Button works.
    There is another problem tho: button presses are recoginzed way too fast. It's very hard to get to the right option in the menu or to get to the right fruit. (the bug you mentioned at the bottom of your post)
    Make sure to use keyDown and not keyHold.
     
    Last edited by Technicmaster0, Feb 28, 2018
  8. plutoo

    plutoo Newbie

    Newcomer
    1
    Apr 4, 2015
    It happens on real hw
     
  9. nop90
    OP

    nop90 GBAtemp Advanced Maniac

    Member
    11
    Jan 11, 2014
    Italy
    Rome
    About the exit behaviour, it's strange, but can't do anyting about it without a real switch.

    For the key repeat problem, so it seems to happen on a real Switch too. This is an important information.

    It happens in pFBA too, so maybe it's a problem of libnx (of mine not understandig well how libnx work. I used the same code structure of ctrulib, but maybe there are differences).


    Are you reporting this from a real Switch or from the emulator? I supposed the second.

    I'll check if I can found a workaround in libSDL.

    And, are you THAT plutoo, or only the same nick?

    — Posts automatically merged - Please don't double post! —

    Thanks for reporting.

    Attached a little piece of code I used to test if it was a problem of my SDL port, and it seems to be the same using libnx code.

    For how I intend hidKeysHeld(), it should remain the same value if a key stay pressed, not go up and down at every hidScanInput().

    Am I wrong?
     

    Attached Files:

    lordelan likes this.
  10. Technicmaster0

    Technicmaster0 GBAtemp Psycho!

    Member
    8
    Oct 22, 2011
    Gambia, The
    libnx uses hidKeysDown() to check if a button is pressed. It's only 1 directly after the button got pressed; not as long as the button is pressed. HidKeysHeld is 1 as long as the button is pressed but you probably want the first behaviour.
     
  11. nop90
    OP

    nop90 GBAtemp Advanced Maniac

    Member
    11
    Jan 11, 2014
    Italy
    Rome
    I need to check HidKeysHeld() and want it to remain 1 as long as the key stay pressed.

    In libSDL can't use hidKeysDown() and hidKeysUp(), because I have to mantain an internal state and if someone calls hidScanInput() in the code (outside the SDL event handling), the SDL keyboard state would became dirty.

    If you can, please test the example attached in my previous post in a real switch and let me know how it works.
     
    Last edited by nop90, Feb 28, 2018
  12. Technicmaster0

    Technicmaster0 GBAtemp Psycho!

    Member
    8
    Oct 22, 2011
    Gambia, The
    idk how it should work, but holding the A button prints "UP\nDOWN\n" as long as the button is hold. Maybe check how libnx used kDown and copy their implementation?
     
  13. nop90
    OP

    nop90 GBAtemp Advanced Maniac

    Member
    11
    Jan 11, 2014
    Italy
    Rome
    maybe I'm very tired and I'm doing a stupid mistake in my simple code (happens very often :lol:), but if this is not the case, there is a bug in libnx.

    I searched in the hid service of libnx and at a first look of the high level code everything seems ok. But it's not easy to follow the low level stuff.
     
    Last edited by nop90, Feb 28, 2018
  14. nop90
    OP

    nop90 GBAtemp Advanced Maniac

    Member
    11
    Jan 11, 2014
    Italy
    Rome
    I'm trying to figure aut the cause of the key issue. Someone coul test the attached program on a real switch an tell if pressing a key keydown is showed only once or if there are several keydoun-keyup?

    Sorry for all this requestestes, but without you help I'm stuck.
     

    Attached Files:

    Last edited by nop90, Feb 28, 2018
  15. Technicmaster0

    Technicmaster0 GBAtemp Psycho!

    Member
    8
    Oct 22, 2011
    Gambia, The
    One would need the nro to test, not the nso.
     
  16. nop90
    OP

    nop90 GBAtemp Advanced Maniac

    Member
    11
    Jan 11, 2014
    Italy
    Rome
    @Technicmaster0 , can you confirm that you tested it on a real Switch? If yes, could you be so kind to test again with the attached file?

    yellows8 suggested to add a vsync call in the loop and test again, but on the emulator nothing changes.

    Edit: added both nro and nso in the zip
     

    Attached Files:

    Last edited by nop90, Feb 28, 2018
  17. Technicmaster0

    Technicmaster0 GBAtemp Psycho!

    Member
    8
    Oct 22, 2011
    Gambia, The
    As I wrote, I need a .nro file to test, not the .nso that's in the latest zip archive.
     
  18. nop90
    OP

    nop90 GBAtemp Advanced Maniac

    Member
    11
    Jan 11, 2014
    Italy
    Rome
    While you where writing I added it in the zip.
     
  19. Technicmaster0

    Technicmaster0 GBAtemp Psycho!

    Member
    8
    Oct 22, 2011
    Gambia, The
    The latest nro works as one would expect (prints down when the button is pressed and up when the button is no longer pressed).

    Regarding the files: I'm not sure about the purpose of .nso. The hblauncher only reads .nro files. The header is integrated into the nro.
     
Loading...