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 / D3DFunc V3.0

Author
Message
Cloggy
19
Years of Service
User Offline
Joined: 31st Oct 2004
Location: Rayleigh, Essex
Posted: 29th May 2007 02:12 Edited at: 29th May 2007 02:12
I have found a potential if a little obscure problem. For some reason the dll will crash out if you do not include some sort of input command in your program. This means the DBProInputDebug.dll doesn't get included with the project. This is weird as I'm not aware of using anything from this dll in mine.

I am changing d3d_func to automatically include this dll in future releases.

This may explain this error from a previous post by Ric

Quote: "
I have used this version with my dbpro project GUI Studio, (using the latest version of dbpro), in which I use just the basic text commands (d3d_init, d3d_font, d3d_starttext/text/endtext).

When the project is compiled into an exe, it runs fine on most users machines, but about 1 in 10 users report that it crashes out with just the '.... has encountered an error and needs to close' message. We have identified that removing all d3d references solves the problem.
"


Cheers,

Cloggy
Diggsey
17
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 30th May 2007 01:13
@Cloggy
I'm sure that can't have been the same problem that ric had, because GUI studio MUST use the mousex/y() and mouseclick() commands!

RUCCUS
19
Years of Service
User Offline
Joined: 11th Dec 2004
Location: Canada
Posted: 30th May 2007 02:35
Maybe Im missing something, but for some reason, calling any of the 3d object creation commands causes a crash. That includes the pyramid, the teapot, and the circle.

Is there a 3d object creation initialization command Im missing? Or is this a known issue?


Cloggy
19
Years of Service
User Offline
Joined: 31st Oct 2004
Location: Rayleigh, Essex
Posted: 30th May 2007 10:31
ruccus,

the 3d environment needs to have been initialised. Any 3d type command will do for example



works, but



causes a crash. Not sure that there is much I can do about it. It's a bit like Sparkys collision needing a memblock command.

Cheers,

Cloggy
Brendy boy
18
Years of Service
User Offline
Joined: 17th Jul 2005
Location: Croatia
Posted: 4th Jun 2007 20:01
There's one problem with your dll cloggy - in command d3d_text:


example: d3d_text 1,0,0,1,"something " + "|"

On the screen it should look like this: "something |"
but it looks like this: "something|"

It seems that command doesn't recognise spaces if they are in the end of the word.

God is real unless declared integer.
Brendy boy
18
Years of Service
User Offline
Joined: 17th Jul 2005
Location: Croatia
Posted: 4th Jun 2007 20:02
After downloading exstras i managed to compile your dll cloggy.

God is real unless declared integer.
Cloggy
19
Years of Service
User Offline
Joined: 31st Oct 2004
Location: Rayleigh, Essex
Posted: 4th Jun 2007 22:10
I just tried the code you provided and it worked fine. Obviously the space is much smaller than it looks in the IDE as it is a proportional font




Cheers,

Cloggy
Sixty Squares
17
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Somewhere in the world
Posted: 19th Jun 2007 22:18
I never realized how slow the DBPro text commands until I tried to make a letter by letter talking system with them (which was slow mc slow slow land). Then I came across this, and my game was no longer slow! This is truly a great DLL-- and its one of my favorites

Just one thing. The 3D Text and 3D Pyramid commands dont seem to be working for me (maybe I have an outdated version of the DLL?). 3D Line works fine. I ran these commands in the showcase example you include and got the generic "Dbp_program.exe has encountered a problem and needs to close. We are sorry for the inconvenience" error. I also tried this code and got the same error:



Any ideas on whats happening? The rest of the DLL is working great by the way

Thanks,
-Sixty Squares

Burnman
17
Years of Service
User Offline
Joined: 4th Mar 2007
Location: New England
Posted: 20th Jun 2007 05:39
Now this is a wonderful tool, I am absolutely LOVING the text commands...

