[Release] Blackjack 3DS

Blackjack 3DS

menu_v0.2.png
game_v0.2.png


Blackjack! Game is played with an infinite deck, with support for late surrender, insurance (2-1), doubling down, and splits. And 3D!

Coded with Rinnegatamante's fantastic Lua Player Plus.

Rules: http://wizardofodds.com/games/blackjack/basics/

Current version is v0.4 (compatible with NH2.5)

(Possible) future development

- language selection
- option to switch deck backs/art
- clean up sloppy code
- move to gpu rendering

Please let me know if you find any bugs or gameplay issues, or if you have a suggestion for a future release.

DOWNLOAD - https://github.com/keanutah/blackjack-3ds/releases
 
Last edited by keanutah,

daxtsu

Well-Known Member
Member
Joined
Jun 9, 2007
Messages
5,627
Trophies
2
XP
5,191
Country
Antarctica
Doesn't look like the font module supports accented characters either:

Code:
myfont = Font.load("segoeui.ttf") -- Taken from Windows 7; it supports accented characters on Windows just fine
Font.setPixelSizes(myfont, 20)

while true do
    Screen.waitVblankStart()
    Screen.refresh()
    Font.print(myfont, 100, 100, "Retour/Précèdent", Color.new(255, 255, 255), TOP_SCREEN)
    Screen.flip()
end

Font.unload(myfont)

BLVWjkq.png
 
  • Like
Reactions: fmkid

keanutah

Well-Known Member
OP
Member
Joined
Sep 18, 2015
Messages
173
Trophies
0
Age
34
XP
192
Country
United States
Doesn't look like the font module supports accented characters either:

Code:
myfont = Font.load("segoeui.ttf") -- Taken from Windows 7; it supports accented characters on Windows just fine
Font.setPixelSizes(myfont, 20)

while true do
    Screen.waitVblankStart()
    Screen.refresh()
    Font.print(myfont, 100, 100, "Retour/Précèdent", Color.new(255, 255, 255), TOP_SCREEN)
    Screen.flip()
end

Font.unload(myfont)

I think it's an issue with the file encoding. I was able to get
Code:
"Test"..string.char("0x00E9")

to print correctly, where "0x00E9" is the unicode/utf-8 code for é.
 
  • Like
Reactions: fmkid

daxtsu

Well-Known Member
Member
Joined
Jun 9, 2007
Messages
5,627
Trophies
2
XP
5,191
Country
Antarctica
I think it's an issue with the file encoding. I was able to get
Code:
"Test"..string.char("0x00E9")

to print correctly, where "0x00E9" is the unicode/utf-8 code for é.

Hm..I'll try saving it as something other than UTF-8 I guess (my editor always defaults to it, but..).

Edit: Uh, okay, that's interesting. If I save it as ANSI, it displays fine! If I save it as UTF-8, it's corrupted. Weird, it should be the other way around..

QnS0pgp.png
 
Last edited by daxtsu,

keanutah

Well-Known Member
OP
Member
Joined
Sep 18, 2015
Messages
173
Trophies
0
Age
34
XP
192
Country
United States
Hm..I'll try saving it as something other than UTF-8 I guess (my editor always defaults to it, but..).
Yeah I dunno. All the fonts I've tried seem to render kinda of dim and blurry, even though they're set to render in pure white. I may just create an image for the accent marks and overlay that on top of the bitmap font, I really like the way the debug font looks right now, even though it's not really meant for this. Or possibly extend the bitmap font to include the characters I need.
 

keanutah

Well-Known Member
OP
Member
Joined
Sep 18, 2015
Messages
173
Trophies
0
Age
34
XP
192
Country
United States
See my edit, it works if you save your source as ANSI and not UTF-8. But yeah, you'd probably have to customise the font if you want to stick with it.
Awesome, you're fantastic. Now I just need to find a similar looking font (or make my own) that looks good at the existing size. Thanks for all the help!
 
  • Like
Reactions: daxtsu

keanutah

Well-Known Member
OP
Member
Joined
Sep 18, 2015
Messages
173
Trophies
0
Age
34
XP
192
Country
United States
Still hoping to hear back from @StapleButter for more info on the font, but I've managed to recreate parts of the debug font as a TrueType font by copying bitmap data from the LPP source code, so I'm confident I will be able to keep the same font but extend the character set.
 
  • Like
Reactions: fmkid and daxtsu

Rinnegatamante

