Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Program Announcements / AdvancedSPRITES Plugin

Author
Message
Mod
18
Years of Service
User Offline
Joined: 8th Oct 2005
Location: France
Posted: 30th Aug 2007 17:01 Edited at: 7th Jan 2012 12:09


One time is better than never, here is the presentation of one of my projects, complete, and downloadable.

This project, AdvancedSPRITES, is a plugin for Dark Basic Professional that, like its name let's suppose it, allows the user to manage sprites farther than DBPro default sprites. The 88 commands of the plugin give a low-level access to sprites, what allows the user to create a specific code adapted to each program. This will result in most cases in a performances benefit : a program using AdvancedSPRITES sprites is often 3.5 times faster than one using DBPro's. In some cases, a program can have its framerate multiplied by 10.

AdvancedSPRITES contains the following features :
- More "object oriented" management of sprites. Pointers are used instead of index numbers.
- Fast sprite drawing. Fast enough to allow to create any kind of 2D game.
- Rotation, translation, scaling.
- Tilesets management.
- Animated sprites management.
- Pixel-sprite collision, or how to know when a point is above a sprite.
- Texture creation, edition, reading.
- Use of images loaded using Dark Basic Professionnal "Image" commands.
- Image import from BMP, JPG, TGA, PNG, DDS, PPM, DIB, HDR and PFM files.
- Image export to BMP, JPG, PNG, DDS, DIB and PFM files.

I'd like to say some words about the compatibility of 2DPluginKit with AdvancedSPRITES. Freddix has make his product able to use my plugin, with all performances improvements it implys.

AdvancedSPRITES downloadable archive contains :
- The plugin, AdvancedSPRITES.dll
- The english help - As english is not my native language I can't tell if it's understandable, so if you have problems or suggestions to improve it, I'm ready to help/upgrade ^^
- An easy example using tileset, texture writing and rotation.
- A performance comparison program between DBPro default sprites and AdvancedSPRITES.


I don't think that screenshots are useful in this case, so here are some benchmarks results obtained on different computers when launching the comparison program :

Athlon64 3500+, 1 Gb RAM, Radeon X800XT 256Mb

- DBPro Sprites : 58 FPS
- AdvancedSPRITES 1.009 : 550 FPS
- AdvancedSPRITES 1.010 : 690 FPS

Dual Core 1.86 Ghz, 2 Gb RAM, GeForce 7600GT 256Mb
- DBPro Sprites : 60 FPS
- AdvancedSPRITES 1.009 : 359 FPS

Pentium D 2.8 Ghz, 1 Gb RAM, Radeon X600 256Mb
- DBPro Sprites : 64 FPS
- AdvancedSPRITES 1.009 : 350 FPS


Of course, you are free to give any suggestion or comment about the plugin. The command list can be easily extended, and I don't think I have totally explored 2D possibilities yet.

For bugs reports or help, the best way is to send me an email (you can find it inside the help), post in this thread. For french users, you can contact me through GameCorp's forums, too : http://www.game-corp.net/

I have only one request for those who will develop softwares using AdvancedSPRITES, please write the plugin's name, and mine - Dorian Morelle - in your software credits. Adding this will help to make the plugin easier to find.

Eventually, I wish to thanks IanM and ApexNow who helped me few months ago, and, of course, Freddix, for his help and encouragements.


The plugin is available here :

English version

French version

I think that this plugin will make happy all those that, like me, want to develop performant 2D softwares using DBPro.
Happy coding

[Update 07/01/2011] Added new download links.
Freddix
AGK Developer
21
Years of Service
User Offline
Joined: 19th Sep 2002
Location: France
Posted: 30th Aug 2007 17:04 Edited at: 30th Aug 2007 17:06
Hi,

Just a note.
I followed this project from now a long time... and I was impatient that Mod released it to see the impact it will give on 2D game development with DarkBASIC Professional.

I'm happy now that Mod released his wonderful plugin.

With all tests I've done in 2DPluginKIT for AdvancedSPRITES use, I get a really high performance increase
For example, the Shoot'em'up demo jump from 300fps to near to 1300fps with AdvancedSPRITES on my computer.

2DPluginKIT 1.1 with support for AdvancedSPRITES will be soonly released.

