Getting Back In To It Card Game Day 2

posted in Gooey's Journal
Published November 14, 2018
Advertisement

So I messed about with my card game again today for a couple of hours. I am happy to say it went well I added two new game modes Addition and Subtraction which took all of about 10 mins. I added some options so you can choose the highest number card(1 - 13) amount of decks(1 - 13) I cheated a bit on the decks as I just used the menu for the highest card number. Adding in subtraction made me realise I needed negative numbers which wasnt a problem till I realised the - wasn't showing up. This caused me a headache for quite the while :(. Finally after an hour of changing fonts and what not making sure it wasn't something stupid I went back to my text rendering code... This is where I found a massive mistake


(bmap.rows - glyph->bitmap_top) / fontSize,

with that line. In my head bmap.rows - glyph->bitmap_top would give me a nice floaty number. Instead it was giving me a vary large unsigned(as that is what bmap.rows and glyph->bitmap_top return. A quick change and bang we were back in business!


((float)bmap.rows - (float)glyph->bitmap_top) / fontSize,

magic! I then decided I had a few spare mins so i put in a win screen that congratulates you if you get 0% or 100% right flashy colours included.

Previous Entry Getting back to it
Next Entry Card Game
1 likes 1 comments

Comments

Rutin

Glad you got through that hurdle. :) 

November 14, 2018 10:55 PM
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Profile
Author
Advertisement
Advertisement