![]() |
|
Taking Requests |
ImLeftFooted
Member #3,935
October 2003
![]() |
I've decided, in order to spice up my motivation, I'm going to take requests for demo applications to create. I'll make either another A.cc javascript extension or an example application for the Thing library (a D3D/OpenGL/Allegro wrapper in C++). Ideally your request / idea:
|
Paul whoknows
Member #5,081
September 2004
![]() |
Most people here uses AGL or OpenLayer to create 2D games, and it would be nice if you can write an easy tutorial basically explaining how to convert our sprites into textured polygons using your library. ____ "The unlimited potential has been replaced by the concrete reality of what I programmed today." - Jordan Mechner. |
ImLeftFooted
Member #3,935
October 2003
![]() |
I'll throw something together Alright, here we go. The Sprite Thing example is now complete. Download Sprite Thing Example. Heres a preview of the source code:
|
Paul whoknows
Member #5,081
September 2004
![]() |
Woooow thanks! I have some questions: 1 - What is aldumb.h? it's #included in conf.cpp, I have had to remove it to make it work. 2 - In the sprite example, SOFTWARE and HARDWARE modes works fine, but D3D mode does not work, I get an "Error creating Direct3D Object" //I replaced this Conf conf(Conf::WINDOWED, Conf::HARDWARE); //whith this Conf conf(Conf::WINDOWED, Conf::D3D);
3 - I get a 4MB executable when I compile the sprite example! and it needs the d3d9.dll to work. 4 - Is there a function to use additive and alpha blending? I really liked this example! needless to say that I need to spend more time looking at the headers. ____ "The unlimited potential has been replaced by the concrete reality of what I programmed today." - Jordan Mechner. |
ImLeftFooted
Member #3,935
October 2003
![]() |
Quote: 1 - What is aldumb.h? it's #included in conf.cpp, I have had to remove it to make it work.
That was in by mistake Quote: 2 - In the sprite example, SOFTWARE and HARDWARE modes works fine, but D3D mode does not work, I get an "Error creating Direct3D Object" Hmm... Try installing direct X 9 maybe? Quote:
//I replaced this Yes this is the way to switch from OpenGL mode to D3D mode. Quote: How can I statically compile the example? The d3dx9.dll dependency is stuck for now. In the future I plan to make the dll dynamically loaded and simply make the D3D driver fail if it is not found. For now the only way to remove the dependency is to compile with the NO_D3D macro defined. Quote: How can I reduce the file size? I'm not sure why its so large for you... did you strip the executable? Quote: 4 - Is there a function to use additive and alpha blending? Yes this is supported by every drawing method. The parameter its controlled with is 'tint'. Heres the Tint class for reference: struct Tint { float r, g, b, a; // True if the blit should be done with additive blending. bool additive; Tint(float red = 1, float green = 1, float blue = 1, float alpha = 1, bool add = false) : r(red), g(green), b(blue), a(alpha), additive(add) { } };
Quote: I really liked this example! needless to say that I need to spend more time looking at the headers.
|
Paul whoknows
Member #5,081
September 2004
![]() |
I was compiling adding debug information::), now I get a 0.9MB executable file! I have DirectX 9.0b in my system , do I need to install DirectX 9.0c to make it work? Quote: Yes this is supported by every drawing method. The parameter its controlled with is 'tint'. Heres the Tint class for reference:
As I said I need to spend more time looking at the headers:) ____ "The unlimited potential has been replaced by the concrete reality of what I programmed today." - Jordan Mechner. |
ImLeftFooted
Member #3,935
October 2003
![]() |
Quote:
I have DirectX 9.0b in my system , do I need to install DirectX 9.0c to make it work? IIRC D3D was incorporated in DirectX 8. There was some good reason that made since way back when to just use version 9 instead of 8, though I don't remember it just now. Any way you could get a back-trace on which line is failing in conf.cpp? |
Mark Oates
Member #1,146
March 2001
![]() |
I'm a big tower defense fan. -- |
Paul whoknows
Member #5,081
September 2004
![]() |
I play games using DirectX 9.0b without problems, I don't know what could be wrong? It seems that this is the part of code that throws the error: Quote:
g_pD3D = Direct3DCreate9(D3D_SDK_VERSION);
____ "The unlimited potential has been replaced by the concrete reality of what I programmed today." - Jordan Mechner. |
ImLeftFooted
Member #3,935
October 2003
![]() |
Hmm.. Heres some insight from msdn msdn said: If this function fails, it indicates that the header file version does not match the runtime DLL version. What version of the D3D devpack did you install? http://msdn2.microsoft.com/en-us/library/bb173465.aspx ** Quote:
I'm a big tower defense fan.
Hmmm... Any ideas on how to take that idea and make it less work / time? I don't want to start a full new project, just something small to get my fire going. |
Paul whoknows
Member #5,081
September 2004
![]() |
I installed DirectX 9.0c, and now the sample works with D3D:D The circle scaled blit code only works with HARDWARE(why don't you call it OPENGL?) Quote: What version of the D3D devpack did you install? DirectX90C.DevPack ____ "The unlimited potential has been replaced by the concrete reality of what I programmed today." - Jordan Mechner. |
ImLeftFooted
Member #3,935
October 2003
![]() |
Quote: The star looks antialiased only with HARDWARE, I think it should look the same with D3D. This is a setting in your driver panel. Quote: The circle scaled blit code only works with HARDWARE Never got around to implementing it for D3D, its on my todo list. Working for SOFTWARE is more work then its really worth. |
Paul whoknows
Member #5,081
September 2004
![]() |
I was doing some testings.(test.cpp and bitmap attached.) I created a tint to set the opacity in 50%, it works in D3D, but it does not work in HARDWARE. http://www.allegro.cc/files/attachment/591743 In FULLSCREEN and D3D after the program finishes, my desktop remains in 640x480, and the program continues resident in memory. In FULLSCREEN and HARDWARE my monitor shows this message "238Hz frequency not supported" tileBlitToScreen works fine in HARDWARE but it shows something weird in D3D mode. http://www.allegro.cc/files/attachment/591744 Quote: This is a setting in your driver panel.
I set antialiasing to 8x but it looks aliased. ____ "The unlimited potential has been replaced by the concrete reality of what I programmed today." - Jordan Mechner. |
ImLeftFooted
Member #3,935
October 2003
![]() |
Tint blending(1, 1, 1, 127, true); Should be Tint blending(1, 1, 1, .5, true);
Quote:
In FULLSCREEN and HARDWARE my monitor shows this message "238Hz frequency not supported"
Ah, you've found a bug Try this new version of conf.cpp. As far as requesting a specific refresh rate, thats a much bigger development challenge (just take a look at the amount of work allegroGL does to find the correct mode!) ** I once tried to convert my own DirectX libraries over but that is no picnic. Does anybody know more on the subject of translating MSVC libraries for use with gcc? |
Paul whoknows
Member #5,081
September 2004
![]() |
Quote:
Should be It's my fault!, sorry. Quote:
Ah, you've found a bug
And it is still there, I tried your new conf.cpp but I did not notice any difference. I would like to use your Thing in my current project, I have found it extremely easy to use, however these little problems should be fixed first. ____ "The unlimited potential has been replaced by the concrete reality of what I programmed today." - Jordan Mechner. |
ImLeftFooted
Member #3,935
October 2003
![]() |
Quote:
I would like to use your Thing in my current project, I have found it extremely easy to use, however these little problems should be fixed first. Yes these problems need to be fixed. Can you tell me more about the opengl frequency problem? You cant do FULLSCREEN? |
Paul whoknows
Member #5,081
September 2004
![]() |
My monitor does not allow non-standar refresh rates, when that happens it goes black and it shows a message saying "132k/239Hz frequency out of range", well in this particular case it was 239Hz. That's why I need to force a standar refresh rate like 60, 70, 72, 75, 85, 90, or 100Hz, I don't want my game running at a higher refresh rate, that only happens in FULLSCREEN and HARDWARE mode. In FULLSCREEN and D3D mode it works, but it seems that there is something wrong in the D3Dshutdown(), because once the application ends, it remains in memory and it makes a mess in my desktop, it changes the resolution to 640x480, icons missed, really ugly. ____ "The unlimited potential has been replaced by the concrete reality of what I programmed today." - Jordan Mechner. |
ImLeftFooted
Member #3,935
October 2003
![]() |
Quote: In FULLSCREEN and D3D mode it works, but it seems that there is something wrong in the D3Dshutdown(), because once the application ends, it remains in memory and it makes a mess in my desktop, it changes the resolution to 640x480, icons missed, really ugly. Is this because its crashing? Theres a bug I'm currently working on where D3D crashes on close from fullscreen. Quote: That's why I need to force a standar refresh rate like 60, 70, 72, 75, 85, 90, or 100Hz, I don't want my game running at a higher refresh rate, that only happens in FULLSCREEN and HARDWARE mode. This is interesting... allegroGL should be finding a refresh rate closest to the one requested. Do other allegroGL applications work on your machine? |
Paul whoknows
Member #5,081
September 2004
![]() |
Quote: Is this because its crashing? Theres a bug I'm currently working on where D3D crashes on close from fullscreen. In my PC when I try to close the application(in FULLSCREEN), it fails to close, and it reamins in memory and it makes a mess in my desktop, and I have to kill the application manually, yes I think this could be related. Quote: Do other allegroGL applications work on your machine?
Yes, I tried all AllegroGL examples and they work. ____ "The unlimited potential has been replaced by the concrete reality of what I programmed today." - Jordan Mechner. |
|