Post

 Resources 

Console

Home | Profile | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 VBGamer
 VBGamer
 Where to begin....

Note: You must be registered in order to post a reply.

Screensize:
UserName:
Password:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkInsert EmailInsert Image Insert CodeInsert QuoteInsert List Spell Checker
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

   Insert an File
Check here to include your profile signature.
Check here to subscribe to this topic.
    

T O P I C    R E V I E W
ryusten Posted - Jun 13 2005 : 3:43:51 PM
I've been using VB now for about 5 years and have become rather proficient with it. I even took the plunge and learned .NET over the past 3 months. I miss the old IDE but I cant say I dislike the new code. Anyways, on to my question.

I'm trying to mimic the board game Risk as a DirectX9 & VB program. This is simply so I can learn DirectX9 to teach myself something new. So yesterday I played around with drawing sprites/bitmaps using DirectDraw and so far that makes sense. But when it comes to drawing the game map for the board game Risk, I'm stumped. I assume it would involve a polygon & texture for each region on the board. If this is true, could anyone share some links to related resources to make this easier for me? I'm a total graphics n00b so some of the concepts for rendering still escape me.
8   L A T E S T    R E P L I E S    (Newest First)
dxgame Posted - Jun 14 2005 : 1:14:12 PM
Well, there are certainly plenty of different ways to do this. Rectangle checking is the easiest to "grasp" from a programming point of view. But then there's also, poly areas, tile maps, byte arrays corresponding to pixel cordinates, (each byte in the array represents a pixel which represents which region you're on), etc,etc. ;)
ryusten Posted - Jun 14 2005 : 02:37:07 AM
ok, make a clipping rectangle for each area that can be clicked on by the mouse. Wow....um, thats gonna be alot of them. heh, oh well.
ryusten Posted - Jun 13 2005 : 8:51:13 PM
what is Blit and how do I use it? :) *goes searching on google*
dxgame Posted - Jun 13 2005 : 7:20:49 PM
Hello ryusten,

I don't code in Dx9 sorry. ;( If Dx9 follows Direct Draw 7 a bit, then you should be able to set up a texture (surface?) and this is where the power of 2 would come into play. Create your textures in 256x256 or 512x512, etc. And then store multiple sprites inside the texture. Finally you should be able to "blit" from anywhere inside the texture. You would need to keep track of the rect cordinates for each "sprite" section inside the texture. In DirectX8 we draw the sprites using triangles, but with DX7 we used the standard Blt routines. I hope this gives you some ideas. ;)
ryusten Posted - Jun 13 2005 : 4:52:00 PM
I follow ya Dxgame. Just one question then. How do I make sprites in odd dimensions? I thought they all had to be powers of 2 or rectangle/square shaped. How would I do something shaped like a banana then? As far as I know that would involve a polygon (in which case I'd be using Direct3D instead of DirectDraw) and making polygon's flat is an interesting experience (or so I've read).
dxgame Posted - Jun 13 2005 : 4:45:53 PM
Well, one of the most easiest to understand concepts would be to just define each "region" as a sprite inside a texture resource and then draw all of these "regions" on screen like a puzzle piecing them together in their correct location on screen. Then to be able to click on each region you could define simple "box" collision areas inside each region, probably several to a region, or you could do a poly based collision routine but placing several smaller boxes inside each region might be easier to get something up and running quickly.
ryusten Posted - Jun 13 2005 : 4:01:58 PM
I had thought of that Threshold, but being the graphics n00b, how do I do boundary checks for each region on the board? if you can tell me that, I'd be happy to do a a single *large* bitmap rendering.
Threshold Posted - Jun 13 2005 : 3:59:20 PM
Assuming DirectDraw in DX9 is like it was in DX7, rendering a "polygon with texture" is pretty much impossible. However, if you go to hybrid or even completely to Direct3D (DirectXGraphics in DX8), then you can do that pretty easily.

An alternative would be to simply pre-draw your map and just draw it like a plain old bitmap.

VBGamer © Go To Top Of Page
This page was generated in 0.09 seconds. Snitz Forums 2000

Copyright © 2002 - 2004 Eric Coleman, Peter Kuchnio , et. al.