Four Color Deck of Cards Sprite

Game development with Board Game Arena Studio
User avatar
Xom
Posts: 28
Joined: 30 September 2014, 19:21

Re: Four Color Deck of Cards Sprite

Post by Xom »

I changed to a lighter blue to be more distinct from the black spades.
cards.png
cards.png (107.75 KiB) Viewed 927 times
User avatar
Xom
Posts: 28
Joined: 30 September 2014, 19:21

Re: Four Color Deck of Cards Sprite

Post by Xom »

Dev question:

I want to allow 4-color or 2-color deck as a preference, but only if it's possible without making all players load all images. Is it?

(Does BGA pre-load the sprite PNGs, or does it wait for them to be referenced by the CSS?)
User avatar
MikeIsHere
Posts: 137
Joined: 30 April 2020, 22:52

Re: Four Color Deck of Cards Sprite

Post by MikeIsHere »

Would this help solve your problem

http://en.doc.boardgamearena.com/Game_i ... ge_loading
dontPreloadImage( image_file_name )

Using dontPreloadImage, you tell the interface to not preload a specific image in your img directory.

Example of use:

this.dontPreloadImage( 'cards.png' );
This is particularly useful if for example you have 2 different themes for a game. To accelerate the loading of the game, you can specify to not preload images corresponding to the other theme.

Another example of use: in "Gosu" game with Kamakor extension, you play with 5 sets of cards among 10 available. Cards images are organized by sets, and we only preload the images corresponding to the 5 current sets with ensureSpecificGameImageLoading( image_file_names_array ).
Post Reply

Return to “Developers”