Archived

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

Lifepower

- PowerDraw -

Recommended Posts

Lifepower    136
Greetings It''s usually hard to find time to post on the forums for me, but due to my great concern of the future of PowerDraw, I decided to ask you, People for help with opinions, ideas or anything you think would be helpful. I''m actually disappointed by PowerDraw performance (which also refers a lot to DirectXGraphics). At the moment PowerDraw has excellent effect rendering routines which are flexible and pretty fast. Besides that, PowerDraw has still major disadvantages / drawbacks, which should be solved (and that''s where I need your help): 1) "Normal" rendering is rather slow (at least it''s much faster with DirectDraw), for example if you want to draw a single image on the screen without any effect (for background, menus, etc). This can be tolerated though, since in modern games you''ll more commonly use images with effects (alpha-channels, light effects, etc), besides you have a freedom of defining 4-point coordinates for every image. 2) My biggest complain to DirectXGraphics is that any DXG application FAIL TO START on a machine without 3D accelerator. I''ve seen some machines like P2 333Mhz with Intel video card of 2Mb which supports nice DirectDraw hardware acceleration - some applications could still run on this machine with minimal quality settings, but DXG refuses to start, ''cuz there''s no hardware D3D. This is major drawback I see so far, even after the first one (1). I don''t see any possibility to fix it =( 3) Graphics primitives are VERY SLOW (Line, FrameRect, PutPixel, even QuadPixel), even when they''re done in hardware. I see two solutions - making software routines again, for DXG; or precaching all line / pixel calls into a single call (which will be basically X times faster, where X is the number of calls cached), although this is not flexible method. This drawback doesn''t concern me much, but what do you think is better? 4) I''ve noticed that on different machines the graphics of PowerDraw is different (sometimes different from what''s supposed to be), what''s actually hardware-dependence. And sometimes it cannot be "fixed" (or pre-determined). My question is, what do you suggest, should I go back to DirectDraw (directx 7) and Direct3D7 or should I stay with DirectXGraphics (and then how would I solve the problems listed above)? And finally, what do you think about the library? Is it successful / useless project? I''ve donated this library for public (completely free for any kind of project) so it is your power to choose its destiny With all the respect Lifepower

Share this post


Link to post
Share on other sites
Pexi    122
Well I haven''t used PowerDraw much... Just little tests.
First of all you have done great job of providing cool effects API for community and best of all for free.

On the otherside... Microsoft dropped support for refence driver from the retail DX8. It''s still avaible in the SDK version. Microsoft says that everybody has an 3d card so there is no need for it. Bad move MS.

Here is my thought of where PowerDraw should go from now. You should try to make it as an general helper for D3D8. Add "camera" class, helper class for ID3DX8Effects. Some texture classes(Animated textures would be great).

And for thinking going back to DX7, I would not recomend it. Major part of us delphi game programmer has allready converted or started out project with DX8... so you would loose some users.

Sorry if there is some problems with the text above... It''s so early here... and I''m so sleepy...zzzzzz...zzz.zz..z


Pekka Heikura
pekka@heikura.com
http://bnet.webprovider.com

Share this post


Link to post
Share on other sites
firlefanz    126
HI!

I''m writing a 2D Shoot''em up with DelphiX. I downloaded the first version of Powerdraw to do some 2D image effects and it was great. For me, this is a very useful project!

I am going to test the new powerdraw this weekend and include it in my game, does Powerdraw still work together with DelphiX in fullscreen (800x600x16bit)?

I hope so. Transparent effects are very slow with DelphiX, but pretty fast with Powerdraw.

If the new version is even better than the old one, I''m very glad about it. I don''t think it is a problem that DirectDraw does not work on non 3D Cards, because I think everybody who likes to play games, has already one...

Fine work, please continue!!

Firlefanz )

Share this post


