The Game Creators
The Game Creators Home Click to Login
  Hot: Official TGC CompetitionLee is tweeting!July NewsletterSmart PackerBox2DWeb Hosting SurveyDGS BonanzaFPS Creator Bonanza;
The Game Creators
Program Announcements / D3DFunc V3.0

Go to the first page of this board Return to the Forum Menu Post Message
556 Messages - Page   of 14   
Bookmark and Share Search the Forum Next 40

Author Message
Cloggy

Valued Member


Joined: Sun Oct 31st 2004
Location: Rayleigh, Essex
Posted: 9th Jan 2006 17:43     Edited: 19th Apr 2009 05:07     | link | toggle

Attached is version 3 of my D3DFunc dll.

New Features

D3D_Dot3d and D3D_Line3d now both work in any camera view. You have to draw them in each view. This give the flexability of not drawing them in camera views where they aren't needed. you also specify the color when drawing them rather than using a separate command.

D3D_SetView has been removed as the new camera code makes this redundant.

I have updated the showcase code to relfect the camera changes, and am working on some code examples for each command.

I would like to take this opportunity to thank SilentS for adding gradient boxes and making other general improvements is my absence. Also DmitryK for providing me with the code for getting camera info. If anyone else gave me help, thank you.

If anyone finds any bugs, or has requests for extra functionality, please post them to this thread.

BTW - I'll post the full source to this dll in the next couple of days.

EDIT - Latest dll, Documentation and Source located here http://www.dbdepot.co.uk/d3dfunc.html

EDIT - Now updated to include version compatible with U6.2

EDIT - New Version Uploaded V3.6 - Added Isometric Camera

EDIT - New Version Uploaded V3.6.5 - Fixed 3d Line Texture problem

EDIT - New Version Uploaded V3.7 - New Commands. See readme for details

EDIT - 30/10/2008 - New Version Uploaded. Compiled for DBPro v6.9+ will not work for previous versions. See website for old versions

Back to top
D3DFunc Plugin
Download: D3DFunc v3.7 U7.0.zip Size: 220254 bytesReport this message as abusive
blanky

User


Joined: Tue Aug 3rd 2004
Location: ./
Posted: 10th Jan 2006 10:32           | link | toggle

Niiice, man. This thing has always been a wonderful utility DLL, looking forward to trying out the new version...

/me downloads

Support the AAANJL by doing nothing! Visit teh site below..
Back to top
h5o
Report this message as abusive
Philip

User


Joined: Sun Jun 15th 2003
Location: United Kingdom
Posted: 10th Jan 2006 16:56           | link | toggle

Excellent. Thanks to Cloggy and all his contributors. This remains a major plugin resource for the entire community. If Cloggy even attends a DBPro Convention, and is over the legal drinking age, he will be bought free beer.

Cheer if you like bears! Cheer if you like jam sandwiches!
RiiDii: "I highly recommend Philip's vector tutorials"
P3.2ghz / 1 gig / GeForce FX 5900 128meg / WinXP home
Back to top
Report this message as abusive
Cloggy

Valued Member


Joined: Sun Oct 31st 2004
Location: Rayleigh, Essex
Posted: 11th Jan 2006 13:24     Edited: 11th Jan 2006 13:42     | link | toggle

Philip,

If I ever make it to a convention I'll be sure to bring my drinking head .Cheers!

BTW Here is the latest source for this dll.

Cheers,

Cloggy
Back to top
D3DFunc Plugin
Download: d3dfunc source.zip Size: 298292 bytesReport this message as abusive
BatVink

TGC Newsletter Editor


Joined: Fri Apr 4th 2003
Location: Chilling
Posted: 10th Feb 2006 08:54     Edited: 10th Feb 2006 08:55     | link | toggle

Cloggy, I tested the Font Size modification, and it's working perfectly. It's a big improvement when pasting text onto sprites, no jaggy edges and the ability to add transparency


