Card Game - Get Around Object Limit

Started by TerranRich, Mon 19/01/2009 00:22:04

Previous topic - Next topic

TerranRich

I'm making an Uno clone to re-acquaint myself with AGS, but I'm having trouble trying to figure out what to do with displaying cards. I wanted four players (the first of whom is the actual human Player), each with their cards spread out in front of them. For the CPU players, I wanted to show their cards, face-down, spread out in front of them (rotated so they're in front of the CPU player, each to a side of the "table").

Thing is, I would quickly go over the 40-object limit if I were to use objects for the cards. What other way can I have cards in front of each CPU player, to show how many cards they each have in front of them? I mean, sure, I can just show one card face-down with a number next to it... but still. I'd like to know if there's an alternative. Thanks!
Status: Trying to come up with some ideas...

Khris

You can draw them; write a function that'll restore the background then draw the CPU players' cards and call it every time they gain or lose a card.

TerranRich

#2
Ah, thanks, I was looking for something like that. I'll look into it.

Just a question: will there be a noticeable "twitch" in the layout of the screen as the BG resets, then re-draws the face-down cards?
Status: Trying to come up with some ideas...

Khris

None at all; to avoid flickering, the engine does all drawing on a second, virtual screen, then exchanges that with the visible one (this is called double buffering).

TerranRich

Ah, so until the DrawingSurface is released, it's done on that secondary virtual screen? That's awesome. Thanks for your help!
Status: Trying to come up with some ideas...

SMF spam blocked by CleanTalk