Advertisement

Direct3D for 2D tile rendering

Started by February 27, 2000 03:25 PM
11 comments, last by Zombie 24 years, 6 months ago
For those who have read the article, are you VB user? Could you translate the code to VB? I''m trying, but as I have very little experience in c++, It won''t work for a while (if it will at all).
I too would love to see this 2D tile rendering with D3D in VB code. I would really appreciate it if someone could either post a link or the code itself. Thanks.
Advertisement
I don''t do VB but I believe the D3DIM documentation in 7.0 is pretty good about showing both C++ and VB. I imagine you could look up the C++ code for the D3D topic in question and the VB example should be right there following it.

Sieggy
I am currently working on porting the code to VB. When Its complete I will message with a link to the VB source.
I don''t have an uptodate VB or I''d gladly port it. I am familiar with VBA, though, so transposing syntax shouldn''t be too hard. If you need me to turn some code into readable pseudocode, let me know what you need help with. I''d love to see someone come out with a generalised easy way to do this in VB - that could make it a lot easier for people to get into this type of programming.
I got it working!!! I have Demo1 in VB! (too many exclamation points. Now some question marks). It works fine with software (RGB), but with hardware (HAL), it gets very messy.

There isn't even any lightning...

Edited by - Zombie on 2/29/00 6:18:31 AM
Advertisement
Zombie, did you have to setup a world matrix or any transforms for that matter ? I have all the objects initialized and coded except that it never actually :

a: renders to the backbuffer
or
b: isnt correctly blitting from backbuffer to primary surface.

Any ideas ?
mmprg-No I didn't set any matrices (don't even know what they are!).

Don't care about that anymore! I got rid of that problem.
Also of ALL others. I think. you can download the VB code (just code, no exe) from - here

Here is the exe. You need to have a bitmap "test.bmp" (64*64) in the C:\ root.
Edited by - Zombie on 2/29/00 3:45:58 PM

Edited by - Zombie on 2/29/00 3:46:53 PM

Edited by - Zombie on 2/29/00 3:51:01 PM

Edited by - Zombie on 2/29/00 3:53:12 PM
Hey every one!
I like the idea of getting d3d to do all the grunt work and leave me to do the more interesting things....
BUT:
as I am writing a 2d RPG, I decided to first check your demo out on software (the target audience don''t all have graphics cards, you know). And I got choppy scrolling.
So I have decided that if the thing can''t get it any faster, I will have to go back to old Direct2d... oh well.
Do you know why it''s so slow in software mode? All I need is some suggestions to boost the frame rate up to a reasonable level.
Unfortunately, the software implementation of Direct3D is not very fast and will probably never be. In earlier version of DirectX it was acceptably fast with the 8bit RAMP mode, but that is no longer supported.

If you must support software only mode you will mostly likely have to settle with DirectDraw or write your own software 3D renderer.

This topic is closed to new replies.

Advertisement