Back to top
The Biglaugh
Download: char48.png Size: 2895 bytes  View Image: char48.png Size: 2895 bytesReport this message as abusive
Peter H

User


Joined: Fri Feb 20th 2004
Location: Witness Protection Program
Posted: 10th Feb 2006 11:56           | link | toggle

w00t!

Thanks! I've been using the older version in my game, but i'll update now

"We make the worst games in the universe..."
Back to top
Report this message as abusive
Cloggy

Valued Member


Joined: Sun Oct 31st 2004
Location: Rayleigh, Essex
Posted: 10th Feb 2006 13:19           | link | toggle

Here is the fixed version, I've also made changes so the text speed is the same regardless of alignment (previously center and right aligned text was about 20% slower!)

Cheers,

Cloggy
Back to top
D3DFunc Plugin
Download: d3dfunc.dll Size: 462848 bytesReport this message as abusive
JoelJ

User


Joined: Mon Sep 8th 2003
Location: UTAH
Posted: 10th Feb 2006 14:47           | link | toggle

you should post a link to the most recent download in your first post of this thread, to help people looking for it

Back to top
My Blog
Report this message as abusive
BatVink

TGC Newsletter Editor


Joined: Fri Apr 4th 2003
Location: Chilling
Posted: 20th Feb 2006 09:46     Edited: 20th Feb 2006 09:48     | link | toggle

Text size still seems to be a problem. The following screenshot is D3D text on the left, standard text on the right. They are both size 24, and the buttons they are on are 32 pixels high. If you look at the "p" in the middle button, it's too large for teh height.



Back to top
The Biglaugh
Download: text.jpg Size: 13964 bytes  View Image: text.jpg Size: 13964 bytesReport this message as abusive
Cloggy

Valued Member


Joined: Sun Oct 31st 2004
Location: Rayleigh, Essex
Posted: 20th Feb 2006 13:44           | link | toggle

BatVink,

The text output by D3D_Text is 24 pixels high whereas the test produced by DBP is much smaller. Do a test with all capital letters and take the results into a paint package. The problem is that 24 pixels is not the height from the top of the tallest letter to the bottom of the lowest.

I could look at trying to match the size with DBP but I'm not sure how the text size you specify actually relates to the height in pixels (points maybe?).

Cheers,

Cloggy
Back to top
D3DFunc Plugin
Report this message as abusive
Peter H

User


Joined: Fri Feb 20th 2004
Location: Witness Protection Program
Posted: 21st Feb 2006 15:40     Edited: 21st Feb 2006 15:40     | link | toggle

I was playing my game that uses this dll on a different computer then my own, and even though the game was running the same resolution... all the text was alot bigger than on my computer...

any ideas why this happened??

"We make the worst games in the universe..."
Back to top
Report this message as abusive
Philip

User


Joined: Sun Jun 15th 2003
Location: United Kingdom
Posted: 21st Feb 2006 16:19           | link | toggle

That computer had a different screen resolution and you didn't have a set display mode command in your game?

Cheer if you like bears! Cheer if you like jam sandwiches!
Quote of the week: "... I started learning DBP while I was a Satellite Network Controller for the US Army Space Command ... "
Back to top
Report this message as abusive
BatVink

TGC Newsletter Editor


Joined: Fri Apr 4th 2003
Location: Chilling
Posted: 22nd Feb 2006 10:16           | link | toggle

mmmm...I'll explain my problem with regard to the text size. I want to make buttons that are the correct height and width for the text on them. What I did was set the DB Pro Text Size to the same as my D3D Text size. The theory being, I can now use text width() to set the size of my button.

Any way around this?

Back to top
The Biglaugh
Report this message as abusive
Peter H

User


Joined: Fri Feb 20th 2004
Location: Witness Protection Program
Posted: 22nd Feb 2006 12:06           | link | toggle

Quote: "That computer had a different screen resolution and you didn't have a set display mode command in your game?"
ahh... that would do it... i somehow thought that the projects settings would do this for you... but apparently not...