Awesome work!
Aaron Miller
18
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 20th Jun 2007 14:49
Cloggy, would you mind emailing me so I may speak with you about your GUI dll? You didn't seem to give out your public email address. (Probably for good reason)

Any of the following emails would be fine, if you have the time.

darktwilight@rock.com
thedarktwilight@gmail.com
ajm@nuclearglory.com


The following email is actually my MSN, and "spam collector".
dark.twilight@hotmail.com


Cheers,

-naota

Cloggy
19
Years of Service
User Offline
Joined: 31st Oct 2004
Location: Rayleigh, Essex
Posted: 21st Jun 2007 01:30
Sixty,

The 3d text command in you example is incorrect



If that still fails, try adding a 3d command like backdrop on. This ensures the 3d dll is included with the exe. I've fixed it here, but am not ready to release yet.

D3DFunc - Superfast Antialiased text & much much more
Diggsey
17
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 21st Jun 2007 22:54
@Cloggy
Feature request!

A box command that adds or subtracts the colour specified to the existing coloured pixels. (Just like ghosting and dark ghosting) This would be VERY useful for a trails effect I am trying to acheive.
Thanks in advance

Cloggy
19
Years of Service
User Offline
Joined: 31st Oct 2004
Location: Rayleigh, Essex
Posted: 22nd Jun 2007 01:19
Diggsey,

Not really sure what you mean. Doesn't settting the alpha value of the colour do that?

It'll be difficult to add while I can't get my head around it.

D3DFunc - Superfast Antialiased text & much much more
Bush Baby
18
Years of Service
User Offline
Joined: 23rd Apr 2005
Location: A cave beneath Jerusalem
Posted: 22nd Jun 2007 21:26
Hey cloggy,

I just started using your DLL, and I must say it rocks! Thank you very much for finally solving the text-slow down effect.

I am just curious but is it possible to make box text have a semi-transparent box? Or could you possibly make that? If so, would it be difficult? Thanks in advanced, and cheers for making such a cool dll!

-BushBaby

Diggsey
17
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 22nd Jun 2007 21:33
Basically, for all the pixels inside a box, you do this:
Add together the current colour of this pixel, and the box colour, and put that in this pixel.
eg.
In a greyscale image example:


When the command is used on a box covering all of it, with a colour of 10, you get:


In ARGB, it would add each channel seperately.
Basically it adds the new colour to every pixel inside a specified box.

What I need most, is the same, but subtracting rather than adding.

Here is an example of adding:


Hopefully you can see what I mean, and I hope you add this to your great plugin

Cloggy
19
Years of Service
User Offline
Joined: 31st Oct 2004
Location: Rayleigh, Essex
Posted: 24th Jun 2007 01:37 Edited at: 24th Jun 2007 02:26
Bush Baby,

It may be possible to make box text have it background filled with colour, but due to the way the text is rendered this may be difficult. I don't think any of my drawing commands can be used between the starttext and endtext commands. I will investigate.

I've now added an extra option parameter to the d3d_boxtext command



Diggsey,

I see if I can produce the effect your after.

I've had a look now, but can't find a way to produce the effect. Sorry

