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.

DarkBASIC Professional Discussion / New DBFlasher rolling out ...V1.0D go Flash go ...

Author
Message
faizeq
17
Years of Service
User Offline
Joined: 13th Oct 2008
Location: Under the table
Posted: 9th Jan 2010 06:15 Edited at: 9th Jan 2010 09:44
Hi there peeps , been a while since my last updates

Just wanted to share my updated DBFlasher DLL for the community.In case anybody is wondering what it does, you can check my previous post over it. http://forum.thegamecreators.com/?m=forum_view&t=160980&b=1

For this release I've managed to incorporate full support for AS3, full screen support mode and tweaked a lottt on the optimization bits. It should work faster this time.

DOWNLOAD: DBFlasher V1.0D


Now we should be able to do all those snazzy lookin GUI easily
As always if you do see some bugs anywhere feel free to let me know... If its regarding to a missing black text ,consult the manual that I've included with this release

Happy Programming

Life begin where ->BeginScene() end it ends at ->EndScene()..so please Present(NULL, NULL, NULL, NULL);
Booma
17
Years of Service
User Offline
Joined: 29th Mar 2009
Location:
Posted: 9th Jan 2010 11:16
Very interesting work. Fine that a flash picture rendering on sprite. Will try)
faizeq
17
Years of Service
User Offline
Joined: 13th Oct 2008
Location: Under the table
Posted: 17th Jan 2010 10:48
Just a small fix for V1.0D , thanks to Marcus for pointing it out to me. There seems to be some memory leakage on two of DBFlashers function, namely the DBFDestroyall and DBFDestroy ....as to address the issue this fix have been released...

Here is a demo + the dll fix:
Download

Just replace the old dbflasher.dll with the one included.

The demo included shows how you can create intro and menu interactivity for your game as well as the fix that had been
done to the 2 functions...

Have fun

Life begin where ->BeginScene() end it ends at ->EndScene()..so please Present(NULL, NULL, NULL, NULL);
ShaunRW
DBPro Developer
18
Years of Service
User Offline
Joined: 7th Jan 2008
Location: Brisbane, Australia
Posted: 19th Jan 2010 05:01
downloading now, sounds good faizeq.

faizeq
17
Years of Service
User Offline
Joined: 13th Oct 2008
Location: Under the table
Posted: 19th Jan 2010 15:13
Glad to hear that it sounds good there ShaunRW Hope that it would work for you as good as it sounds there

Happy programming

Life begin where ->BeginScene() end it ends at ->EndScene()..so please Present(NULL, NULL, NULL, NULL);
Aubergine
16
Years of Service
User Offline
Joined: 19th Jan 2010
Location:
Posted: 19th Jan 2010 15:29
This is absolutely brilliant.
Actually, the very best thing ever happened to DBPro.

Thank you very much for this.
Red Eye
17
Years of Service
User Offline
Joined: 15th Oct 2008
Location:
Posted: 19th Jan 2010 15:30
I think it is awesome!

Is it interactive, so like if i click start game or quit, can i add actions to that?

Thanks in Forward,

Awesome work again! Definately gonna use this!


thenerd
17
Years of Service
User Offline
Joined: 9th Mar 2009
Location: Boston, USA
Posted: 20th Jan 2010 00:42 Edited at: 20th Jan 2010 00:46
This rules!
one thing though, when I use it in my game, whenever the game exits it says this:

does this have anything to do with a memory leak? because I don't think it's calling the DestroyAll command when it exits.


[edit] actually, even with the destroyall command it exits. also, could you make a command to set the objects to render above normal sprites?

faizeq
17
Years of Service
User Offline
Joined: 13th Oct 2008
Location: Under the table
Posted: 20th Jan 2010 12:34
Aubergine:
You are most welcome mate

RedEye:
Is it interactive, so like if i click start game or quit, can i add actions to that?
Surely you can .. DBFlasher have support for both AS2 and AS3 natively thus you can set any triggers or event to signify any interaction between DBPro and Flash through the functions of DBFlasher.. have a look into the included fla files in the demo as well as the manual included... especially under option.fla to get more details on how easy it is to add actions to dbpro.. Bare in mind that i use AS2 for this demo for simplicity... If you face any difficulty to understand my poor coding let me know... ill try to help you out further ....

TheNerd:
Thanks for reporting that to me... Ill try to swat that bug off on my next release fer sure, as always when i plug one hole..there is one more popping out somewhere As for the command to set the object to render above normal sprite.. i had created one before but it somehow makes the internal dbpro sprite goes haywire ..thus ever since i have been placing the update command for dbflasher rendering after all sprite being rendered as such ....