Link to post
Share on other sites
snorga    122
My biggest complain is that you have to use pictures in power of two (32x32 or 32x64). (I found that I can load a 100x50 picture on a 128x64 texture, and just set pattern to 100x50 this work fine, except it uses some extra memory)

#1, I think the drawing is fast enough to except it, when looking at the nice effects :-)

#2, agree with firlefanz, (allmost) every one who want to play game have a 3D card.. (Anyway a requment of a 3D is standard on every game pack)

#3, I have not use this (much) yet, but a way of cacheing may be a good idea, like drawPixels(pixels:array of TPixels).. ?

#4, Some of this seems to come from the _NONE insted of _POINT initialization bug. At least on my test systems (p2@360 & TNT, P3@666 & GF2, P3@1000 (dualsystem), GF3)
When set to xxx_POINT they all beware the same (except on speed , but the set to _NONE the behave a little different..

I thing it is a successful project, special when it is with source code, so that is can be "tweeked"/learned/expand from!!
Nice, easy to use and fast :-)

/Steffen

Share this post


Link to post
Share on other sites
Lifepower    136
Greetz

Thanks for opinions ;-)
2 Pexi: PowerDraw idea was indeed to be a helper of D3D and I do plan on adding cameras stuff. For what it is, PowerDraw provides nice way to "animate" textures - you just have to provide Pattern width & height and then use Pattern value to select which image you want to draw, just as you used in DelphiX.

2 Firlefanz: Newest versions of PowerDraw are standalone versions and run without DelphiX. The latest "plug-in" for DelphiX is 1.4 and it''s a part of PowerTools:
http://turbo.gamedev.net/powertools.zip
It''s out of the development though.

2 Snorga: Texture sizes is a hardware issue. You can economy more memory by putting a lot of these images on big texture (ex. u have 48x48, instead putting it onto 64x64, put many of these images onto a single 256x256 texture). Beware of textures bigger than 256x256, since 3dfx (and some other) video cards have 256x256 texture size limitation. If you need to use large image, divide it in several parts and draw them separately.




- Arcane Lifepower -

"Although the world would call me free
Each day the more her slave am I
For in her very way to be
There''s I don''''t know what, I don''t know why"

Share this post


Link to post
Share on other sites
Pexi    122
Animated textures are there already I just had missed them....

I have a working "camera" class avaible(Based on an old Mr-Gamemaker tutorial). It''s written in Delphi 5 Ent for D3D8. I could send it to you. Contact me by email if you are interested.

Share this post


Link to post
Share on other sites
firlefanz    126
HI A.Lifepower,

yesterday I tried to link DelphiX (form Turbo with UndelphiX) with Powerdraw in fullscreen (800x600x16). But it didn''t work. The Initialize Method of Powerdraw just gave me a blank screen. I have a game that''s already finished and works with Powerdraw 1.4. If I can link Powerdraw 2.1 into it, this would be great. If I can''t, I think I will use Powerdraw for my next game, without using DelphiX, cause Powerdraw is really fast (I tried).

If there is any way to link Powerdraw 2.1 with DelphiX, please tell me how. If not, Powerdraw 1.4 does fine for DelphiX, and I will use Powerdraw standalone in the future, because the effects are great. I only miss a simple Draw-Method to put Sprites on the screen without any effects. I would like to use it to make a 2D game, something from the 80s, maybe Cauldron or wizball or Feud or Last Ninja maybe...

Thanks for support
Firlefanz

Share this post


Link to post
Share on other sites
snorga    122
PowerDraw 2.1 and DelphiX cant be linked.. PowerDraw 2.1 uses DX8, and DelphiX uses DX7..
(The last version of PowerDraw usable with DelphiX is v. 1.4)

Share this post


Link to post
Share on other sites
marco    122
LifePower,

Thanx for a great job about PowerDraw! I really like the effect stuff. Now it''s also easy to use your library, but I would also like to have an easy way to use Sprites and sprite collisions like in DelphiX.

One thing that I know for sure is documentation, but that''s always the hard part to make.

Please stay in DirectX8 becouse it''s the latest one and every one today has a 3d Card. I was very happy when you release your library and it supported the latest DirectX8.1a. and that you have PNG with alpha channel support, thanx!

How about sound support? And Internet Support? Or is your intention to make an game and effects library.

Thanx for makeing a good package!

Share this post


Link to post
Share on other sites
snorga    122
btw: How do I get PNG to work?
It seems like LoadFromFile only takes bmp, or is that just me?

(
Marco, for sound try: fmod (http://www.fmod.org/)
I have not tried it my self, but it is mentioned on
http://turbo.gamedev.net/powerdraw.asp.
)

Share this post


Link to post
Share on other sites
firlefanz    126
I agree with Marco. It would be great if Powerdraw could do some Collisions and Sprite stuff. In that case, Powerdraw would be the best game-programming komponent I can imagine!

Firlefanz

Share this post


Link to post
Share on other sites
Lifepower    136
Greetz!

First of all, I plan on adding PowerInput component which uses DirectInput8 headers. I''ve been thinking about sound support, but packages like FMod or Bass just rule the world, so I''m not in hurry with that. About internet support - I''ll be also adding new standalone UDP component, for multiplayer games. You asked for sprites & collisions - it''s not a problem, since I already got one, just wait for the next release ;-)
Internally PowerDraw does not provide PNG support (even though Michael mentioned that format), though there are some TBitmap replacements and add-ons (take a look on Torry site) that add many different loadable formats.
I''m planning to remake that, but at the moment PowerDraw loads alpha-channels from separate files (although when you save through SaveToFile - alpha-channel is also saved, in addition to RGB components).
Again, thanks a lot for your ideas. I''m planning to keep staying with DXG and make it perfect (or at least something in that direction) for game development.


- Arcane Lifepower -

"Although the world would call me free
Each day the more her slave am I
For in her very way to be
There''s I don''''t know what, I don''t know why"