D3DFunc - Superfast Antialiased text & much much more
Diggsey
17
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 24th Jun 2007 12:10
I believe that it's called 'Additive blending'. If you still can't find it, would it be possible for me to see how you are doing the current box command, and see if I can find a way to do additive blending (It's quite important). Thanks anyway for taking a look

Cloggy
19
Years of Service
User Offline
Joined: 31st Oct 2004
Location: Rayleigh, Essex
Posted: 24th Jun 2007 13:10
This is what I'm currently doing. I've tried many different variations of D3DBLEND. I can get the equivalent of the adding as shown above, but not subtracting.



Let me know what you find.

D3DFunc - Superfast Antialiased text & much much more
Diggsey
17
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 24th Jun 2007 16:43 Edited at: 24th Jun 2007 16:43
I know it's possible, so I posted in programming talk if anyone knew the correct renderstates to set for subtractive blending

Cloggy
19
Years of Service
User Offline
Joined: 31st Oct 2004
Location: Rayleigh, Essex
Posted: 25th Jun 2007 01:38
Diggsey,

I have done some experimenting and this is all I have come up with.

Using the following call in my dll



and with the following DBP code



I get the following results



Not sure if this is the effect you are looking for.

D3DFunc - Superfast Antialiased text & much much more
Juso
21
Years of Service
User Offline
Joined: 23rd Sep 2002
Location: Finland
Posted: 25th Jun 2007 14:03
@Cloggy

Some letters like "öäü" cant be shown in d3d_Make_3dText
Diggsey
17
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 25th Jun 2007 20:31 Edited at: 25th Jun 2007 20:33
I think it might be. Can you show me a subtraction of a red (255,0,0) strip with full alpha, from a purple (255,0,255) line with full alpha. The purple line should be made first using just the normal box command.

If it makes blue (0,0,255), then it's right.

Cloggy
19
Years of Service
User Offline
Joined: 31st Oct 2004
Location: Rayleigh, Essex
Posted: 25th Jun 2007 21:43 Edited at: 25th Jun 2007 21:58
I've tried every possible combination and it just doesn't work

Juso, I've tried it here and it works fine.

D3DFunc - Superfast Antialiased text & much much more
Juso
21
Years of Service
User Offline
Joined: 23rd Sep 2002
Location: Finland
Posted: 27th Jun 2007 13:07
@Cloggy
I did some tests and noticed that letters like "öäü" crash only in Win98 so its not meaningful.
Diggsey
17
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 13th Aug 2007 00:28
For some reason, I can't get d3d_polygon or d3d_circle to work if I set the 'filled' parameter to 1, and a 3d command is used. Even if the only 3d command used is 'backdrop off' They work fine if the filled parameter is set to 0!

Here is my test code:


Try it with/without the 'backdrop off' command, and with/without 'filled' set to 1.

Cloggy
19
Years of Service
User Offline
Joined: 31st Oct 2004
Location: Rayleigh, Essex
Posted: 13th Aug 2007 23:54
Diggsey,

I'll have a look when I get the chance. Can't say I've come across that one before.

D3DFunc - Superfast Antialiased text & much much more
GatorHex
18
Years of Service
User Offline
Joined: 5th Apr 2005
Location: Gunchester, UK
Posted: 14th Aug 2007 00:07
I'm using D3D_Dot 3.6.5 with DBP 6.6 and while it works on an empty blue background it won't appear on screen in my game.

I'm having to use DBP dot which steals 10fps

DinoHunter (still no nVidia compo voucher!), CPU/GPU Benchmark, DarkFish Encryption DLL, War MMOG (WIP), 3D Model Viewer
Cloggy
19
Years of Service
User Offline
Joined: 31st Oct 2004
Location: Rayleigh, Essex
Posted: 14th Aug 2007 01:14
Diggsey,

I've tried it here without a problem, I attach the ver latest version 3.7 which I havent released yet. Please take a copy of your old version.

GatorHex,

Are you using sprites? Because I have no control when my graphics are rendered, I can't stop sprites being rendered on top. If you can provide me some example code I'll have a look.

D3DFunc - Superfast Antialiased text & much much more

Attachments

Login to view attachments
GatorHex
18
Years of Service
User Offline
Joined: 5th Apr 2005
Location: Gunchester, UK
Posted: 14th Aug 2007 01:30 Edited at: 14th Aug 2007 01:31
I was using sprites for HUD but shouldn't I be able to see a dot where there is no sprite overlap or does using one small sprite mean no dots whereever they are on the screen will show?

It's a bit hard to give an example I've not managed to recreate it.

DinoHunter (still no nVidia compo voucher!), CPU/GPU Benchmark, DarkFish Encryption DLL, War MMOG (WIP), 3D Model Viewer
Cloggy
19
Years of Service
User Offline
Joined: 31st Oct 2004
Location: Rayleigh, Essex
Posted: 14th Aug 2007 02:44
Sprites only hide dots that they overlap, all others should appear. I'll experiment to see if I can reproduce it.

D3DFunc - Superfast Antialiased text & much much more
Diggsey
17
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 14th Aug 2007 12:39
That version doesn't work either
It does exactly the same thing as the other one.

draknir_
17
Years of Service
User Offline
Joined: 19th Oct 2006
Location: Netherlands
Posted: 16th Aug 2007 18:38
is it possible to add a parameter to D3D_polygon to let me rotate it? Then it would so much more versatile
Diggsey
17
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 16th Aug 2007 21:10
@draknir_
Just what I was thinking
It should be easy enough to add, the way he's doing it

Foe7
17
Years of Service
User Offline
Joined: 26th Mar 2007
Location:
Posted: 17th Aug 2007 08:29
This is quite an awesome DLL. I am using the text commands for a text adventure, and they allow the font's to be very dynamic so that you don't have the same plain piece of text on the whole page. However, there is one problem that I've run into.

I am trying to color in some words in the text. I just finished (and failed) an attempt to overlay some text, as for some reason my logic wasn't right. So I was wondering,

Could you make a command that color's text in a string from one character to the next? like,

d3d_coloroverlay string$,startPos,endPos,color

That would be da awesomeness if you could!

Thanks,

-F7
Diggsey
17
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 20th Aug 2007 16:24
@Foe7 + Cloggy
Maybe a better way, would be to use the normal d3d_text command, then have a d3d_continuetext command, which takes these parameters: Text$, Colour [, font ID] [, align] and draws the text at the end of the last piece of text. The align value should be the vertical alignment relative to the previous text (for different font sizes, the two chunks of text could be bottom aligned/top aligned/centered vertically etc.
This would be a really good idea

Juso
21
Years of Service
User Offline
Joined: 23rd Sep 2002
Location: Finland
Posted: 1st Sep 2007 18:48 Edited at: 1st Sep 2007 18:51
I noticed that Font Size has no meaning when using both 'D3D_Font' and 'D3D_Make_3DText' commands

D3D_Font 1,"Arial",size,0,0,0 `try size -100 or 0 or 100
D3D_Make_3DText 1, 1,"Test",1,1,1

Text is allways 1 unit high.

SYNTAX
D3D_FONT Font ID, Font Name, Font Size, Bold, Italic, Font Measurement
Code Dragon
17
Years of Service
User Offline
Joined: 21st Aug 2006
Location: Everywhere
Posted: 1st Sep 2007 20:12 Edited at: 1st Sep 2007 20:39
Great dll, I'm loving it. The text looks the same as DBP's native text so there's no visual downside, and the code for it is more succinct and faster, what could be better?

[edit]I installed version 3.6.5, but none of the new commands are recognized by the editor or the compiler...

Captain Taco
18
Years of Service
User Offline
Joined: 19th Sep 2005
Location:
Posted: 5th Sep 2007 08:16
Remarkable work, in a stress test 10,000 text strings being printed to screen over a sprite gives a remarkable 22 fps, while the native text commands print at 4 fps, close to a 550% increase in speed. I think it's safe to say, i love you...

good lord that's a lot of potatos!
Aralox
17
Years of Service
User Offline
Joined: 16th Jan 2007
Location: Melbourne
Posted: 28th Sep 2007 12:41
Great plugin, thank you

Olby
20
Years of Service
User Offline
Joined: 21st Aug 2003
Location:
Posted: 9th Nov 2007 15:28
@ Cloggy - Is it possible for you to add a round corner parameter for the d3d_box, thus it would be very easy to create nice user interfaces which are not so blocky.

d3d_box x1, y1, x2, y2, [color], [round]

Thanks,
Olby


PentiumIV 1.60GHz, 256MB, NVIDIA GeForce FX 5200 128MB, AC'97, WinXP Pro SP2, DirectX 9.0c (Feb2007), DBPro 6.6b
Diggsey
17
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 10th Nov 2007 20:52
@Olby
It would probably be easier for Cloggy to implement that into the polygon/circle commands, by moving vertices left if they are left of the center and right if they are to the right of the center (and the same for up and down)

Deagle
18
Years of Service
User Offline
Joined: 28th Aug 2005
Location: Finland
Posted: 21st Nov 2007 06:24
Is there a GDK version of this somewhere?

Deagle aka D-Eagle
Morcilla
21
Years of Service
User Offline
Joined: 1st Dec 2002
Location: Spain
Posted: 21st Nov 2007 10:04
There is some GDK code around, but I'm afraid it is not up-to-date, and it doesn't has all the functions. Follow this link:

http://forum.thegamecreators.com/?m=forum_view&t=111366&b=22

However it would be great for the GDK to have an updated version...Now that GDK is free

The original code is published at Cloggy's depot, but we still need some help to perform the full conversion...
Diggsey
17
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 26th Jan 2008 19:45
Cloggy, I finally found out why the filled 2d polygon commands stop working when you create anything 3d!

It's because when you do that, DBP activates backface culling, and your polygons are drawn the wrong way, so they are culled.

BatVink
Moderator
20
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 11th Feb 2008 22:19
I have returned to this fantastic DLL.

I get a crash when I D3D_Init after changing the screen size I'm using the May 2007 version.

Ric:
Quote: "When the project is compiled into an exe, it runs fine on most users machines, but about 1 in 10 users report that it crashes out with just the '.... has encountered an error and needs to close' message. We have identified that removing all d3d references solves the problem."


Cloggy:
Quote: " For some reason the dll will crash out if you do not include some sort of input command in your program...This may explain this error from a previous post by Ric"


So I added this...
if 1 = 2 then input "Dummy", tmp$

but it still fails. I also rolled back to the 2 versions prior to 3.6.5, but it didn't fix the problem.
BatVink
Moderator
20
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 12th Feb 2008 11:31
I have resolved my problem. It may resolve other people's problems, and also help provide a permanent fix

After reading this thread, I removed the D3D_Init from the initialisation of my program. Because I had made several other changes, I hadn't realised that this had triggered the problem. SO now, after reinstating D3D_Init at the beginning of the program, it works just fine.

Please note, this relates specifically to changing the screen resolution. and D3D lines. It may affect other areas, but D3D lines are the only elements in my application, and resizing is the only issue.
BatVink
Moderator
20
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 15th Mar 2008 23:35 Edited at: 15th Mar 2008 23:37
Further update: D3D_Init still crashes my program. I'm still only using D3D lines, and changing the screen resolution followed by the init crashes the program.

Debug report attached.

Attachments

Login to view attachments
Cloggy
19
Years of Service
User Offline
Joined: 31st Oct 2004
Location: Rayleigh, Essex
Posted: 16th Mar 2008 01:25 Edited at: 16th Mar 2008 01:34
BatVink,

I haven't had any time to really spend on this dll recently. I'll have a look to see if I can find anything. Is it only happening in this program or are you able to recreate in some source you can send to me?

EDIT - One thing, what Op. Sys. are you using?

D3DFunc - Superfast Antialiased text & much much more
BatVink
Moderator
20
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 16th Mar 2008 10:52
Win XP SP2, and Win XP Professional. I'll try to recreate for you, I'll post back here when I've succeeded/failed to do this. The project it is occuring in is DBP embedded in VB, and several thousand lines long!
Cloggy
19
Years of Service
User Offline
Joined: 31st Oct 2004
Location: Rayleigh, Essex
Posted: 16th Mar 2008 12:59
What I can do is add some debug message boxes in a test version of the dll for you. Then we should at least see what line is causing the problem. That will have to wait till a bit later afetr the kids have finished using my PC!

D3DFunc - Superfast Antialiased text & much much more

Login to post a reply

Server time is: 2024-03-28 21:41:39
Your offset time is: 2024-03-28 21:41:39