"We make the worst games in the universe..."
Back to top
Report this message as abusive
Scilynt

User


Joined: Wed Nov 13th 2002
Location: .-#-.
Posted: 22nd Feb 2006 17:53     Edited: 22nd Feb 2006 18:02     | link | toggle

The easiest way to help BatVink would be to include D3D_GetTextWidth/Height functions. Cloggy is already calculating the size of the bounding box in order to draw, so it wouldn't be too much trouble to add in a couple of functions to expose those values.

The best way to "fix" BatVinks "problem" would be to expose the size of text through another two functions such as D3D_GetTextWidth/Height, that take the font to be used, and the string. This way you're keeping to, what I assume, is the way DX sees text, rather than tweaking the code to perform the same as DBP.

Working code for the function based on the last released source:
+ Code Snippet

Even though I use g_pTextSprite in the code, it doesn't matter if you're inside StartText/EndText as it's never actually used. Depending on the current state of the source, this can just be pasted in and new resource strings added.

And a small image to show it in action, width and height are grabbed and stored in variables, then the box command used in the drawing loop.


On a side note, Cloggy, I noticed your resource IDs had a small problem, you had both IDS_STRING1 and IDS_STRING22 set as 1, and were using IDS_STRING22 for the first string table resource, quick fix though it doesn't cause any problems as is.
Back to top
Banded Software
Download: Sample.png Size: 993 bytes  View Image: Sample.png Size: 993 bytesReport this message as abusive
Oneka

User


Joined: Sat Apr 24th 2004
Location: Hampton,VA
Posted: 22nd Feb 2006 19:58           | link | toggle

Hey cloggy is there / possible of a command that makes an outline for the text? because this would be very useful for my game for reading reason / looks I want an oultine thats black and the innerlines to be white...


Making better games everday!
Oh yeah and just so you know its Oh-nek-a not One-ka!
Back to top
Send AIM user a message
Report this message as abusive
Scilynt

User


Joined: Wed Nov 13th 2002
Location: .-#-.
Posted: 27th Feb 2006 00:37     Edited: 27th Feb 2006 00:39     | link | toggle

Using Cloggy's latest release does seem to crash with 6.0 B1.

If you need a replacement until Cloggy is able to prepare a fixed release, my version based on the latest released source still works (attached).

The only problem being is that Cloggy's latest revisions to the source for speed improvements aren't included. The bonus, is that functions to retrieve text width and height are included.

+ Code Snippet
Back to top
Banded Software
Download: d3dfunc.zip Size: 182556 bytesReport this message as abusive
Cloggy

Valued Member


Joined: Sun Oct 31st 2004
Location: Rayleigh, Essex
Posted: 1st Mar 2006 02:55           | link | toggle

I've put the new TextHeight and Width code in the latest source. Also added a parameter that allows you to specifiy that a fonts size is in pixels (current D3D sizing) or in points (the same as DBPro).

I just have a few things to check with regards compatibility with 5.9 and 6.0, plus some help file updates, before I post the new version.

Also looking to create a small web page with everything on it. Rather then keep posting new versions. This will hold both the source and the compiled dll.

Oneka - I can't see any way of producing a outline font. I will study the DirectX documents, but don't hold out much hope.

Cheers,

Cloggy
Back to top
D3DFunc Plugin
Report this message as abusive
Duffer

User


Joined: Sun Feb 9th 2003
Location: chair
Posted: 1st Mar 2006 10:21           | link | toggle

looking better n better

a long time dabbler with DBC and DBPro with no actual talent but lots of enthusiasm...
Back to top
Report this message as abusive
Oneka

User


Joined: Sat Apr 24th 2004
Location: Hampton,VA
Posted: 1st Mar 2006 15:46     Edited: 1st Mar 2006 15:47     | link | toggle