........
do
sprite 1,0,0,100
sprite 2,0,0,100
sprite 3,0,0,100
sprite 4,0,0,100
DBFScreenUpdate 1,0,400,100
loop

this way we will ensure that it will be the last one to be render , which is the top... But ill try to revive the depth sorting function for my next release

Happy programming

Life begin where ->BeginScene() end it ends at ->EndScene()..so please Present(NULL, NULL, NULL, NULL);
Aubergine
16
Years of Service
User Offline
Joined: 19th Jan 2010
Location:
Posted: 20th Jan 2010 12:55
I am also experiencing same issue with TheNerd but it is random.

Also a request, could you please prepare a keywords file for the plugin? And SAME commands for the AS3 function call backs but that doesnt need a return value?

Thanks in advance.
faizeq
17
Years of Service
User Offline
Joined: 13th Oct 2008
Location: Under the table
Posted: 20th Jan 2010 14:07
No worries there Aubergine , ill queue that request of yours and try to compile a keyword file for it this weekend as well as the as3 callback with no return val... now if only i don't need to go to work hehehe....

Cheers

Life begin where ->BeginScene() end it ends at ->EndScene()..so please Present(NULL, NULL, NULL, NULL);
Aubergine
16
Years of Service
User Offline
Joined: 19th Jan 2010
Location:
Posted: 21st Jan 2010 08:51
I noticed something.

If i use AS3, every function call back hits the frame rate atleast 50%

If i use 3 function calls from the same movie, it works with 450-500fps, if i use only 1 it is 1300fps, if i dont use any function call backs, it is 1800 fps.

Anyways, AS2 works flawless and you can set and get as many variables as you can without and fps drop.
Aubergine
16
Years of Service
User Offline
Joined: 19th Jan 2010
Location:
Posted: 21st Jan 2010 12:20
Also, could you add a few more commands like:
flash exist(flash id)
some movie controls like:
get flash with, height, resize flash width, height...etc.
Aubergine
16
Years of Service
User Offline
Joined: 19th Jan 2010
Location:
Posted: 23rd Jan 2010 12:23
Faizeq, i hope you are still around and working on this thing.
faizeq
17
Years of Service
User Offline
Joined: 13th Oct 2008
Location: Under the table
Posted: 23rd Jan 2010 12:44
As promise there Aubergine here is another revamp for DBFlasher that includes some of the functions that you requested.
The update comes with the keyword file and some added functions to DBFlasher...

Some of the functions are:

Check if Flash exist
-Sort if flash component exist or not
Declaration: DBFFlashExist (flash id) return integer 0=does not exist / 1= exist
(example)
if DBFFlashExist (1) = 1
print "Flash exist"
endif

Get Flash movie width
-get the true flash movie width
Declaration: DBFGetWidth (flash id)
(example) print DBFGetWidth(1)

Get Flash movie height
-get the true flash movie height
Declaration: DBFGetHeight (flash id)
(example) print DBFGetHeight(1)

Get total frame that a movie have
-Get the total frame that a flash movie have
Declaration: DBFGetTotalFrame (flash id) --- return total frame of flash movie
(example) print DBFGetTotalFrame(1)

Get current playing frame
-Get the current timeline frame being played
Declaration: DBFGetCurrentframe (flash id)
(example) print DBFGetCurrentframe (1)

Force frame to jump to desired timeline
-Set frame to desired timeframe
Declaration: DBFSetCurrentframe (flash id , frame number)
(example) DBFSetCurrentframe 1,150

