Dark Bit Factory & Gravity
PROGRAMMING => Other languages => Blitz => Topic started by: DruggedBunny on July 20, 2006
-
Hi all, as requested in the C/C++ thread "TinyPTC project for DevCPP", I've attached TinyPTC for BlitzMax. Hope it works!
It's also available at http://www.hi-toro.com/blitz/blitzptc.zip (http://www.hi-toro.com/blitz/blitzptc.zip) if needed.
-
Thank you!
-
Thanks alot :)
I will download and have a look see if I can get it going, thanks again for posting it :cheers:
-
Cool, I cant believe it was that easy to do, wish there was more info on this sort of thing for Bmax. I have it working and made a quick test exe which I will post just to make sure it works as expected.
Thanks again for posting :||
-
Glad to hear it worked -- I'll certainly give the test a whirl!
-
I have add the BlitzmaxPTC on then I put code in but I get the error for loadimage( even thought they are correct loadimage with correct graphics or sprites)
I guess it just for 2D Max with all rect and stuff that work without using Loadimage....
-
Wicked, Drugged Bunny. I must of missed this first time round, welldone dude.
Cheers and all the very best,
Clyde.
-
I have add the BlitzmaxPTC on then I put code in but I get the error for loadimage( even thought they are correct loadimage with correct graphics or sprites)
I guess it just for 2D Max with all rect and stuff that work without using Loadimage....
Tinyptc doesn't work like that mate.
You need to write your own functions for loading graphics and drawing them.
-
I have never used tinyPTC. It seems it creates a display window and directs pixel output to its display. Am I correct or What exactly does it do? Excuse my ignorance. By the way is there a way to display in full screen.
-
TinyPTC (http://sourceforge.net/projects/tinyptc/) is a cross platform framebuffer library with a simple API. With this version for BMAX, Im sure Drugged Bunny can fill you in on how to make it display fullscreen.
Cheers & hope this helps,
Clyde.
-
Thanks, Clyde. I would like to know more about it. Is there a place where I can get more information on it. such as other function calls and speed(I will run some tests to compare it to bmax). I might find it quite usefull.
-great job Drugged Bunny!
-
All it will do is open a screen and double buffer it. Actually the Blitzmax ptc may only be gdi drawing which means that you might not have such a smooth refresh rate as you want.
The one we use in freebasic was enhanced by rbraz to use gl instead of gdi drawing.
In the freebasic version you can use pre-processor instructions to select windowed or fullscreen.
Have a look in the includes for something says PTC_WIN and by commenting that, you may well get it to run full screen. I don't know as I don't even have a copy of Blitzmax.
Druggedbunny is not around here all that often so maybe better to mail him. :)
-
An alternative, if this doesn't work out for you, is to use the one that TinDragon posted: bmax ptc (http://dbfinteractive.com/index.php?topic=1473.0) , which uses openGL and the frameswaps can be timed to the vsync if you want to.
-
I would suggest trying the version I made in native bmax and ogl as it works pretty much the same and doesnt require the faffing about that this tinyptc version does to get going. From memory the version posted here uses directdraw but I couldnt swear to that. The other thing to consider is if you require any form of input to your demo, with this version you will find it almost impossible to get input other than esc to exit much like the original lib for freebasic.
-
thanks guys. I was looking at the c source code and it seems it uses directdraw. also I made some test with blitzmax for pixel plotting and is quite abit faster but is slower than bmax for native commands.
@TinDragon I rather like the input control from with in Bmax rather than TinyPTC I was planning on using it cooperatively with bmax graphics window. having it terminate with esc limits my ability to use it. I will look into zawran suggestion maybe it will help.
Thanks everyone.
-
Oops! TinDragon, I didn't realize it was your code.
-
Looking forward to see how you get on with it, and just post if you get stuck somewhere and have questions. :)