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 / DBFlasher V2.0 - Flash go native DB texture :)

Author
Message
faizeq
17
Years of Service
User Offline
Joined: 13th Oct 2008
Location: Under the table
Posted: 19th Aug 2012 02:58 Edited at: 25th Aug 2012 23:48
Hello mateys

Been working on a little bit with the ol DBFlasher.
This time I'm adding up some native DB texture support in rendering the flash contents.Pretty much this enable the ability to use the flashed texture on any native DB component that uses texture image pointers.You should be able paste flash content as decals , paste flash content on limbs ,making object based gui and so on.
As always I've included the demo and resources files in one zip file.Pretty much everything is self explanatory in the demo source remarks.Feel free to report in on any problem and bugs that you may came across.


*Update 25/08/2012
-Fixed up Matrix utility error. You can just download the DLL file from this link:
http://www.mediafire.com/?2fa41fu2es1q0p2
*replace the old ones and you should be all set.
-Reupload main demo and dll files with updated fix.


Happy coding

Life begin where ->BeginScene() and it ends at ->EndScene()..so please Present(NULL, NULL, NULL, NULL);
MrValentine
AGK Backer
15
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 19th Aug 2012 03:08 Edited at: 19th Aug 2012 03:12
Very interesting indeed!

Thanks for sharing!

But how did you import the flash? STYX?

EDIT

Ignore the underlined question... had a closer look at the download files...

EDIT

If I make a repository of Forum Files, do you mind if I include this?

Humanoid
22
Years of Service
User Offline
Joined: 20th Sep 2003
Location: Finland
Posted: 19th Aug 2012 08:36
Crashing. Does not work. Crash immediately. tried XP

MrValentine
AGK Backer
15
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 19th Aug 2012 08:54
What crashed? The demo or the code?

Humanoid
22
Years of Service
User Offline
Joined: 20th Sep 2003
Location: Finland
Posted: 19th Aug 2012 09:11 Edited at: 19th Aug 2012 09:21
both.

I found the problem already.

load dll "user32.dll", 1
Sw = call dll (1, "GetSystemMetrics", 0)
Sh = call dll (1, "GetSystemMetrics", 1)
delete dll 1
set display mode Sw, Sh, 32.1

if you remove the set display mode, then goes to work, but does not appear as one object. As soon as more display set, then stops working.

MrValentine
AGK Backer
15
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 19th Aug 2012 09:19 Edited at: 4th Oct 2012 17:57
Not looked that close at the code but haha.i cannot see why getscreenwidth and getscreenheight could not suffice hehe

Good find...

But the demo worked fine for me and I love the hide show objects trick...

I am good at creating flash animations

But I do not understand the constructs of interacting with one... So this method is very nifty for me to create a flash menu with glow and other effects while keeping functionality ... Awesome!

faizeq
17
Years of Service
User Offline
Joined: 13th Oct 2008
Location: Under the table
Posted: 19th Aug 2012 12:34
@MrValantine : By all means go ahead More than happy to share around with the community if it works.

@Humanoid: Woah, I've never managed to test it with an XP machine or even any other machine aside from the one I have at the moment in fact. Thanks for the feedback . I'll try to run it on XP machine and test this out... It looks kinda odd as well that the set display mode would be of issue. When you remove the "set display mode" function you did mention the object does not appear to be as one object, any chance you can show the screenshot of it to me? Thanks mate.

Life begin where ->BeginScene() and it ends at ->EndScene()..so please Present(NULL, NULL, NULL, NULL);
MrValentine
AGK Backer
15
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 19th Aug 2012 14:01
faizeq... Thank you for the permission ive already bagged and tagged it with this thread link

Humanoid
22
Years of Service
User Offline
Joined: 20th Sep 2003
Location: Finland
Posted: 20th Aug 2012 09:01 Edited at: 20th Aug 2012 09:03
@ faizeq: screenshot

removed set display mode and set window mode and 1024,768 resolution for IDE settings to exe file.



only one object. Whose texture is moving in a circle.

TheComet
18
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 20th Aug 2012 11:06


Try that.

TheComet

"if you don't understand recursion than you probably don't understand recursion." ~Jerico2day
Humanoid
22
Years of Service
User Offline
Joined: 20th Sep 2003
Location: Finland
Posted: 20th Aug 2012 14:11
@ TheComet: But when the problem is just the "set display mode" command. The program crashes as soon as you start the program. Has anyone got it to work correctly XP operating system?

TheComet
18
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 20th Aug 2012 15:24 Edited at: 20th Aug 2012 15:27
In your first post you said that the program crashed because of this line (I copied it from your post btw):

set display mode Sw, Sh, 32.1

Don't you think it's it bit odd to set the bit depth to 32.1? That's probably why it crashed... So that's why I "corrected" you with this:



