[Release] Blackjack 3DS

Discussion in '3DS - Homebrew Development and Emulators' started by keanutah, Oct 3, 2015.

  1. daxtsu

    daxtsu GBAtemp Guru

    Member
    14
    Jun 9, 2007
    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)
    
    [​IMG]
     
    fmkid likes this.
  2. keanutah
    OP

    keanutah GBAtemp Regular

    Member
    2
    Sep 18, 2015
    United States
    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 é.
     
    fmkid likes this.
  3. daxtsu

    daxtsu GBAtemp Guru

    Member
    14
    Jun 9, 2007
    Antarctica
    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..

    [​IMG]
     
    Last edited by daxtsu, Oct 15, 2015
  4. keanutah
    OP

    keanutah GBAtemp Regular

    Member
    2
    Sep 18, 2015
    United States
    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.
     
  5. daxtsu

    daxtsu GBAtemp Guru

    Member
    14
    Jun 9, 2007
    Antarctica
    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.
     
    keanutah and fmkid like this.
  6. keanutah
    OP

    keanutah GBAtemp Regular

    Member
    2
    Sep 18, 2015
    United States
    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!
     
    daxtsu likes this.
  7. keanutah
    OP

    keanutah GBAtemp Regular

    Member
    2
    Sep 18, 2015
    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.
     
    fmkid and daxtsu like this.
  8. Rinnegatamante

    Rinnegatamante GBAtemp Psycho!

    Member
    14
    Nov 24, 2014
    Italy
    Bologna
    You can convert the bitmap font to a truetype ones with a converter (there are many of these tools).
     
  9. keanutah
    OP

    keanutah GBAtemp Regular

    Member
    2
    Sep 18, 2015
    United States
    daxtsu and fmkid like this.
  10. Xenosaiga

    Xenosaiga Time to switch it up

    Member
    7
    Oct 9, 2015
    United States
    The Shadows
    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?
     
  11. keanutah
    OP

    keanutah GBAtemp Regular

    Member
    2
    Sep 18, 2015
    United States
    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, Oct 18, 2015
  12. Xenosaiga

    Xenosaiga Time to switch it up

    Member
    7
    Oct 9, 2015
    United States
    The Shadows
    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.
     
  13. keanutah
    OP

    keanutah GBAtemp Regular

    Member
    2
    Sep 18, 2015
    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.
     
    daxtsu likes this.
  14. Xenosaiga

    Xenosaiga Time to switch it up

    Member
    7
    Oct 9, 2015
    United States
    The Shadows
    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
     
  15. keanutah
    OP

    keanutah GBAtemp Regular

    Member
    2
    Sep 18, 2015
    United States
    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
     
  16. Xenosaiga

    Xenosaiga Time to switch it up

    Member
    7
    Oct 9, 2015
    United States
    The Shadows
    @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.
     
  17. Deletable_Man

    Deletable_Man Old Man

    Member
    3
    Nov 24, 2005
    United States
    Played this today. Great work! Here's my +1 vote for Yahtze, humbly.
     
  18. keanutah
    OP

    keanutah GBAtemp Regular

    Member
    2
    Sep 18, 2015
    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.
     

    Attached Files:

    Last edited by keanutah, Oct 19, 2015
  19. Xenosaiga

    Xenosaiga Time to switch it up

    Member
    7
    Oct 9, 2015
    United States
    The Shadows
    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.
     
    keanutah likes this.
  20. keanutah
    OP

    keanutah GBAtemp Regular

    Member
    2
    Sep 18, 2015
    United States
    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, Oct 19, 2015
Quick Reply
Draft saved Draft deleted
Loading...