Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 17:43 28 Nov 2024 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : PicoMiteVGA+: BlackJack - Playing Cards

Author Message
vegipete

Guru

Joined: 29/01/2013
Location: Canada
Posts: 1110
Posted: 06:00pm 07 May 2023
Copy link to clipboard 
Print this post

Greetings,

After recent discussions about displaying playing cards, I thought I would have a try at encoding a set of playing cards as a font. With some overlaying of different 'characters' the result is tolerable. This requires the use of transparent text, which I understand some displays can't do. (Why not, even without MISO?)

I've attached a quickie version of Black Jack to demonstrate how to use the font and card display routine.

Generally, press [SPACE] to hit, [ENTER] to stand, [ESC] to quit.

Enjoy, and maybe others will find this useful.

BlackJack02.zip
Visit Vegipete's *Mite Library for cool programs.
 
Hawk

Senior Member

Joined: 15/07/2021
Location: Australia
Posts: 141
Posted: 01:45am 09 May 2023
Copy link to clipboard 
Print this post

Hey Pete,

Just found time to have a look at your playing card implementation.  It looks really good, and surprisingly simple.

I noticed that the black card's corner symbols are part of the border characters, so I can see why you made them blue.  They would probably look good black if you made the background colour green.

Was it difficult to come up with the series of card layers?

Effectively, you have created a layer per colour on the card.  If you wanted more colours on the card, you would just display another layer.

What is really good, is that the size of the font is very small...~6K.

You've certainly given people a good infrastructure upon which to write card games.

For my game, I am planning to animate the cards, ie, move them across the table as they are dealt or played.  Would this be possible using your font technique?  Is it possible to save and replace the background that a card moves over?

This gives me ideas for the multicolour text characters that I would like to implement.

Cheers,
Hawk
Edited 2023-05-09 11:47 by Hawk
 
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 2140
Posted: 03:55am 09 May 2023
Copy link to clipboard 
Print this post

Perhaps after TEXTing a card character to the screen or frame buffer it's location can be read back as a sprite and animated in the usual way.
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4247
Posted: 07:01am 09 May 2023
Copy link to clipboard 
Print this post

Impressive card game Vegipete.

The code is simple, clear formatted, and very comprehensive.
You made perfect use of the capabilities of transparent colors in fonts.

Hats off !!

Volhout

P.S. did you notice the "7" in the lower side of the card is mirrored ? I guess you where checking if we where paying attention....
Edited 2023-05-09 17:21 by Volhout
PicomiteVGA PETSCII ROBOTS
 
Hawk

Senior Member

Joined: 15/07/2021
Location: Australia
Posts: 141
Posted: 09:04am 09 May 2023
Copy link to clipboard 
Print this post

  phil99 said  Perhaps after TEXTing a card character to the screen or frame buffer it's location can be read back as a sprite and animated in the usual way.


That's a nice solution.  I have been working on the movement of cards on the display.  At the moment I'm having tearing issues.  Not sure whether to solve them using delays in the move routine, or use double buffering.  Double buffering seems like overkill.

I'm working with a new set of card images based on these from Michael B. Myers Jr, which were designed for the Pico8.


(This version has already been colourised to the PicoMiteVGA's palette.)

The non-picture cards would be much easier for you to create.  The picture cards, however, have many more colours.

Hawk
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4247
Posted: 08:38am 24 May 2023
Copy link to clipboard 
Print this post

Vegipete,

This blackjack game works nice. Just fun to play with it..

Volhout
PicomiteVGA PETSCII ROBOTS
 
Print this page


To reply to this topic, you need to log in.

© JAQ Software 2024