TheComet

"if you don't understand recursion than you probably don't understand recursion." ~Jerico2day
MrValentine
AGK Backer
15
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 20th Aug 2012 15:38
good spot theComet, I was too tired to notice a . from a , lol and it is likely I was on my phone at the time... hehe, clearly you had too much and I need more... off to make some tea right now...

Humanoid
22
Years of Service
User Offline
Joined: 20th Sep 2003
Location: Finland
Posted: 20th Aug 2012 15:47
@TheComet: become apparently a typo. Supposed to be a comma, not dot. my mistake

Stab in the Dark software
Valued Member
23
Years of Service
User Offline
Joined: 12th Dec 2002
Playing: Badges, I don't need no stinkin badges
Posted: 20th Aug 2012 17:19 Edited at: 20th Aug 2012 18:04
When I run your demo exe it works fine. When I compile your DBpro project
it builds the exe and then runs but then crashes whenever I mouse over the gui.
I then get a message box which looks like it is triggered by your dll. I have Matrix1's dlls
Installed. Is your dll dependent on Matrix1's dlls? Your Demo project does not call any
Matrix1's commands.



EDIT: I have solved the problem by creating a dummy function which calls a command from the
"Matrix1's dlls" that your dll is dependent on.
Calling the commands forces the DBpro compiler to include the dlls in the exe.



[img][/img]


WindowsXP SP3,Vista,Windows 7 SP1, DBpro v7.7RC7
Stab In The Dark Editor
The coffee is lovely dark and deep,and I have code to write before I sleep.
faizeq
17
Years of Service
User Offline
Joined: 13th Oct 2008
Location: Under the table
Posted: 21st Aug 2012 00:45
@Stab in the Dark software :That's a nifty way to do it There is kinda instability with the IanM matrix dependencies library. I"m not sure why this happens...by right I've included the dependencies in the build...hmm maybe I'll just scrap off the matrix dependencies if it gets too unstable .
Another more crude way is just placing the matrix dll file in the main application folder like the zlib1.dll file.
Someone emailed me with similar issue but they mention that if the computer is low on memory the matrix error starts popping out. When they had cleared up 50% or so of their memory it just runs without any crash...weird..
Well I'll remedy this up this coming weekend fer sure When my coke level is more optimal....

Life begin where ->BeginScene() and it ends at ->EndScene()..so please Present(NULL, NULL, NULL, NULL);
Stab in the Dark software
Valued Member
23
Years of Service
User Offline
Joined: 12th Dec 2002
Playing: Badges, I don't need no stinkin badges
Posted: 21st Aug 2012 19:02
It seems in your demo that if the mouse is not moving the frame rate is very low.
If the mouse is kept moving or you repeatedly click with the mouse the frame rate
improves drastically. I think you mouse detection code is slowing it down. Would it be possible
to improve its performance?
In you demo you make camera 1 , is this necessary for your dll to display flash in DBpro?
Is calling "Reload Display Pointer" necessary for flash to work in DBPro?
If a flash animation has sound could your dll have it work in DBpro?
I have some experience making dlls for DBpro. I offer my assistance if you need it.


[img][/img]


WindowsXP SP3,Vista,Windows 7 SP1, DBpro v7.7RC7
Stab In The Dark Editor
The coffee is lovely dark and deep,and I have code to write before I sleep.
faizeq
17
Years of Service
User Offline
Joined: 13th Oct 2008
Location: Under the table
Posted: 22nd Aug 2012 01:55
@Stab in the Dark Software -
Hey there thanks for the feedback.
Hmm as for the moving the mouse it's kinda weird that it would make it much faster as normally it work the opposite for me.. the more i move on the flashed surface the more processing power it needs. The way I programmed it is by creating a hook to the windows message pump for input ..basically a raycast is used constantly and mind you the raycasting is just the internal DB engine ones . And how it set the logic is if raycast is hitting the object the input hook will be activated. Once activated the hook will pump in the input feed. In short if you are not hovering your mouse on any flashed texture the dbflasher wont be active. The best way I could think is to rewrite my own raycasting and optimize the hook with some newer method instead of going the crude message procs... It's a pity that DB is single core.. Maybe DB elite would open this possibility soon.

As for the extra camera you can just scrap it off. that is just a relic from my shader that I had once on the code.Not needed.

Reload display pointer is not necessary at all it was just used for again the shader that I used once on the code.Not needed either

As for the sound part Its a big yes. Actually thats one of the sole reason I created the DBFlasher plugin long time ago... as I found out that Flash is awesome in the sound department when it comes to organizing and sync. Hell you can even just run a flash file without any graphic to control the music and sounds of your applications based on triggers.

Thanks for the offer I'll definitely bear that in mind.. I'll try to polish this up to V2.1 this weekend. Hopefully those pesky bugs are a goner...