Change Flash movie background to desired color
-Change background to the desired color - only work with non transparent background
Declaration: DBFChangeBGColor (flash id , color eg. #4f5dff - Dark blue)
(example) DBFChangeBGColor 1, "#4f5dff"



And of course the AS3 without return value :

AS3 callback without return value
Declaration DBFCallFunctionVoid (flash id, callback id ,callback name, variable(s))
(example) DBFCallFunctionVoid 1,1,"fps","145,123,202,432"


I'm still trying to eliminate the exit bug and optimizing AS3 so it wont be too taxing to the procs...I'm hopping to get it done with soon ... so stay tune..

Happy Programming

Life begin where ->BeginScene() end it ends at ->EndScene()..so please Present(NULL, NULL, NULL, NULL);
Aubergine
16
Years of Service
User Offline
Joined: 19th Jan 2010
Location:
Posted: 23rd Jan 2010 14:03
Wonderful, thank you very much
Aubergine
16
Years of Service
User Offline
Joined: 19th Jan 2010
Location:
Posted: 23rd Jan 2010 16:11
1 more additional command if possible please.

resize movie id,width,height.
faizeq
17
Years of Service
User Offline
Joined: 13th Oct 2008
Location: Under the table
Posted: 25th Jan 2010 13:57
Hi there Aubergine Sorry that i was away for a while there ..gotta do some work on some sites... I'll try to whip that up soon for ya

Cheers

Life begin where ->BeginScene() end it ends at ->EndScene()..so please Present(NULL, NULL, NULL, NULL);
Aubergine
16
Years of Service
User Offline
Joined: 19th Jan 2010
Location:
Posted: 25th Jan 2010 14:46
Thank you for this fantastic plugin faizeq
faizeq
17
Years of Service
User Offline
Joined: 13th Oct 2008
Location: Under the table
Posted: 26th Jan 2010 07:21
Glad to hear that you liked it Aubergine, as promised here is the resizing function for your usage

Resize screen overlay size
-Resize screen overlay flash to the desired movie size
Declaration: DBFScreenScale (flash id , new flash width size , new flash height size)
(example)
if inkey$()="1"
DBFScreenScale 1,200,800
endif

Reset resized screen overlay
-Reset any resized screen overlay back to its original size
Declaration: DBFResetScale (flash id)
(example) DBFResetScale 1

Just overwrite the old dbflasher.dll over the one that you can find attached and you are all set... I've also updated the keyword to reflect the function addition...

Cheers

Life begin where ->BeginScene() end it ends at ->EndScene()..so please Present(NULL, NULL, NULL, NULL);
Aubergine
16
Years of Service
User Offline
Joined: 19th Jan 2010
Location:
Posted: 31st Jan 2010 16:31
would you share the source code for this plugin? I would like to take a look for learning purposes.
faizeq
17
Years of Service
User Offline
Joined: 13th Oct 2008
Location: Under the table
Posted: 1st Feb 2010 10:58
Hi Aubergine
I'm afraid I cant release any source code just yet...Still need plenty of reworking and cleanup before i can do so .. However if you are interested the best reference to pick up on rendering flash would be through this piece of gem ...
http://www.codeproject.com/KB/COM/flashcontrol.aspx
A good reference to start with Once you get the hang of how it works ...everything should be easy peasy ....

Cheers.....

Life begin where ->BeginScene() end it ends at ->EndScene()..so please Present(NULL, NULL, NULL, NULL);
Aubergine
16
Years of Service
User Offline
Joined: 19th Jan 2010
Location:
Posted: 2nd Feb 2010 11:03
Thank you for the reference to the article, i will read it.

Meanwhile i have couple more questions for you,

DBFXcreate 1,"tv\tv.x", "flash\Splash.swf"
1- how can i know what the dbpro object id for this created mesh is?

DBFCallFunctionVoid Swf(swf2).ID, 1, "addItems", CheckList_String(tc)
2- in the above function, what is the callback id supposed to be good for? I have 10 callbacks in the same layer and the same action script frame and doesnt make any difference whatever number i use for the callback id, can you elaborate please?

DBFScreenCreate 1,"flash\myfps.swf"
3- is there anyway possible to get the dbpro sprite id for the above?

Thanks
faizeq
17
Years of Service
User Offline
Joined: 13th Oct 2008
Location: Under the table
Posted: 4th Feb 2010 11:51
Hi there Aubergine , i can see that you've been busy there

For the question of yours... I'm afraid that you could not identify the mesh and sprite as DBPro objects,I tried it once in the beginning of DBFlasher betas to incorporate it ,however it had caused a lot of headache when it comes to my ray casting routine thus i had to scrape the idea off and start with my own Flexible Vertex Formats and thus the generation of DBFlashers own array.

As for the callback id , Yes you can utilize the same number its just that as a rule of thumb to allocate memory properly. Basically if you would like to avoid any divide by zero error or non reliable data integrity ..you might want to have different memory register and the callback id should provide the solution,
Well the option is there at least


Cheers

Life begin where ->BeginScene() end it ends at ->EndScene()..so please Present(NULL, NULL, NULL, NULL);
Aubergine
16
Years of Service
User Offline
Joined: 19th Jan 2010
Location:
Posted: 4th Feb 2010 12:31
So there is no way to determine both the mesh and the sprite, anyways thats okay but finally it will not at some point give me an error like "mesh or sprite already exists" right?

By the way, 3 or more meshes playing different flash movies has a very huge impact on fps, you might consider adding something that will help to hide and show these meshes depending on distance to camera or something smiliar. (i am trying to make 3d menus for doors and such things like in some games)
faizeq
17
Years of Service
User Offline
Joined: 13th Oct 2008
Location: Under the table
Posted: 4th Feb 2010 13:11 Edited at: 4th Feb 2010 13:12
Yep it would be separate from the DBPro array thus you would never get the error message that it already exist...

As for the Mesh optimization there, as always I'm trying to optimize speed where possible..I'll try to do something on that specific matter for my next release ...Temporarily you can cook up some function that might hide the meshes such as placing a dbpro cube with the same size as the DBFlasher object on the same spot, make it invisible and use some of the numerous Culling function that you can find in the forum to hide or show the cube object, so when the cube is to be render just set the hide dbflasher component to false and vice versa
In short if you can see the cube the mesh should also be rendered well you got the picture

For the best culling for DB have a look at Lost In Thought's Culling system..awesomely fast and reliable .
http://forum.thegamecreators.com/?m=forum_view&t=67369&b=6

Cheers

Life begin where ->BeginScene() end it ends at ->EndScene()..so please Present(NULL, NULL, NULL, NULL);
Aubergine
16
Years of Service
User Offline
Joined: 19th Jan 2010
Location:
Posted: 4th Feb 2010 14:46
Is there any chance that one dbflasher mesh and one dbpro mesh conflict in memory?

What command hides or shows the mesh created by this command DBFXcreate 1,"tv\tv.x", "flash\Splash.swf" ?

DeclarationDBFXupdate(flashid,cullingmode(1=none,2=CW,3= CCW)...., what does the culling mode here do?

Sorry for too many questions, but this plugin is just wonderful and i want to use it to maximum possible for menus, intro scenes, huds..everything which is not 3d..hmm, maybe even some 3d maybe
faizeq
17
Years of Service
User Offline
Joined: 13th Oct 2008
Location: Under the table
Posted: 5th Feb 2010 13:31 Edited at: 5th Feb 2010 13:34
There will not be any possibility for it to be conflicting as DBFlasher uses different array all together so don't worry on that..

As for hiding the mesh you can simply use DBFhide function to hide the mesh, that will hide it from being rendered.... e.g as per example you've given ..
DBFhide 1,0 ( to unhide )
DBFhide 1,1 ( to hide )

And with regards to the culling mode..basically a normal 3D optimization would be considered on 2 main level namely the view culling and backface culling...The previous example that i point out to you from Lost in Thought is what we would call view culling where as any object not in the view or camera would be removed to eliminate unnecessary rendering..however the one i have for DBFlasher at the moment are for the backface culling where as unnecessary face of the mesh would be programatically culled..for example, imagine you want to draw a box, say a cube. Any angle you look at it, you will only see 3 faces at most. When you normally render the cube however, it will draw all of the 6 faces of the cube. So the 3 faces not facing us are in fact a waste of processing effort. Culling option here is a way for DBFlasher to determine which faces are facing us, and which other faces are not facing us, and thus not to draw.
CCW = Counter Clock Wise
CW = Clock Wise
none = No backface culling
Google backface culling up youll get much better explanation comparing to my crappy explanation fer sure

Have Fun

Life begin where ->BeginScene() end it ends at ->EndScene()..so please Present(NULL, NULL, NULL, NULL);
thenerd
17
Years of Service
User Offline
Joined: 9th Mar 2009
Location: Boston, USA
Posted: 10th Feb 2010 18:58
don't want this to disappear...

faizeq
17
Years of Service
User Offline
Joined: 13th Oct 2008
Location: Under the table
Posted: 6th Apr 2010 15:04
Just thought that I might release some updates to DBflasher Been too busy lately and hadn't got much time for programming ..
For this release which goes under DBflasher V1.0G I've been concentrating more on the 3d portion of the proggy and add some extras to fullscreen mode....

Summary of whats new:
-Added frustum culling for mesh objects , automatically culled if not in view
-Added the ability to texture all portion of a mesh separately via new functions
-Converter function for heximal to RGB color value to easily communicate between flash and DBP
-Added ability to set fullscreen as background to 3d models


Download: DBFlasher 1.0G

With this release you should find a demo included with it that would show how some of the new features is used..

Any problem or bug report..feel free to let me know
Cheers

Life begin where ->BeginScene() end it ends at ->EndScene()..so please Present(NULL, NULL, NULL, NULL);

Login to post a reply

Server time is: 2026-07-26 15:31:27
Your offset time is: 2026-07-26 15:31:27