Well-Known Member
Member
Joined
Nov 24, 2014
Messages
3,162
Trophies
2
Age
29
Location
Bologna
Website
rinnegatamante.it
XP
4,857
Country
Italy
Still hoping to hear back from @StapleButter for more info on the font, but I've managed to recreate parts of the debug font as a TrueType font by copying bitmap data from the LPP source code, so I'm confident I will be able to keep the same font but extend the character set.

You can convert the bitmap font to a truetype ones with a converter (there are many of these tools).
 

Xenosaiga

Time to switch it up
Member
Joined
Oct 9, 2015
Messages
1,501
Trophies
0
Age
33
Location
The Shadows
XP
1,070
Country
United States
Found an issue with this game. Only one I have found so far.

After leaving this game and returning to launcher when loading anything else it causes the sound to mess up.

It only happens after launching this game. Is there something where the music still keeps trying to play?

Instead of having start exit the app maybe you could have start bring up an options menu that stops the music and had the option to quit the game?
 

keanutah

Well-Known Member
OP
Member
Joined
Sep 18, 2015
Messages
173
Trophies
0
Age
34
XP
192
Country
United States
Found an issue with this game. Only one I have found so far.

After leaving this game and returning to launcher when loading anything else it causes the sound to mess up.

It only happens after launching this game. Is there something where the music still keeps trying to play?

Instead of having start exit the app maybe you could have start bring up an options menu that stops the music and had the option to quit the game?

Hmm, I think I know how to fix this. I'll upload a new index.lua file for you in a bit for you to try out :)

EDIT: Still investigating...
 
Last edited by keanutah,

Xenosaiga

Time to switch it up
Member
Joined
Oct 9, 2015
Messages
1,501
Trophies
0
Age
33
Location
The Shadows
XP
1,070
Country
United States
When I try to run PHBank bank it tells me to select a target then only lists system settings... I don't have a pokemon game so I don't think I can use it.

Regardless, I have been able to reproduce an issue with Blackjack 3DS and another test Lua program I made. Still trying to figure out exactly what's happening but at the moment I think there is a bug when terminating the sound system in LPP.

Just thought this should be continued in its own thread. That way don't get other thread confused.
------------

If you follow the same steps I did then you've heard the sound I hear. But it doesn't necessarily have to be the Pokebank. Listen during the debug screen during any Homebrew launch.
 

keanutah

Well-Known Member
OP
Member
Joined
Sep 18, 2015
Messages
173
Trophies
0
Age
34
XP
192
Country
United States
Just thought this should be continued in its own thread. That way don't get other thread confused.
------------

If you follow the same steps I did then you've heard the sound I hear. But it doesn't necessarily have to be the Pokebank. Listen during the debug screen during any Homebrew launch.

Yes agreed. I've been able to get strange glitching noises, and even get one Lua program's music playing inside another Lua program. I've reached out to @Rinnegatamante for help, as I'm pretty sure there must be a problem with the sound playback system in LPP. I'll report back here when I have more information.

On a happier note, I've implemented a basic 3D system! The cards during the game now hover slightly above the screen with 3D on, pretty subtle but looks very nice IMO.
 
  • Like
Reactions: daxtsu

Xenosaiga

Time to switch it up
Member
Joined
Oct 9, 2015
Messages
1,501
Trophies
0
Age
33
Location
The Shadows
XP
1,070
Country
United States
Yes agreed. I've been able to get strange glitching noises, and even get one Lua program's music playing inside another Lua program. I've reached out to @Rinnegatamante for help, as I'm pretty sure there must be a problem with the sound playback system in LPP. I'll report back here when I have more information.

On a happier note, I've implemented a basic 3D system! The cards during the game now hover slightly above the screen with 3D on, pretty subtle but looks very nice IMO.
Believe me, the weird sounds are not a deal breaker. And can't wait to see this 3D effect in action.

Do you currently have a way to reset the game if you run out of all money? Or just an option to reset the game completely?

And have you maybe thought of some kind of persistent statistics? Something that doesn't get reset but keeps track of:
Hands won
Hands lost
Times bankrupt/reset
Average winnings per hand

Just stuff like that maybe. Just like giving ideas
 

keanutah

Well-Known Member
OP
Member
Joined
Sep 18, 2015
Messages
173
Trophies
0
Age
34
XP
192
Country
United States
Believe me, the weird sounds are not a deal breaker. And can't wait to see this 3D effect in action.