Life begin where ->BeginScene() and it ends at ->EndScene()..so please Present(NULL, NULL, NULL, NULL);
faizeq
17
Years of Service
User Offline
Joined: 13th Oct 2008
Location: Under the table
Posted: 25th Aug 2012 23:52
Updated DLL with minor fix on Matrix utility.
Downloads and link updated on main post.



Life begin where ->BeginScene() and it ends at ->EndScene()..so please Present(NULL, NULL, NULL, NULL);
Stab in the Dark software
Valued Member
23
Years of Service
User Offline
Joined: 12th Dec 2002
Playing: Badges, I don't need no stinkin badges
Posted: 4th Oct 2012 17:52
Just wondering how your progress is going.

[img][/img]


WindowsXP SP3,Vista,Windows 7 SP1, DBpro v7.7RC7
Stab In The Dark Editor
The coffee is lovely dark and deep,and I have code to write before I sleep.
janbo
17
Years of Service
User Offline
Joined: 10th Nov 2008
Location: Germany
Posted: 30th Oct 2012 21:09
Hey faizeq

First i want to say that your "plugin" is great and thank you for sharing it.

I tried the demo last week or so and it works fine, but after reinstalling win 7 x64 on my first partition it wont work anymore.
I installed nearly all adobe programs, because i thought my system is missing a dll, but i had no success.

I tried with the help of "wait key" to find the issue.
It crashes at the command "DBFTexture 1,get dir$()+"/flash/gui.swf",255" i think

Thanks in advance
and sorry for my Google-translator-English
faizeq
17
Years of Service
User Offline
Joined: 13th Oct 2008
Location: Under the table
Posted: 31st Oct 2012 01:06
@Stab in the dark- Man I've been surge nowadays with works and projects. Kinda very slow nowadays on the hobby side.


@Janbo - Hi Janbo, glad to hear that. Not to worry on missing dll from adobe side though, as I had include the adobe core files into the dbflasher dll itself. The core in case anyone is wondering on this release would be Flash11.ocx.

Hmm. you did mentioned using x64. Were you using x86 version of win7 previously?
It is odd as well that the program crashed on that line. Try hard coding the path. For example:
DBFTexture 1,"C:/flash/gui.swf",255
*make sure that the folder and file exist on that hard coded path of course

Life begin where ->BeginScene() and it ends at ->EndScene()..so please Present(NULL, NULL, NULL, NULL);
janbo
17
Years of Service
User Offline
Joined: 10th Nov 2008
Location: Germany
Posted: 31st Oct 2012 01:36
Previously i had x64 too.

I tested it with the hard coded path and it is existing there.
I even tried the administrator-mode the compatibility of win 7 and re-downloaded the demo a few times.

And because you added all adobe files into the dll i have no clue what i can do.

best regards janbo
faizeq
17
Years of Service
User Offline
Joined: 13th Oct 2008
Location: Under the table
Posted: 31st Oct 2012 23:28
Have you tried re-downloading the original demo and tried to run it once more on your new setup?

Life begin where ->BeginScene() and it ends at ->EndScene()..so please Present(NULL, NULL, NULL, NULL);
janbo
17
Years of Service
User Offline
Joined: 10th Nov 2008
Location: Germany
Posted: 1st Nov 2012 17:52 Edited at: 6th Nov 2012 23:09
Hey faizeq thank you for your effort,

off-course i did, but i did it again and had no success.
Then i tried the wait key method of debugging...
one wait key before the "DBFTexture 1,"C:/flash/gui.swf",255"
and one after the command.
The Demo don't reach the second wait key.

Do you need more information?

I hope someone has an idea.

I wanted to mention that i deinstalled flashCS4.
faizeq
17
Years of Service
User Offline
Joined: 13th Oct 2008
Location: Under the table
Posted: 11th Nov 2012 11:21
Heya Janbo.
I've tried some re installation myself to see whether any unforeseen component could be a reason on this issue of yours.I had installed Win7 x64 and win8 x64 from scratch and installed only:

directx9.0c
http://www.microsoft.com/en-gb/download/details.aspx?id=31217

and

Microsoft Visual C++ 2010 SP1 Redistributable Package (x64)
http://www.microsoft.com/en-us/download/details.aspx?id=13523

On running these new os installation I've not faced any issue at all on running the demo.I think that it might be somewhat hardware related on your machine . Maybe some graphic card drivers or something related.And this is just a speculation of mine though
The best that I can do is to cook up a new release that would have a better error handling for that particular function so that it can give more precise details of whats stopping it from running.
I'll see what I can do when I could have some spare time for myself....

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

Login to post a reply

Server time is: 2026-07-10 12:35:44
Your offset time is: 2026-07-10 12:35:44