[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,406
Trophies
2
Website
www.flashkarten.tk
XP
3,497
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,136
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: 277
  • Like
Reactions: lordelan

Technicmaster0

Well-Known Member
Member
Joined
Oct 22, 2011
Messages
4,406
Trophies
2
Website
www.flashkarten.tk
XP
3,497
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,136
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,406
Trophies
2
Website
www.flashkarten.tk
XP
3,497
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,136
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,136
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: 204
Last edited by nop90,

Technicmaster0

Well-Known Member
Member
Joined
Oct 22, 2011
Messages
4,406
Trophies
2
Website
www.flashkarten.tk
XP
3,497
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,136
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: 265
Last edited by nop90,

Technicmaster0

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

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    Sicklyboy @ Sicklyboy: For example, one of my other favorite songs from them, with some massive house music influence - +1