Something I wanted to throw together for some time now,a blackjack game for the CSE in xlibc.
I couldn't get my sprite appvar due to having a mac etc etc. So I did it the long way, I installed parallels, booted a windows 7 ultimate I had lying around, downloaded tokensIDE and boom, had myself a nice appvar.
I threw everything together last night, literally because I was excited. It was pretty fun.
Everything done:
-Spriting; Cards, Suites, Custom font for cards
-Main game loop; Can hit, pass, and quit for now
-AI; play against the computer to hit the jackpot

Need to do:
-betting; won't take long
-menu

Not sure what else to add, what do you all think a blackjack game should contain?

Me messing around with early card generation.. Yes the H has been fixed.

Game play looks like this

I already lost the game Very Happy
Erm just a quick question but how exactly does blackjack work? :-/
Apotato:
It's a card game, each player takes a turn "hitting" drawing a card.
The object of the game is to get as close to 21 points but not going over it. Each round points starts over. Aces are either 11, or 1 point, tens, jacks, queens, and kings are all worth 10 points, and the rest are worth their numerical value.

Update! It's pulling together really nicely.


Wow this looks very professional, this is sure to be a hit! Smile.

Have you thought about creating a screenshot with jsTIfied?

Either way looks great and cant wait to download!
It does indeed look awesome, however, I'd suggest moving that text box over a bit more because 4 digits doesn't seem like enough :p Especially if someone gets really bored.

Also, will you include a feature to save and load from previous? That way incase someone has a good game going and has to interrupt it for whatever reason.
tifreak8x wrote:
I'd suggest moving that text box over a bit more because 4 digits doesn't seem like enough :p

Hmm, could you specify a little bit more, I'm not sure I understand.

And thanks both of you for the kind words.
I am thinking about making a save/load feature.
tifreak is anticipating winning more than $9999 and will require extra digits in his money box Razz.
I'm saying if someone is having some epic gamage, do you expect them to stop at $9999 money? Because that's all it looks like it will hold. I think that text box should be able to hold more. Or you could try making that code adaptive and expand as the value increases?
Oooh. Haha. "Epic Gamage" I like it.
Well as of right now it doesn't stop and anything it will just run over the edges, I think I'll make it adaptive.. Thinking about it, it'll actually save me bytes and will run faster. I don't think it will look as good. But I'll def try it out.

Edit:
Changed it to adaptive. Money still only goes to $9999 because of how xlibc handles text output it won't draw anything greater than 9999, least that is how its working to me.
That kind of sucks :< I haven't messed with xlibc enough yet to know if there is a way around that..
I am sure KermMartian has messed around with xLibc enough to know a way around that. KermMartian, I summon thee!
tifreak8x wrote:
That kind of sucks :< I haven't messed with xlibc enough yet to know if there is a way around that..

APotato wrote:
I am sure KermMartian has messed around with xLibc enough to know a way around that. KermMartian, I summon thee!


Assume that you want to display the value in D at (0,0):

Code:
If D>=|E4
real(6,1,0,0,128,iPart(D|E~4),0
real(6,1,(D>=|E4)(~8int(~log(D+1))-32),0,128,remainder(D,|E4),0
Alright, that does get around the limit, thats pretty cool.
question though.. What is this "|" and "~" in calc tokens?

Edit: This is my 666th cemetech post..
Surprised
zeldaking wrote:
Alright, that does get around the limit, thats pretty cool.
question though.. What is this "|" and "~" in calc tokens?

Edit: This is my 666th cemetech post..
Surprised
|E is the SourceCoder and TokenIDE symbol for the small exponent E (the one that means 10^), and ~ is the negative symbol (as distinct from the subtraction operator)
Alright, I finished this up, uploading to archives as soon as I write up a readme. Woo, I think this is the fastest I've ever finished a project and uploaded it.
Yeah.. One day in between start and finish. I'll call that accomplished.
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement