Program Announcements / D3DFunc V3.0 |
| Author | Message | ||
|
Cloggy
Valued Member ![]() ![]() Joined: Sun Oct 31st 2004 Location: Rayleigh, Essex |
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 |
|||
|
blanky
User ![]() Joined: Tue Aug 3rd 2004 Location: ./ |
|
||
| Back to top |
|||
|
Philip
User Joined: Sun Jun 15th 2003 Location: United Kingdom |
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 |
|||
|
Cloggy
Valued Member ![]() ![]() Joined: Sun Oct 31st 2004 Location: Rayleigh, Essex |
Philip, If I ever make it to a convention I'll be sure to bring my drinking head BTW Here is the latest source for this dll. Cheers, Cloggy |
||
| Back to top |
|||
|
BatVink
TGC Newsletter Editor ![]() ![]() Joined: Fri Apr 4th 2003 Location: Chilling |
|
||
| Back to top |
|||
|
Peter H
User ![]() Joined: Fri Feb 20th 2004 Location: Witness Protection Program |
|
||
| Back to top |
|||
|
Cloggy
Valued Member ![]() ![]() Joined: Sun Oct 31st 2004 Location: Rayleigh, Essex |
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 |
|||
|
JoelJ
User ![]() Joined: Mon Sep 8th 2003 Location: UTAH |
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 |
|||
|
BatVink
TGC Newsletter Editor ![]() ![]() Joined: Fri Apr 4th 2003 Location: Chilling |
|
||
| Back to top |
|||
|
Cloggy
Valued Member ![]() ![]() Joined: Sun Oct 31st 2004 Location: Rayleigh, Essex |
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 |
|||
|
Peter H
User ![]() Joined: Fri Feb 20th 2004 Location: Witness Protection Program |
|
||
| Back to top |
|||
|
Philip
User Joined: Sun Jun 15th 2003 Location: United Kingdom |
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 |
|||
|
BatVink
TGC Newsletter Editor ![]() ![]() Joined: Fri Apr 4th 2003 Location: Chilling |
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 |
|||
|
Peter H
User ![]() Joined: Fri Feb 20th 2004 Location: Witness Protection Program |
|
||
| Back to top |
|||
|
Scilynt
User ![]() Joined: Wed Nov 13th 2002 Location: .-#-. |
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 |
|||
|
Oneka
User Joined: Sat Apr 24th 2004 Location: Hampton,VA |
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 Making better games everday! Oh yeah and just so you know its Oh-nek-a not One-ka! |
||
| Back to top |
|||
|
Scilynt
User ![]() Joined: Wed Nov 13th 2002 Location: .-#-. |
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 |
|||
|
Cloggy
Valued Member ![]() ![]() Joined: Sun Oct 31st 2004 Location: Rayleigh, Essex |
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 |
|||
|
Duffer
User Joined: Sun Feb 9th 2003 Location: chair |
looking better n better a long time dabbler with DBC and DBPro with no actual talent but lots of enthusiasm... |
||
| Back to top |
|||
|
Oneka
User Joined: Sat Apr 24th 2004 Location: Hampton,VA |
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 |
|||
|
Google Ad
AdBot Joined: Aug 26th 2002 Location: Everywhere |
|||
| Back to top |
|||
|
harggood
User Joined: Wed Apr 9th 2003 Location: the forest |
I'm glad you're continuing to work on this great .dll. I use it for everything. Awfuldark Forest |
||
| Back to top |
|||
|
Cloggy
Valued Member ![]() ![]() Joined: Sun Oct 31st 2004 Location: Rayleigh, Essex |
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 |
|||
|
Scilynt
User ![]() Joined: Wed Nov 13th 2002 Location: .-#-. |
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 |
|||
|
dark coder
User Joined: Sun Oct 6th 2002 Location: Japan |
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 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 |
|||
|
Cloggy
Valued Member ![]() ![]() Joined: Sun Oct 31st 2004 Location: Rayleigh, Essex |
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 |
|||
|
BatVink
TGC Newsletter Editor ![]() ![]() Joined: Fri Apr 4th 2003 Location: Chilling |
|
||
| Back to top |
|||
|
Cloggy
Valued Member ![]() ![]() Joined: Sun Oct 31st 2004 Location: Rayleigh, Essex |
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 |
|||
|
dark coder
User Joined: Sun Oct 6th 2002 Location: Japan |
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 |
|||
|
Cloggy
Valued Member ![]() ![]() Joined: Sun Oct 31st 2004 Location: Rayleigh, Essex |
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 |
|||
|
Scilynt
User ![]() Joined: Wed Nov 13th 2002 Location: .-#-. |
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 |
|||
|
Scilynt
User ![]() Joined: Wed Nov 13th 2002 Location: .-#-. |
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 |
|||
|
Scilynt
User ![]() Joined: Wed Nov 13th 2002 Location: .-#-. |
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 |
|||
|
Philip
User Joined: Sun Jun 15th 2003 Location: United Kingdom |
(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 |
|||
|
Scilynt
User ![]() Joined: Wed Nov 13th 2002 Location: .-#-. |
You can manually add line breaks by using Chr$(13) + Chr$(10) or just Chr$(10). |
||
| Back to top |
|||
|
Oneka
User Joined: Sat Apr 24th 2004 Location: Hampton,VA |
Congrats with your progress If you could add + Code Snippet I can do what I want with my text Making better games everday! Oh yeah and just so you know its Oh-nek-a not One-ka! |
||
| Back to top |
|||
|
Scilynt
User ![]() Joined: Wed Nov 13th 2002 Location: .-#-. |
The built in string commands will work fine with the plugin. Unless you had an obscure reason for requesting them. |
||
| Back to top |
|||
|
Scilynt
User ![]() Joined: Wed Nov 13th 2002 Location: .-#-. |
It's 10 and 13... 10 - New Line (Line Feed) 13 - Carriage Return 11 - Vertical Tab |
||
| Back to top |
|||
|
Oneka
User Joined: Sat Apr 24th 2004 Location: Hampton,VA |
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 |
|||
|
Scilynt
User ![]() Joined: Wed Nov 13th 2002 Location: .-#-. |
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 |
|||
|
Philip
User Joined: Sun Jun 15th 2003 Location: United Kingdom |
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 |
|||
This is a multi-page thread older than 30 days.
Go to the last page to check if you can reply to it.
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:
|
|


















