Archived

This topic is now archived and is closed to further replies.

hugin

Normal DirectX in Delphi and more..

Recommended Posts

I assume it is possible to use DirectX in Delphi (without DelphiX)...would that be good or bad? I know I have asked this before, but can you display DIB images using normal VCL (without directX) I have a weird bug in my game. I am animating a fireball (one image, animcount:=4) and my spaceship will only collide with when the fireball is at animation frame 1. Any ideas? Anyone know where to get a simple (as possible) network game with source showing how this works? I have read 27''s article, but it didn''t really show how to connect two computers. Thanks guys....

Share this post


Link to post
Share on other sites
Sure it is possible to use DirectX in Delphi. I wrote my own components that used DirectDraw and DirectInput. DelphiX is built on DirectX in Delphi. It is good if you want lean and mean appliations that go as fast as possible.

Have you tried using a TImage component to display the DIB image?

We would have to see source to have any idea what the bug might be. I''m guessing it would be something with your collision detection.

Making a connection between two computers depends on what network system you are using. If using Winsock, then you have a choice of TCP or UDP. TCP is reliable connection-oriented stream-based protocol whereas UDP is an unreliable connectionless packet-based protocol. In short this means that TCP is slower with more overhead and UDP is faster but less reliable. Most games use UDP because they can handle losing a few packets over a busy network. If you are using DirectPlay, then most of this is hidden from you and you just follow the tutorials in the DXSDK help.

Steve ''Sly'' Williams  Code Monkey  Krome Studios

Share this post


Link to post
Share on other sites
Just to let you know -- there is a bug with DelphiX''s pixel perfect collision detection. I suggest that you write your own collision routines.

As for a networked game goes... I seem to remember someone releasing a source project along those lines... Try looking through some back issues of turbo.



[ Michael Wilson | turbo sys-op | turbo.gamedev.net ]

Share this post


Link to post
Share on other sites
To my knowledge WDirectX is still based on DX7. (?)

I found that DX7 and prior DirectXes were a chore to use, so DelphiX and the like made good senes. But with the release of DX8 (which is a breeze to program for) it makes sense to me to produce your own work with DX8.

Check the Jedi-DelphiGraphics site for good header conversions and loads of good tuts and examples.

A-Lore

Share this post


Link to post
Share on other sites