Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: TerranRich on Mon 19/01/2009 00:22:04

Title: Card Game - Get Around Object Limit
Post by: TerranRich on Mon 19/01/2009 00:22:04
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!
Title: Re: Card Game - Get Around Object Limit
Post by: Khris on Mon 19/01/2009 00:41:45
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.
Title: Re: Card Game - Get Around Object Limit
Post by: TerranRich on Mon 19/01/2009 01:09:32
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?
Title: Re: Card Game - Get Around Object Limit
Post by: Khris on Mon 19/01/2009 02:20:25
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).
Title: Re: Card Game - Get Around Object Limit
Post by: TerranRich on Mon 19/01/2009 03:09:41
Ah, so until the DrawingSurface is released, it's done on that secondary virtual screen? That's awesome. Thanks for your help!