Here's what I'd do (for a 1st draft)
1) Make a window whose size is the size of your backdrop (the
'carpet'), and find out where on the window the clickable elements go.
Import the backdrop into your project so RB knows about it. Now set the
window's background picture to this in the Properties window.
2) Run the project and make sure your backdrop shows up. Quit the
running app.
3) Now modify your backdrop image to have white 'holes' where the
content region of the clickable controls is going to be. Note the
upper-left coordinates of each 'hole', as well as the width and height.
4) Initially, just place PushButtons in the space, then write the main
game code, and tie it to the buttons.
5) For controls that aren't clicked on, but are nonetheless dynamic
(they have animations, or the color changes, or whatever...), consider
placing an array of Canvas controls. You can then create your own
Canvas subclass to perform specific tasks (for example, having a
PokerChip class that draws various denominations of poker chips. You'd
have a 'Denomination' property in this class that could accept values
(1, 5, 10, 25, 100, 500) and would draw itself in its Paint() event.)
6) Tie the remaining game code to these non-clickable controls, and
test the game logic by playing it.
7) You can then go back and implement custom Canvas subclasses to
represent a nice looking 'button' that uses the graphics you mentioned.
On Jun 24, 2005, at 9:19 PM, Joel Reymont wrote:
Folks,
I'm trying to rewrite my OpenPoker client (see http://wagerlabs.com)
and I initially chose Torque 2D. I intend to release the poker client
source code as I make money selling server licenses. Most of the
interface looks like http://wagerlabs.com/openpoker5.png (600k pic).
This interface is layered. I first draw the carpet, a 360k JPEG, then
the chairs, table, chip trays, chips, cards, etc. All images are
either JPEG or BMP with a mask stored in a separate file. The
Fold/Call/Raise as well as Sit Out/Come Back buttons are masked and
have separate images for each state (active, inactive, pushed, etc.).
What is the simplest way to implement this interface with RealBasic?
I'm looking at RB 2005.
I think RB will be easier for my customers to deal with and I like the
convenience of being able to compile binaries for Linux and Windows
being on Mac OSX. SSL is also built into RB 2005 and with Torque I
would need to add SSL and maintain it on the different platforms.
I read up on the SpriteSurface and it appears that it would not be
good choice because the sprites cannot be masked. It does not seem
that I can add button controls to the SS either.
Is the RB3DSpace control the way to go here? Any tips of implementing
sprites with it? When cards are dealt they float across the table and
so do chips.
Will I be able to just drop buttons and other controls onto the
3DSpace surface?
Thanks for any advice, Joel
--
http://wagerlabs.com/tech
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>
William H Squires Jr
wsquires at satx dot rr dot com dot nospam <- remove the .nospam
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>
|