Ok....well cloggy if you cant do that then can you put in commands like the text commands that return integers/ strings...

+ Code Snippet

Becuase I could use those commands to create my own outline for the text, I can do it now using the built in but they are slow and that isnt good when you have to place each character to the screen to have this effect....


Making better games everday!
Oh yeah and just so you know its Oh-nek-a not One-ka!
Back to top
Send AIM user a message
Report this message as abusive
Google Ad
Back to top
 
harggood

User


Joined: Wed Apr 9th 2003
Location: the forest
Posted: 1st Mar 2006 16:19           | link | toggle

I'm glad you're continuing to work on this great .dll. I use it for everything. Thanks.

Awfuldark Forest
Back to top
Awfuldark Forest
Report this message as abusive
Cloggy

Valued Member


Joined: Sun Oct 31st 2004
Location: Rayleigh, Essex
Posted: 1st Mar 2006 16:44     Edited: 1st Mar 2006 17:23     | link | toggle

Oneka,

Text Width is in the version I will release soon. As for the other functions, I am pretty certain that there are other dlls available to do this already. They are probably better than anything I can manage as my c++ skills are very basic.

harggood - Thanks for the support!

SilentS - Can you tell me what SDK release you used? I just upgraded to Dec 2005 and double the time taken to render text.

Cheers,

Cloggy
Back to top
D3DFunc Plugin
Report this message as abusive
Scilynt

User


Joined: Wed Nov 13th 2002
Location: .-#-.
Posted: 1st Mar 2006 18:08           | link | toggle

Just been speaking with Cloggy over MSN regarding some issues he's having. Not completely resolved just yet, but I've been asked to release the latest build of the DLL. It's only the DLL atm though, I'm sure Cloggy will post the updated help files when he's able to.

Quick list of new or updated commands:
+ Code Snippet

Think that's all.
Back to top
Banded Software
Download: d3dfunc020306.zip Size: 183497 bytesReport this message as abusive
dark coder

User


Joined: Sun Oct 6th 2002
Location: Japan
Posted: 2nd Mar 2006 05:40           | link | toggle

hey cloggy i have to say this plugin is awsome ive been using it for a few months now i used it in my caiman compo however since im on a japanese windows i think the fonts appear as different sizes so ive been using sprite fonts lately.

im running dbp 5.9 and the not so latest d3d v2 and it would just silently crash and using a process of elimination on the example code it seems i have to add a spacebar() command to stop it from silently crashing :o. but other than that its great .

Halowed are the ori.
Back to top
darkcoder
Report this message as abusive
Cloggy

Valued Member


Joined: Sun Oct 31st 2004
Location: Rayleigh, Essex
Posted: 2nd Mar 2006 17:05     Edited: 2nd Mar 2006 17:50     | link | toggle

I think I have sorted out the problems I was getting with the Direct SDK (gone back to April 2005). This should work with DBP 6.0 B1 and still be compatible with 5.9.

One good thing to note is the dll is now only 60KB in size!

You will need to have the latest DirectX redistributable install, but obviously that will apply if you have 6.0 anyway.

Help and keywords have now been updated.

Let me know if there are any problems running on 6.0 as I haven't been able to get 6.0 working as yet!

Cheers,

Cloggy
Back to top
D3DFunc Plugin
Download: d3dfunc.zip Size: 46454 bytesReport this message as abusive
BatVink

TGC Newsletter Editor


Joined: Fri Apr 4th 2003
Location: Chilling
Posted: 3rd Mar 2006 10:59           | link | toggle

OK...so I posted a question and then forgot to come back .
I am <------ this glad -------> you could do the text height and width thing. I've got my app working by bodging the figures, but now I can replace it with real commands - sweet!

Thanks guys!

Back to top
The Biglaugh
Report this message as abusive
Cloggy

Valued Member


Joined: Sun Oct 31st 2004
Location: Rayleigh, Essex
Posted: 3rd Mar 2006 18:12           | link | toggle