Great work MOD

Gandalf said: "All we have to decide is what to do with the time that is given to us"
Odyssey-Creators - X-Quad Editor - 3DMapEditor
Jna99
18
Years of Service
User Offline
Joined: 3rd Nov 2005
Location: Portugal
Posted: 30th Aug 2007 17:47
Mod can you developt to GDK too?

H4ck1d
18
Years of Service
User Offline
Joined: 27th Dec 2005
Location: Yes
Posted: 30th Aug 2007 18:09
Wow! That's a really high performance boost! Thanks so much Mod, this looks great! Downloading now...

Mr Kohlenstoff
17
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Germany
Posted: 30th Aug 2007 18:27
Sounds amazing... I was always happy with sprites because they were in most cases fast enough for my games, but with the plugin the games would probably run fluently on my mobile phone.

Will download and test it now... great that it's free.

Digital Awakening
AGK Developer
21
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Sweden
Posted: 30th Aug 2007 19:11 Edited at: 30th Aug 2007 19:20
Mod:
As I'm working on a 2D game development software (Simple Game Toolkit) I'm very interested in speed boosts in sprite drawing. If a sprite can be drawn at double speed then twice as much can be drawn on screen, simple math.

I'm wondering what your take is on using this plugin for commercial use. Of course I wouldn't mind paying for something that works and is updated whenever problems are found.

Edit:
Had a quick look through your commands and it seems like I wouldn't have much problem switching from my current DBP draw system to one based on this plugin. It's a pretty good timing as I'm about to do some changes to the draw system.

With your pointers I no longer need to bother with keeping track of DBPs image numbers

[center]
CREATE games with ease! NO programming required!
WIP
Mod
18
Years of Service
User Offline
Joined: 8th Oct 2005
Location: France
Posted: 30th Aug 2007 23:04
Nice to see that the plugin can help ^^

@Jna99 : Currently, I don't have GDK and I don't know how it works.
So, I can't develop a GDK version of AdvancedSPRITES...Sorry :/

@Digital Awakening : For commercial use, I request my name and my plugin's one in credits. If a commercial software uses my plugin, I would like to have a free license of it. But that is just a wish, I let the software's author decide if my work merits or not this license.
Freddix
AGK Developer
21
Years of Service
User Offline
Joined: 19th Sep 2002
Location: France
Posted: 30th Aug 2007 23:49
@Mod: Theorically:
1. If you don't use any of the DarkBASIC Professional DLLs from your plugin. It's ok
2. If you can make your plugin become a .LIB I will create the include .h file for you if you need
3. If you have a command to define the display ptr* to tell your plugin on which screen the render must be done, it should be ok.

With these 3 conditions validated. Your plugin can be GDK compatible... It can then also be PureBASIC compatible :p

Gandalf said: "All we have to decide is what to do with the time that is given to us"
Odyssey-Creators - X-Quad Editor - 3DMapEditor
Digital Awakening
AGK Developer
21
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Sweden
Posted: 31st Aug 2007 10:42
Mod:
No problems! Your name, name of your plugin, an URL of your choice will be added to the credits and once the software is released I'll make sure you get a license for free.

BTW, do you know why the Athlon system preforms so much better with your plugin? Do 64 bit make a difference?

[center]
CREATE games with ease! NO programming required!
WIP
Mod
18
Years of Service
User Offline
Joined: 8th Oct 2005
Location: France
Posted: 31st Aug 2007 12:54 Edited at: 31st Aug 2007 12:55
@Freddix : The problem is that I need to get a pointer to the Direct3D Device created by GDK (is it what you call display pointer ?). I don't know how to do that. Of course, I can create a function that allows the user to set the pointer, but in this case I just give the problem to him... There is another problem with images importation. If I want to use GDK images like it's the case with DBPro images, I have to get pointers to these. And I don't know anymore how do to it.

