Dark Bit Factory & Gravity

PROGRAMMING => Other languages => Blitz => Topic started by: DruggedBunny on July 20, 2006

Title: BlitzPTC: TinyPTC for BlitzMax[BMAX]
Post 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.
Title: Re: BlitzPTC: TinyPTC for BlitzMax
Post by: Shockwave on July 20, 2006
Thank you!
Title: Re: BlitzPTC: TinyPTC for BlitzMax
Post by: TinDragon on July 21, 2006
Thanks alot :)

I will download and have a look see if I can get it going, thanks again for posting it  :cheers:
Title: Re: BlitzPTC: TinyPTC for BlitzMax
Post by: TinDragon on July 22, 2006
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  :||
Title: Re: BlitzPTC: TinyPTC for BlitzMax
Post by: DruggedBunny on July 22, 2006
Glad to hear it worked -- I'll certainly give the test a whirl!
Title: Re: BlitzPTC: TinyPTC for BlitzMax
Post by: Hotshot on March 05, 2007
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....

Title: Re: BlitzPTC: TinyPTC for BlitzMax
Post by: Clyde on March 05, 2007
Wicked, Drugged Bunny. I must of missed this first time round, welldone dude.

Cheers and all the very best,
Clyde.
Title: Re: BlitzPTC: TinyPTC for BlitzMax
Post by: Shockwave on March 05, 2007
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.
Title: Re: BlitzPTC: TinyPTC for BlitzMax
Post by: JumpMan on March 07, 2007
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.
Title: Re: BlitzPTC: TinyPTC for BlitzMax
Post by: Clyde on March 07, 2007
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.
Title: Re: BlitzPTC: TinyPTC for BlitzMax
Post by: JumpMan on March 07, 2007
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! 
Title: Re: BlitzPTC: TinyPTC for BlitzMax
Post by: Shockwave on March 07, 2007
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. :)
Title: Re: BlitzPTC: TinyPTC for BlitzMax
Post by: zawran on March 07, 2007
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.
Title: Re: BlitzPTC: TinyPTC for BlitzMax
Post by: TinDragon on March 07, 2007
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.
Title: Re: BlitzPTC: TinyPTC for BlitzMax
Post by: JumpMan on March 07, 2007
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.
Title: Re: BlitzPTC: TinyPTC for BlitzMax
Post by: JumpMan on March 07, 2007
Oops! TinDragon, I didn't realize it was your code.
Title: Re: BlitzPTC: TinyPTC for BlitzMax
Post by: zawran on March 07, 2007
Looking forward to see how you get on with it, and just post if you get stuck somewhere and have questions. :)