I have added 1 more text command

+ Code Snippet

This will draw aligned text within a specified region. It will automatically word wrap. The latest dll, help an source can be found here http://www.cloggj.f2s.com/DBPro/

I have edited the first post to include this link, and I will always post the latest changes there rather than attach them to posts.

As always let me know if there are any problems, or if you have any suggestions for new commands.

Cheers,

Cloggy
Back to top
D3DFunc Plugin
Report this message as abusive
dark coder

User


Joined: Sun Oct 6th 2002
Location: Japan
Posted: 4th Mar 2006 00:37           | link | toggle

i have a suggestion im on a japanese version of win xp and when people send me games or something that have text on the fonts are allways very small sometimes i cant even read them, same for the forum code snippet boxes i cant read whats inside, so could you possibly add something to check the size of the fonts or something and resize them so they should look the same on all pc`s?

also like on the standard db text functions you can make it have a box around it(forget the name) and this would be very usefull to me as im making an editor and i will be adding selecting text soon, and having to draw a box behind the text and then flip the texts colour is rather tedious.

Halowed are the ori.
Back to top
darkcoder
Report this message as abusive
Cloggy

Valued Member


Joined: Sun Oct 31st 2004
Location: Rayleigh, Essex
Posted: 4th Mar 2006 06:53           | link | toggle

dark coder,

That may be a bit difficult without having the japanese version in XP myself. I'll see what I can find out. As far as caning the background color of text. It can be done but will mean significant changes to the currunt command set (mainly adding a background color parameter). Again I'll have a think and may radically change the way things are done in the next major release.

Mold Rat,

It's a bit difficult for me to test with 6.0 as I haven't got it working myself. I have passed copies on to SilentS for testing and he had no problems. The problem is I think I should use the December 2005 SDK, but doing that halves the text drawing speed which isn't good. It's a problem with the SDK as the 3dtext sample provided is also much slower than previous versions.

Once Lee releases the version on DBPro sith statically linked MFC8.0 libraries I will try 6.0 again.

Cheers,

Cloggy
Back to top
D3DFunc Plugin
Report this message as abusive
Scilynt

User


Joined: Wed Nov 13th 2002
Location: .-#-.
Posted: 4th Mar 2006 11:26           | link | toggle

Anyone who's having problems, could you run this? [1.3MB]

If this works, then there's something wrong with your code, not the plugin.

If it doesn't work, then there's either something wrong with the plugin, or a required component is missing from your system.
Back to top
Banded Software
Download: d3d-u6b2.zip Size: 1400295 bytesReport this message as abusive
Scilynt

User


Joined: Wed Nov 13th 2002
Location: .-#-.
Posted: 4th Mar 2006 18:36     Edited: 4th Mar 2006 19:13     | link | toggle

That was compiled with U6B2, notice the filename.

Perhaps providing some code that doesn't work will help.

[EDIT #1]
The problem seems to be if you don't use a command inside DBPSystemDebug.dll, so DBP hasn't included it in the EXE.

This is a required DLL, as it exposes the D3D Device for the plugin to output the text to the screen.

In order to have that DLL included, you need to have atleast one of the following commands in your app, or another DLL that requires this one. If you don't need any of them just put one of them somewhere where you app will never reach.

+ Code Snippet
Back to top
Banded Software
Report this message as abusive
Scilynt

User


Joined: Wed Nov 13th 2002
Location: .-#-.
Posted: 4th Mar 2006 20:40     Edited: 4th Mar 2006 20:41     | link | toggle

Easily fixed, you're missing the D3D_Init command. D3D_Init must be called before any function, it sets up the library for interacting with various parts of the DBP engine.

So,
+ Code Snippet
Back to top
Banded Software
Report this message as abusive
Philip

User


Joined: Sun Jun 15th 2003
Location: United Kingdom
Posted: 6th Mar 2006 16:42     Edited: 6th Mar 2006 16:46     | link | toggle

(Post edited by The Bear to remove spectacularly stupid comment about the parameters of the d3d_dot3d command, of which The Bear is rightly embarrassed)

Cheer if you like bears! Cheer if you like jam sandwiches!
Quote of the week: "... I started learning DBP while I was a Satellite Network Controller for the US Army Space Command ... "
Back to top
Report this message as abusive
Scilynt

User


Joined: Wed Nov 13th 2002
Location: .-#-.
Posted: 6th Mar 2006 21:18           | link | toggle

You can manually add line breaks by using Chr$(13) + Chr$(10) or just Chr$(10).
Back to top
Banded Software
Report this message as abusive
Oneka

User


Joined: Sat Apr 24th 2004
Location: Hampton,VA
Posted: 6th Mar 2006 22:32           | link | toggle

Congrats with your progress
If you could add
+ Code Snippet
I can do what I want with my text thanks


Making better games everday!
Oh yeah and just so you know its Oh-nek-a not One-ka!
Back to top
Send AIM user a message
Report this message as abusive
Scilynt

User


Joined: Wed Nov 13th 2002
Location: .-#-.
Posted: 6th Mar 2006 23:14           | link | toggle

The built in string commands will work fine with the plugin. Unless you had an obscure reason for requesting them.
Back to top
Banded Software
Report this message as abusive
Scilynt

User


Joined: Wed Nov 13th 2002
Location: .-#-.
Posted: 7th Mar 2006 03:01     Edited: 7th Mar 2006 03:09     | link | toggle

It's 10 and 13...

10 - New Line (Line Feed)
13 - Carriage Return

11 - Vertical Tab
Back to top
Banded Software
Report this message as abusive
Oneka

User


Joined: Sat Apr 24th 2004
Location: Hampton,VA
Posted: 7th Mar 2006 06:01           | link | toggle

Yeah I didnt want to use the built in because of speed reasons...doing my little trick reduces the frame rate some and I need it to be as fast as it can be....


Making better games everday!
Oh yeah and just so you know its Oh-nek-a not One-ka!
Back to top
Send AIM user a message
Report this message as abusive
Scilynt

User


Joined: Wed Nov 13th 2002
Location: .-#-.
Posted: 8th Mar 2006 07:48           | link | toggle

Re: TextWidth: This has been the way DX works for atleast 1½ years, at first it was considered a bug, but it appears that this is how it's meant to work. So, in order to "fix" this, will need some hack around.

Re: D3D_Box: In the next release things have been changed a little regarding boxes, although I haven't seen the latest release just yet. I think originally the alpha parameter was there due to the way the box command originally worked, in that it didn't support alpha, so another way was used when you specified it. Now the original way has been removed, and alpha is supported throughout.

Just one more thing I want to add, remember this is still Cloggys DLL, although I'm helping him with bits, it's still nothing compared to what he's done himself. So all credit to him.
Back to top
Banded Software
Report this message as abusive
Philip

User


Joined: Sun Jun 15th 2003
Location: United Kingdom
Posted: 8th Mar 2006 09:53           | link | toggle

I'd love a d3d_circle or d3d_eclipse command. I am currently creating these shapes using the d3d_dot3d command but it'd be simpler to have a built in command.

Cheer if you like bears! Cheer if you like jam sandwiches!
Quote of the week: "... I started learning DBP while I was a Satellite Network Controller for the US Army Space Command ... "
Back to top
Report this message as abusive

Go to the first page of this board Return to the Forum Menu Post Message
556 Messages - Page   of 14   
Search the Forum Next 40

This is a multi-page thread older than 30 days.
Go to the last page to check if you can reply to it.

Forum Search

Enter a word or phrase to search our Forum for:

Thread Subject Search
Search Phrase:
Search Scope: Entire forum
Just this board
 
Google Forum Search
Search Phrase:
 
Apollo v2.02


Game Creator Store
Privacy Policy AUP Top of Page