@Digital Awakening : Thanks ^^
About the difference, I think that it comes more from the graphic card than from the processor architecture (the three processors used by test computers are 64 bits). When they're rendered, sprites used mainly the graphic card. The Radeon X800XT is more performant than the two other cards, I guess it is enough to create this *little* difference.
Digital Awakening
AGK Developer
21
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Sweden
Posted: 31st Aug 2007 13:34
Mod:
From your FPS numbers the Athlon system gains about 9.5 times as much improvement while the other two systems are at about 6 times. This is a huge difference. Would this mean that DBPs opperations are more CPU hungry while yours depend solely on the graphics hardware? Or perhaps that your plugin is better at taking advantage of 3D hardware for 2D rendering?

[center]
CREATE games with ease! NO programming required!
WIP
Roxas
18
Years of Service
User Offline
Joined: 11th Nov 2005
Location: http://forum.thegamecreators.com
Posted: 31st Aug 2007 15:25
I think the pointer managing increases lots of speed.. There have been really many posts about many object ids or sprite ids slow hell a lot of game..

And MOD

This is amazing plugin!
Unfrotunally i dont use sprites so much but still amazing !

I hope you can do someday a Advanced3D Plugin

[center]
Duffer
21
Years of Service
User Offline
Joined: 9th Feb 2003
Location: chair
Posted: 31st Aug 2007 15:40
@ Mod,

Am I reading this thread correctly - does this plugin provide pixel-perfect collision for even rotated and/or resized sprites...

also how have you gone about improving on sprite priority?

a long time dabbler with DBC and DBPro with no actual talent but lots of enthusiasm...
Mod
18
Years of Service
User Offline
Joined: 8th Oct 2005
Location: France
Posted: 31st Aug 2007 15:47 Edited at: 31st Aug 2007 16:17
@Digital Awakening : If I'm not wrong, AdvancedSPRITES and DBPro use the same DirectX9 technology for sprite drawing : DirectX9 ID3DXSPRITE interface. Because both have the same "core", I don't think that the plugin uses in a better way the graphic hardware, but that, like you said, DBPro uses more the CPU.
AdvancedSPRITES drawing commands are really low level, near to DirectX ones. When a program using the plugin call a drawing command, there are really few operations that uses the CPU, most of the work is done by the GPU. If I try to imagine which additional work is done by a DBPro sprite function, I often think to the conversion index number -> sprite pointer. This use probably CPU and RAM.

Perhaps can someone lighten us about this ?


@Duffer : Currently, I've not created a function that done sprite to sprite pixel-perfect collision. The pixel collision commands is compatible with non-transformed sprite, but I'm working to make it compatible with transformed sprite .

About sprite priority... I've never used this, so I wasn't knowing that it need improvments ^^"
If it's about speed improvments, the plugin has a similar system but it does not change a lot the framerate, 1 or 2 FPS can be lost, but not really more.
If it's for ease of use, each time you draw a sprite, you can use an additional z parameter for render priority. A sprite with a z of 0 is drawn before a sprite with a z of 1.
Digital Awakening
AGK Developer
21
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Sweden
Posted: 31st Aug 2007 16:04 Edited at: 31st Aug 2007 16:06
As I went out for lunch I happened to think about how your plugin works by "locking the canvas" to draw the sprites while in DBP you can do whatever you want, whenever you want. Could this make DBP even more inefficient and CPU dependent?It's good to know that your plugin takes advantage of the latest in 3D hardware to use in 2D games.

If I can for example multiply my draw operations 5 times then that would have a drastic effect on what my software can do in terms of level detail and graphical effects. My current test level runs at 200 FPS on my laptop, I can easily draw 4 times as much while keeping the game smooth. With your plugin i might be able to draw 20 times as much and that's quite mind boggling.

Your plugin may not do much and it might not be very complicated under the hood but the end result may be like day and night compared to DBP. As soon as I get back to work on SGT I will start by implementing your plugin and see what difference it does.

[center]
CREATE games with ease! NO programming required!
WIP
Chenak
21
Years of Service
User Offline
Joined: 13th Sep 2002
Location: United Kingdom
Posted: 1st Sep 2007 20:05 Edited at: 1st Sep 2007 20:12
A plugin that allows you to create objects that use pointers instead of an index would be fantastic. If the resulted speed boost is the same as the advanced sprites then that would be good!
Gask
16
Years of Service
User Offline
Joined: 1st Sep 2007
Location:
Posted: 1st Sep 2007 21:15
maybe it's a silly question but .. can i use the dbpro sprite command with your plugin ?
for example :

