|
-
Jul 26th, 2002, 06:28 AM
#1
Thread Starter
New Member
DirectX8
Hi!
I'm writing a 2D multiplayer game. It is basically a beat-em-up style game with two characters facing each other.
The ground is two green triangles, with no texture or anything. The characters are also two triangles but this time with texture. when i make the bg colour on the characters transparent, the ground turns black or worse, disappears completely!!
HELP!!!
Has this happened to anyone else? Do you know why this happens.
Please post me the answer!!
James
-
Jul 26th, 2002, 10:37 AM
#2
Good Ol' Platypus
It's always easier with code to look at
All contents of the above post that aren't somebody elses are mine, not the property of some media corporation. 
(Just a heads-up)
-
Jul 26th, 2002, 11:25 AM
#3
Thread Starter
New Member
Here's the module with nearly all the code (all the necessary code anyway): cool:
Notes
TLVERTEX type =
Public Type TLVERTEX
x As Single
y As Single
Z As Single
rhw As Single
Color As Long
specular As Long
tu As Single
tv As Single
End Type
MP3 functions in different module
InitChar function in different module
frmMain controls: tmrItem
THIS CODE DOES NOT HAVE THE TRANSPARENCIES IN!! OR ALL THE FINISHED CODING SUCH AS HEALTH AND SPELLS ETC
Last edited by JBaker; Jul 26th, 2002 at 11:29 AM.
-
Jul 28th, 2002, 01:25 PM
#4
Frenzied Member
You need to turn alpha blending on:
Code:
D3DDevice.SetRenderState(D3DRS_ALPHABLENDENABLE, 1)
For this to work, however, your texture needs to have an alpha channel, or you need to load your texture using the D3DXCreateTextureFromFileEx() function, and specify the color that should be transparent.
Z.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|