Share this post


Link to post
Share on other sites
Guest Anonymous Poster   
Guest Anonymous Poster
Well, I haven''t used PowerDraw much, but it seems very cool.

Though I can''t seem to go in to full-screen mode. All examples included with PowerDraw which are in full-screen just instantly reboot my machine. Weird... does it sound any familiar? :\

Well, these are my specs: PIII 600 Mhz, Windows 2000, Voodoo 5 5500 AGP, DX8.1

Doesn''t happen with other DX applications I know of, but I haven''t got a clue what''s causing it. May be my videocard though.

Share this post


Link to post
Share on other sites
Lifepower    136
Greets

2 Anonymous: The problem with full-screen mode is most probably hardware / driver problem. Did you get all updates for W2k (SP2, driver updates, etc)? Maybe you''d check out different 3dfx drivers (there''re a bunch of them on voodoofiles.com) or even try Microsoft ones.

Hope that helps
- Lifepower
"..as the sudden purple sunlight cleaves the thick fog, interrupting my crucifixion. We shalth gather again on this land… once more."

Share this post


Link to post
Share on other sites
marco    122
I have today noticed that you have release v2.2 of PowerDraw with Help included! THANX!!! And even more demos included...

I would also like an nice way to load PNG files with real alpha chanel or other graphics format that includes real alpha chanels. I have tryed to use PNG files with UnDelphiX but then all of the components that I have found and have looked at are convertering the PNG file to TBitmap... I realy like an way to show real PNG files without converting them to BMP at first, that would be much appriciated if included in the lib.

Thx for making our game development life easyer!

Share this post