i create the sprite and render with your plugin and i use sprite exist() and set sprite priority () in dpro.

if it is possible , how to translate your pointer to dbpro sprite index ?

if it is not , i think your plugin need more command because even if you don't use set sprite priority , i can say that it is more useful than it can seems.
sprite exist() as many other dbpro command are the same.
Freddix
AGK Developer
21
Years of Service
User Offline
Joined: 19th Sep 2002
Location: France
Posted: 1st Sep 2007 22:56
@Gask: You can't translate the AS sprites pointer to DBPro Indexes. It you try to "mind" 1 second, you'll see that you can easily create the priority yourself by drawing the sprites in the order you want

Gandalf said: "All we have to decide is what to do with the time that is given to us"
Odyssey-Creators - X-Quad Editor - 3DMapEditor
Gask
16
Years of Service
User Offline
Joined: 1st Sep 2007
Location:
Posted: 2nd Sep 2007 04:04
yeah i know that i can paste sprite again and again to make the same result as the priority , but i know too that :

create sprite
play with the priority in the loop

and

paste over and over in the loop with cls at the beginning.

the first is faster than the second.

so i am not sure about the comparison with this plugin and actual dbpro command.

if you paste over and over your sprite in dbpro yes you see a huge loss of fps.
But normally i create my sprite only once and play only with hide and show command and it is really more faster.

