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

fruity.gif

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.png

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
 
Last edited by nop90,

Technicmaster0

Well-Known Member
Member
Joined
Oct 22, 2011
Messages
4,336
Trophies
2
Website
www.flashkarten.tk
XP
3,105
Country
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,

nop90

Well-Known Member
OP
Member
Joined
Jan 11, 2014
Messages
1,556
Trophies
0
Location
Rome
XP
3,021
Country
Italy
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...
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.

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).


Hi, it works but input is all fucked up. Looks like you check key-held-down not key-up

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?

--------------------- MERGED ---------------------------

It happens on real hw

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?
 

Attachments

  • testkeys2.zip
    624.1 KB · Views: 251
  • Like
Reactions: lordelan

Technicmaster0

Well-Known Member
Member
Joined
Oct 22, 2011
Messages
4,336
Trophies
2
Website
www.flashkarten.tk
XP
3,105
Country
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.
 

nop90

Well-Known Member
OP
Member
Joined
Jan 11, 2014
Messages
1,556
Trophies
0
Location
Rome
XP
3,021
Country
Italy
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.

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,

Technicmaster0

Well-Known Member
Member
Joined
Oct 22, 2011
Messages
4,336
Trophies
2
Website
www.flashkarten.tk
XP
3,105
Country
Gambia, The
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.
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?
 

nop90

Well-Known Member
OP
Member
Joined
Jan 11, 2014
Messages
1,556
Trophies
0
Location
Rome
XP
3,021
Country
Italy
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?
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,

nop90

Well-Known Member
OP
Member
Joined
Jan 11, 2014
Messages
1,556
Trophies
0
Location
Rome
XP
3,021
Country
Italy
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.
 

Attachments

  • testkeys2.zip
    83.2 KB · Views: 176
Last edited by nop90,

Technicmaster0

Well-Known Member
Member
Joined
Oct 22, 2011
Messages
4,336
Trophies
2
Website
www.flashkarten.tk
XP
3,105
Country
Gambia, The
I'm trying to figure aut the cause of the key issue. Someon 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.
One would need the nro to test, not the nso.
 

nop90

Well-Known Member
OP
Member
Joined
Jan 11, 2014
Messages
1,556
Trophies
0
Location
Rome
XP
3,021
Country
Italy
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?

@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
 

Attachments

  • testkeys2.zip
    168.8 KB · Views: 242
Last edited by nop90,

Technicmaster0

Well-Known Member
Member
Joined
Oct 22, 2011
Messages
4,336
Trophies
2
Website
www.flashkarten.tk
XP
3,105
Country
Gambia, The
@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
As I wrote, I need a .nro file to test, not the .nso that's in the latest zip archive.
 

Technicmaster0

Well-Known Member
Member
Joined
Oct 22, 2011
Messages
4,336
Trophies
2
Website
www.flashkarten.tk
XP
3,105
Country
Gambia, The
While you where writing I added it in the zip.
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.
 

You may also like...

General chit-chat
Help Users
  • Wolfy @ Wolfy:
    Nintendo Direct tomorrow @2pmPST
  • FAST6191 @ FAST6191:
    People actually still pay attention to those?
  • M4x1mumReZ @ M4x1mumReZ:
    Nobody cares about Nintendo Direct other than to keep the crybabies occupied, just the same boring garbage every year.
  • M4x1mumReZ @ M4x1mumReZ:
    @FAST6191, Only those who bow down to the evil gods, that being Nintendo.
  • FAST6191 @ FAST6191:
    Even they have to be bored as anything
    +2
  • M4x1mumReZ @ M4x1mumReZ:
    Old ones like the Smash Bros for Switch was one of the best imo.
  • Wolfy @ Wolfy:
    I don't mind seeing them, at least to see if anything interesting gets announced. It may not be the golden years with Iwata anymore, but its something I don't mind watching.(don't remember anything from most of them, but sometimes one title in the lineup makes it worthwhile
    +1
  • FAST6191 @ FAST6191:
    Surely easier to get that after the fact. Also other than maybe the first they have all been boring as sin
  • K3N1 @ K3N1:
    Nintendo direct: 30 minute vide about Hogwarts Legacy and 500k comments calling Nintendo racist nazis
    +1
  • BigOnYa @ BigOnYa:
    or 39 minutes of crap Indies, and 1 minute at the end of new Zelda screenshots.
  • Flame @ Flame:
    @BigOnYa TAKE THAT BACK!
  • Flame @ Flame:
    @BigOnYa ill get Florida Man to f you up or else
  • Flame @ Flame:
    take that back
  • K3N1 @ K3N1:
    I got a $600 root canal appointment coming up 😟
  • AncientBoi @ AncientBoi:
    ouch
  • M4x1mumReZ @ M4x1mumReZ:
    @K3N1, Oh god no
    +1
  • M4x1mumReZ @ M4x1mumReZ:
    If that Nintendo Direct came out, I'm gonna pull my eyes out
  • K3N1 @ K3N1:
    That's actually considered cheap for a dentist glad I have good insurance
    +2
  • Psionic Roshambo @ Psionic Roshambo:
    Get dentures women love a gummer lol
  • K3N1 @ K3N1:
    That would make them a lesbian
    K3N1 @ K3N1: That would make them a lesbian