Do you currently have a way to reset the game if you run out of all money? Or just an option to reset the game completely?

And have you maybe thought of some kind of persistent statistics? Something that doesn't get reset but keeps track of:
Hands won
Hands lost
Times bankrupt/reset
Average winnings per hand

Just stuff like that maybe. Just like giving ideas

I know the sounds aren't a deal breaker, but I like to fix what I can.

Yup there is a gameover state, just basically resets you to the beginning. I was actually planing to show statistics on the gameover screen, so expect something like that in version 0.3
 

Xenosaiga

Time to switch it up
Member
Joined
Oct 9, 2015
Messages
1,501
Trophies
0
Age
33
Location
The Shadows
XP
1,070
Country
United States
@m45t3r

Thought I would bring your attention to this thread. That way @mashers thread doesn't get too off topic.
-----------------
And I'm still far away from game over. At $50,000 right now and still gaining.

Anyways, good to read that you may have got it figured out.
 

keanutah

Well-Known Member
OP
Member
Joined
Sep 18, 2015
Messages
173
Trophies
0
Age
34
XP
192
Country
United States
@m45t3r

Thought I would bring your attention to this thread. That way @mashers thread doesn't get too off topic.
-----------------
And I'm still far away from game over. At $50,000 right now and still gaining.

Anyways, good to read that you may have got it figured out.

Good call. Damn that's a lot of cash! I don't think I've gotten over $5000 but I also don't really play it as much as I try to break it :)

I've attached a new build, give it a shot. Right now my theory is that the sound channel I was using for the BGM (8 and 9) is somehow treated differently by either the 3ds or libctru, so I've switched sound channels. I'm not sure this will fix your issue but I figured it's worth uploading. This build also includes basic 3D support and a bugfix (the dealer would stand too early if you bust one of your hands during a split).

Also, you may have posted it somewhere else, but what firmware/hax/3ds model are you using?

Played this today. Great work! Here's my +1 vote for Yahtze, humbly.

Glad you enjoyed it! I'm leaning towards Yahtzee myself.
 

Attachments

  • blackjack-3ds-0.2.1.zip
    1.7 MB · Views: 205
Last edited by keanutah,

Xenosaiga

Time to switch it up
Member
Joined
Oct 9, 2015
Messages
1,501
Trophies
0
Age
33
Location
The Shadows
XP
1,070
Country
United States
Good call. Damn that's a lot of cash! I don't think I've gotten over $5000 but I also don't really play it as much as I try to break it :)

I've attached a new build, give it a shot. Right now my theory is that the sound channel I was using for the BGM (8 and 9) is somehow treated differently by either the 3ds or libctru, so I've switched sound channels. I'm not sure this will fix your issue but I figured it's worth uploading. This build also includes basic 3D support and a bugfix (the dealer would stand too early if you bust one of your hands during a split).

Also, you may have posted it somewhere else, but what firmware/hax/3ds model are you using?



Glad you enjoyed it! I'm leaning towards Yahtzee myself.
N3DS 10.1.0-27U
Themehax booting into emergency launcher with Mashers Grid Launcher as main.

And also dealer plays an automatic win on 21 before you have a chance to hit or stand. I thought the dealer was supposed to give you a chance to match 21, but I could be wrong.

And as for how much money I have, I told you that it is one of my more played/messed with Homebrew games.
 
  • Like
Reactions: keanutah

keanutah

Well-Known Member
OP
Member
Joined
Sep 18, 2015
Messages
173
Trophies
0
Age
34
XP
192
Country
United States
N3DS 10.1.0-27U
Themehax booting into emergency launcher with Mashers Grid Launcher as main.

And also dealer plays an automatic win on 21 before you have a chance to hit or stand. I thought the dealer was supposed to give you a chance to match 21, but I could be wrong.

And as for how much money I have, I told you that it is one of my more played/messed with Homebrew games.

Okay, that's essentially what I have for a setup too, only I use the default homebrew launcher.

All the rules I have read indicate that dealer blackjack (natural 21 ie 2 cards) is instant-win unless you also have a blackjack. I'm following the rules listed here http://wizardofodds.com/games/blackjack/basics/ Might be different in some casinos.

Also, I'd love some feedback on the 3D in the version I just uploaded. I implemented the simplest version possible, but I have some other ideas for alternatives as well
 
Last edited by keanutah,

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    LeoTCK @ LeoTCK: yes for nearly a month i was officially a wanted fugitive, until yesterday when it ended