so maybe ... ( juste maybe , i don't know exactly ) if this plugin can create a sprite and show/hide/priority without the use of cls and paste , it can gain again some fps.
Aaron Miller
18
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 2nd Sep 2007 04:05
@MOD:
From my understanding of things, DBP uses a structure which contains the ID3DXSprite interface, as well as other data and properties from the sprites... When drawing a sprite, DBP has to go through all the sprites and search their priorities before drawing them. Then they are drawn in order, and in the SYNC command with all of the other commands. It is likely that it searches through a large list of sprites.



Cheers,

-naota

DBP, $80. DBP's plugins, $320. Watching DBP Crash, Priceless.
NG Website Aex.Uni forums
Gask
16
Years of Service
User Offline
Joined: 1st Sep 2007
Location:
Posted: 2nd Sep 2007 04:42
Can't edit my other post because it is not allowed yet eheh.

Ok i have done some testing , i am pretty surprise of how dbpro works with sprite.

The problem with dbpro is not the sprite show to the screen but the number of sprite created.

With 1 to 500 sprites created (hiddend or not on the screen) i am always at 950 fps.

With 800 sprites i am at 250 fps.

1000 : 150 fps

1600 : 60 fps

3200 : 13 Fps , and that is if i only create them. if i show them on the screen i have the same fps.

So ok ,i was wrong sorry , in this case it seems to be smarter to paste over and over the same thing even if the screen don't change at all.
only if i use more than 500 sprites at the same time though
Mod
18
Years of Service
User Offline
Joined: 8th Oct 2005
Location: France
Posted: 2nd Sep 2007 13:07
@Gask : About sprite priority, like I said before, AdvancedSPRITES has a similar system. I've take a look at the DBpro sprite priority command : the final render is exactly the same. You don't have to care to draw sprites in one or other order, but just set the z parameter.

About sprite exist, there's no use of this command. The fact is that AS does not use index numbers. It is impossible that an error like "the sprite ever exist" occurs : memory can't be allocated two times and returns the same pointer.

Then, about hide/show commands, there is other essential difference between AdvancedSPRITES and DBPro : AS sprites are not permanent. You have to draw a sprite if you want it to be shown.

The problem you have noticed exist for each media : objects, images, sprites, etc. I think that DBPro creates a chained list to store pointers. The more there are items in a chained list, the slowest it is to access the latest item. And because DBPro sprites are permanent, in each loop it must be tested if a sprite has to be drawn or not, it implys the program to access the latest item... And highly slows the framerate.


@Aaron Miller : I wonder if DBPro search in a sprite list the priority, it needs to create an ordered list. I have tried to code something like that, and it's really slow. It seems me that DBPro uses too the z parameter, but called "priority".
Digital Awakening
AGK Developer
21
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Sweden
Posted: 18th Sep 2007 16:56 Edited at: 18th Sep 2007 17:02
Mod:
I'm working on integrating the plugin into my software now, I'll let you know the result when I'm done.

I have a question for you though: Do the plugin automatically delete all sprites when the program closes or do I have to delete them all manually?

If that's not the case then a "delete all sprites" command would be nice.

[center]
CREATE games with ease! NO programming required!
WIP
Digital Awakening
AGK Developer
21
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Sweden
Posted: 18th Sep 2007 17:42
First compile with AS and my .exe doesn't even start, I get an error instantly. I tried compiling an older version of my program with nothing but DXS INITIALIZE in it and I get the same error. Apparently your plugin doesn't agree with my laptop or something.

Here's my system configuration:
CPU: Intel Centrino
GPU: ATI Mobility Radeon 9700

[center]
CREATE games with ease! NO programming required!
WIP
Agent Dink
19
Years of Service
User Offline
Joined: 30th Mar 2004
Location:
Posted: 18th Sep 2007 19:35
Hey, can you by any chance add an additive blending feature? Similar to "Ghost Object On" with 3d models? That would enhance sprite based games so much.

Mod
18
Years of Service
User Offline
Joined: 8th Oct 2005
Location: France
Posted: 18th Sep 2007 20:00 Edited at: 18th Sep 2007 20:16
I've met earlier a problem with a laptop including a Mobility Radeon X700... I'm currently trying to fix it. I guess that your problem will disappear if it's the case on this laptop.

About your first question, sprites are not deleted automatically by the plugin when a program terminate. But the OS disallocate the memory used, so there's no need to do it.

@Agent Dink : Currently, I don't know how to do it. The functions from Direct3D9 the plugin uses to create sprites don't allow to do something like this. However, I'll see what I can try to do.
wildbill
17
Years of Service
User Offline
Joined: 14th Apr 2006
Location:
Posted: 18th Sep 2007 23:22
Downloaded. I set up several sprites to scale for a GUI program and it worked very smooth.

Thanks
Mod
18
Years of Service
User Offline
Joined: 8th Oct 2005
Location: France
Posted: 28th Sep 2007 17:40 Edited at: 14th Sep 2008 21:24
New release : AdvancedSPRITES 1.010

The bug that was able to cause a crash when AdvancedSPRITES was executed on some computers is now fixed, thanks to Digital Awakening who helped me to test it

This new version improves by 120~130% the speed of the 1.009 version.

On my computer, the framerate is now 58 for DBPro and 690 for AdvancedSPRITES when executing the versus example... Near from 12 times more!

Download pages :

English version

French version
Digital Awakening
AGK Developer
21
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Sweden
Posted: 28th Sep 2007 19:16
This plugin is amazing. The versus example makes my crappy laptop go from 57 FPS to about 445 FPS (3072 sprites), that's almost 8 times faster.

If I have time next week I will be converting version P.3 of Simple Game Toolkit and see what a difference AS makes on a "real" software (my test map runs at 180-200 FPS).

I've said it before but the amount of graphical effects you can add with a plugin like this is quite mind blowing.

[center]
CREATE games with ease! NO programming required!
WIP
aluseus GOD
17
Years of Service
User Offline
Joined: 19th Mar 2007
Location: I\'m here. Now I\'m there. I keep moving
Posted: 29th Sep 2007 01:29
duz rotation work with ppcolision?

Your signature has been deleted by a moderator because this joke is getting old.
tiresius
21
Years of Service
User Offline
Joined: 13th Nov 2002
Location: MA USA
Posted: 29th Sep 2007 03:10
Is there something similar to PASTE SPRITE in this dll? Does DXS DRAW SPRITE do that? Thanks!

I'm not a real programmer but I play one with DBPro!
aluseus GOD
17
Years of Service
User Offline
Joined: 19th Mar 2007
Location: I\'m here. Now I\'m there. I keep moving
Posted: 29th Sep 2007 07:42
Failed to write EXEorDebug

Your signature has been deleted by a moderator because this joke is getting old.
Mod
18
Years of Service
User Offline
Joined: 8th Oct 2005
Location: France
Posted: 29th Sep 2007 11:59
@ aluseus GOD : I'm still working on pixel perfect collision with rotation.
About the error you got, can you try to execute the compiled versus example ? And which version of DBPro are you using ?

@ tiresius : There's nothing similar to DBPro's SPRITE command, all the DXS DRAW SPRITE commands are like PASTE SPRITE.
Mr Kohlenstoff
17
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Germany
Posted: 29th Sep 2007 16:11
If you just can use paste sprite, how does the collision work then? E.g. if you paste one sprite to 20 positions (For instance a platform in a platformer ) and want to check collision, how do you do that?
Would be cool if you wrote a small example, at least I would be finally convinced to use it then.

Mod
18
Years of Service
User Offline
Joined: 8th Oct 2005
Location: France
Posted: 29th Sep 2007 16:54
Currently, AS do what I call "pixel detection", for example, the command DXS IS ON SPRITE check if the point at coordinates x,y (sprite relative) is on the sprite or not.

Like I said before I'm working on pixel perfect collision. In this case, what I project is to create a command with the following parameters : sprite 1 x, sprite 1 y, sprite 2 x, sprite 2 y.

These commands are independant from the render, you can perform the check even if a sprite is not displayed.
Mr Kohlenstoff
17
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Germany
Posted: 29th Sep 2007 17:18
Quote: "you can perform the check even if a sprite is not displayed."


OK, that's probably the best way to do it. So is there also something like bounding-box-collision, which calculates the edge-coordinates and checks if a point is inside these corners? Because it would probably be much faster and in some cases has more or less the same "quality".

Mod
18
Years of Service
User Offline
Joined: 8th Oct 2005
Location: France
Posted: 29th Sep 2007 18:14
There's nothing like that in the plugin... I can add a command to do this, but it's easy to do with DBPro :

Sprite relative :


Screen relative :
Mr Kohlenstoff
17
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Germany
Posted: 29th Sep 2007 19:15
That would be a simple box-collision, but Bounding Box-Collision is (as far as I know..) different, because it also handels rotated boxes. The functions you posted above ignore the sprite rotation. A bounding box always represents the rotated sprite-shape, and a command, which checks if a point is in this rotated box, would be very cool. I tried to do that with own functions, and it worked more or less but is always a bit buggy and could probably be faster..

aluseus GOD
17
Years of Service
User Offline
Joined: 19th Mar 2007
Location: I\'m here. Now I\'m there. I keep moving
Posted: 29th Sep 2007 22:42
Can you give me a list of commands advance sprites is supposed to have? I think mine might be missing some.

Your signature has been deleted by a moderator because this joke is getting old.
Mod
18
Years of Service
User Offline
Joined: 8th Oct 2005
Location: France
Posted: 30th Sep 2007 11:17
@ Mr Kohlenstoff : Ah, sure that if you want rotation, it can be a little faster to code functions in the plugin itself. Ok, I will work on this and add commands in a future upgrade

@ aluseus GOD : All the commands are described in the plugin help, you can find it in the plugin archive or in your DBPro installation folder , example : C:\Program Files\Dark Basic Software\Dark Basic Professional\Help\AdvancedSPRITES.html
aluseus GOD
17
Years of Service
User Offline
Joined: 19th Mar 2007
Location: I\'m here. Now I\'m there. I keep moving
Posted: 1st Oct 2007 04:18
Failed to write EXEorDebug
I still have this. Why?

Your signature has been deleted by a moderator because this joke is getting old.
Mod
18
Years of Service
User Offline
Joined: 8th Oct 2005
Location: France
Posted: 1st Oct 2007 12:54 Edited at: 1st Oct 2007 12:55
Quote: "About the error you got, can you try to execute the compiled versus example ? And which version of DBPro are you using ?"


Mr Kohlenstoff
17
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Germany
Posted: 1st Oct 2007 13:20
Quote: "Ah, sure that if you want rotation, it can be a little faster to code functions in the plugin itself. Ok, I will work on this and add commands in a future upgrade "


That would be really awesome.

aluseus GOD
17
Years of Service
User Offline
Joined: 19th Mar 2007
Location: I\'m here. Now I\'m there. I keep moving
Posted: 2nd Oct 2007 01:27
Quote: "Quote: "About the error you got, can you try to execute the compiled versus example ? And which version of DBPro are you using ?""


Uh. Yeah. I did.

Your signature has been deleted by a moderator because this joke is getting old.
Mod
18
Years of Service
User Offline
Joined: 8th Oct 2005
Location: France
Posted: 2nd Oct 2007 10:22
And what happened ?
Is the example working ? Or is it when you execute it that you got the error ?
aluseus GOD
17
Years of Service
User Offline
Joined: 19th Mar 2007
Location: I\'m here. Now I\'m there. I keep moving
Posted: 3rd Oct 2007 03:17
When I execute the program I get the program error 'Failed to right EXEOrDebug'

Now, just because Im getting tired of all these questions(no offense, I just am) I will tell you that the problem has nothing to do with the image getting loaded, the compiler still works normally, if I use anyother commands it still doesn't work, I tried it with and without using DXS Initialize, the parameters are correct, the command has been done properly, I haven't been infected by a virus, Im not hallucinating, and I EAT FOOD!

Your signature has been deleted by a moderator because this joke is getting old.
Digital Awakening
AGK Developer
21
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Sweden
Posted: 3rd Oct 2007 11:17
Aluseus:
You can't just say you get an error and expect Mod to know exactly what is wrong. He needs to know the circumstances, like when you get the error. Nothing to get upset by.

[center]
CREATE games with ease! NO programming required!
WIP
Mod
18
Years of Service
User Offline
Joined: 8th Oct 2005
Location: France
Posted: 3rd Oct 2007 12:24
Sorry, I wasn't understanding that you where ever answering to my first question.


The problem is that I've never seen this error. AdvancedSPRITES does not display messages like this, it must come from DBPro. And the fact that the versus example I ask you to run has been compiled on my computer with my own DBPro version (1.066) implys that this error doesn't come from yours.

This looks me like a compilation error, I can't guess why it appears when running a program that has nothing to write.

I don't think the problem comes from DirectX, but if you have not upgraded yet to DirectX 9.0c August 2007, you can try this, it wouldn't be lost in anyway.
I still have two questions :
Which Operating system are you using ? Maybe are you running under Windows 98 or Me. I hope it's not the case, I can't debug the plugin with these OS.
And which hardware are you using ?
Digital Awakening
AGK Developer
21
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Sweden
Posted: 3rd Oct 2007 14:05
Mod:
I have a problem with the draw order. Your plugin creates a draw order based on the order DXS END SPRITE RENDER is called, if I'm to use begin and end render commands for every draw (which is required for my software) then instead of a speed increase I get a huge drop in speed. Because my software fakes a 3D environment using 2D everything can be drawn above and below everything else.

[center]
CREATE games with ease! NO programming required!
WIP
Mod
18
Years of Service
User Offline
Joined: 8th Oct 2005
Location: France
Posted: 3rd Oct 2007 16:38
The draw order is based on two commands : DXS DRAW SPRITE and DXS SET SPRITE DEPTH SCALE, not on DXS END SPRITE RENDER.
The more you call DXS BEGIN/END SPRITE RENDER, the slowest your program will be. It's not the number of tile or sprite which slows a program, but the number of DXS BEGIN/END SPRITE RENDER commands.

If you want the highest framerate possible when using a drawing order, you'll need to proceed like this :
Define first a depth value, float or integer. By default it is set to 1. Call DXS SET SPRITE DEPTH SCALE and set the depth for each sprite you want to draw. Doing this will allow you to use the optionnal Z parameter from the DXS DRAW SPRITE commands in a [0,3] range, floats included. A sprite drawed with a Z parameter of 0 will be drawn before a sprite with a Z of 1, 0.5, or 0.35214569.
Then, try to group all the sprite drawing.

For example, instead of that :



You can do this, what will increase a lot the framerate :



I don't know how you manage the plugin commands in your software, if this doesn't help you, don't hesitate to send me some code. There is always a way to give a 2D program a speed increase when using AdvancedSPRITES ^^.

Login to post a reply

Server time is: 2024-03-28 22:39:48
Your offset time is: 2024-03-28 22:39:48