Link to post
Share on other sites
Lifepower    136
I''ve missed to document some issue in PowerDraw. First of all, most samples are compiled with RefreshRate set to "higher", which would use one of the fastests Refresh Rates your Windows can use. Sometimes it happends that you use Default Monitor drivers and Windows reports all refresh rates your Adapter supports (usually some of them won''t be supported by your monitor). Anyway, people, who have problems running samples - please recompile them, changing RefreshRate option of PowerGraph to "default". I also recommend installing original monitor drivers.
Another fix I made right after releasing PowerDraw - again in Finalization state. If you want to switch video modes and bit-depth "on the fly", before finalizing PowerGraph put the following routine:
PowerGraph.SetTexture(nil, 0);
Otherwise the program will get messy when swithing to windowed mode with different bit-depth.

Cheers
Lifepower

Share this post


Link to post
Share on other sites
marco    122
I can''t run the examples either on Win2000 or Win98se with the latest DirectX 8.X drivers.

When I run the first example(I do compile and set refresh rate set to default as well) i''ve get ''Can''t initialize Direct3D error'' (the res value returns -2)

The old version 2.1 works great with compile and run, so anyone else haveing this problem? Else I look forward to check all new stuff out in v2.2!

I also read that you will include sprite handling, is this fixed now, or is it in the very next update perhaps? Is this also containing sprite animations and sprite collision detection?

I think the library is on the right way!

Share this post


Link to post
Share on other sites
Lifepower    136
I''ve been trying to figure out the problem with the samples, but I''d need some more info to fix it. I''ve been testing everything on 3 computers that are available for me and everything ran fine.
I haven''t included sprite library in this release since right after returning from my vacation they''ve put me to work and I had very few time (maybe someone else would help?).
I was thinking on making another quick release (added TGA format support, besides some modifications and corrections to PowerDraw and its utilities), but I''d like to hold it till I fix the problem with the samples.

Cheers
Lifepower

Share this post


Link to post
Share on other sites
marco    122
Ok, I would like to help out to find the problems why the demos can''t run. I''ll do some testing back home later tonight and then I''ll come back A.S.A.P!

I would be very happy if you include TGA support(with real alpha channel?)

Best Regards,
Marco.

Share this post


Link to post
Share on other sites
GoofProg    127
quote:
Original post by snorga
My biggest complain is that you have to use pictures in power of two (32x32 or 32x64). (I found that I can load a 100x50 picture on a 128x64 texture, and just set pattern to 100x50 this work fine, except it uses some extra memory)



the power of two problem occurs because textures in D3D require it.
It has something to do with texture loading in 3D hardware

Share this post


Link to post
Share on other sites
Lifepower    136
The recent PowerDraw 2.21 supports TGAs with alpha-channels (uncompressed though), same applies to all of its tools. I''d really appreciate if someone would help determining & fixing the problem with the samples - I bet it''s in InitializeEx (first one) method. Myself, I remember having it once when I was updating my project (yes, we''re in a game project which uses PowerDraw! Later on when I changed initialization a bit, it didn''t appear. I''m not sure if this fixed the real problem or not (''cuz theoreticallly I did nothing to real initialization routine).

Share this post


Link to post
Share on other sites
marco    122
I have tested this back home now and as you wrote it''s the function
Result := InitializeEx(FWidth, FHeight, FBitDepth, FScreen, FBBufferCount, FHAL, FRefreshRate);
that returns -2 as
FD3D8 := Direct3DCreate8(D3D_SDK_VERSION);
will return nil.

So what can be done about this?

Cheerz,
Marco.

Share this post


Link to post
Share on other sites
marco    122
hm... the problem is very solved by now, the thing is that I haven''t installed DirectX 8.1 until I read the unit of DirectXGraphics, then I did download the latest version of DirectX 8.1 and re run your examples and it works like a charm... so everyone ho hasen''t got it to work, check your DirectX version first...

So I''m looking forward to see version 2.21... sorry about the mess.

Share this post


Link to post
Share on other sites
marco    122
Great! I have now read your manual...

I''ve got an error while trying to download: "You don''t have permission to access /~al375780/powerdraw221.zip on this server"

But that maybe has to do with a firewall on my localtion or so, I will try another connection later.

Cheerz,
Marco.

Share this post


Link to post
Share on other sites