Author Topic: BlitzPTC: TinyPTC for BlitzMax[BMAX]  (Read 8675 times)

0 Members and 1 Guest are viewing this topic.

Offline DruggedBunny

  • ZX 81
  • *
  • Posts: 8
  • Karma: 2
    • View Profile
BlitzPTC: TinyPTC for BlitzMax[BMAX]
« 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 if needed.
« Last Edit: July 21, 2007 by Shockwave »

Offline Shockwave

  • good/evil
  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 17412
  • Karma: 498
  • evil/good
    • View Profile
    • My Homepage
Re: BlitzPTC: TinyPTC for BlitzMax
« Reply #1 on: July 20, 2006 »
Thank you!
Shockwave ^ Codigos
Challenge Trophies Won:

Offline TinDragon

  • Pentium
  • *****
  • Posts: 644
  • Karma: 24
    • View Profile
    • J2K's blog
Re: BlitzPTC: TinyPTC for BlitzMax
« Reply #2 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:

Offline TinDragon

  • Pentium
  • *****
  • Posts: 644
  • Karma: 24
    • View Profile
    • J2K's blog
Re: BlitzPTC: TinyPTC for BlitzMax
« Reply #3 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  :||

Offline DruggedBunny

  • ZX 81
  • *
  • Posts: 8
  • Karma: 2
    • View Profile
Re: BlitzPTC: TinyPTC for BlitzMax
« Reply #4 on: July 22, 2006 »
Glad to hear it worked -- I'll certainly give the test a whirl!

Offline Hotshot

  • DBF Aficionado
  • ******
  • Posts: 2114
  • Karma: 91
    • View Profile
Re: BlitzPTC: TinyPTC for BlitzMax
« Reply #5 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....


Offline Clyde

  • A Little Fuzzy Wuzzy
  • DBF Aficionado
  • ******
  • Posts: 7271
  • Karma: 71
    • View Profile
Re: BlitzPTC: TinyPTC for BlitzMax
« Reply #6 on: March 05, 2007 »
Wicked, Drugged Bunny. I must of missed this first time round, welldone dude.

Cheers and all the very best,
Clyde.
Still Putting The IT Into Gravy
If Only I Knew Then What I Know Now.

Challenge Trophies Won:

Offline Shockwave

  • good/evil
  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 17412
  • Karma: 498
  • evil/good
    • View Profile
    • My Homepage
Re: BlitzPTC: TinyPTC for BlitzMax
« Reply #7 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.
Shockwave ^ Codigos
Challenge Trophies Won:

Offline JumpMan

  • C= 64
  • **
  • Posts: 45
  • Karma: 11
    • View Profile
Re: BlitzPTC: TinyPTC for BlitzMax
« Reply #8 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.

Offline Clyde

  • A Little Fuzzy Wuzzy
  • DBF Aficionado
  • ******
  • Posts: 7271
  • Karma: 71
    • View Profile
Re: BlitzPTC: TinyPTC for BlitzMax
« Reply #9 on: March 07, 2007 »
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.
Still Putting The IT Into Gravy
If Only I Knew Then What I Know Now.

Challenge Trophies Won:

Offline JumpMan

  • C= 64
  • **
  • Posts: 45
  • Karma: 11
    • View Profile
Re: BlitzPTC: TinyPTC for BlitzMax
« Reply #10 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! 

Offline Shockwave

  • good/evil
  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 17412
  • Karma: 498
  • evil/good
    • View Profile
    • My Homepage
Re: BlitzPTC: TinyPTC for BlitzMax
« Reply #11 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. :)
Shockwave ^ Codigos
Challenge Trophies Won:

Offline zawran

  • Sponsor
  • Pentium
  • *******
  • Posts: 909
  • Karma: 67
    • View Profile
Re: BlitzPTC: TinyPTC for BlitzMax
« Reply #12 on: March 07, 2007 »
An alternative, if this doesn't work out for you, is to use the one that TinDragon posted: bmax ptc , which uses openGL and the frameswaps can be timed to the vsync if you want to.
« Last Edit: March 07, 2007 by zawran »

Offline TinDragon

  • Pentium
  • *****
  • Posts: 644
  • Karma: 24
    • View Profile
    • J2K's blog
Re: BlitzPTC: TinyPTC for BlitzMax
« Reply #13 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.

Offline JumpMan

  • C= 64
  • **
  • Posts: 45
  • Karma: 11
    • View Profile
Re: BlitzPTC: TinyPTC for BlitzMax
« Reply #14 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.

Offline JumpMan

  • C= 64
  • **
  • Posts: 45
  • Karma: 11
    • View Profile
Re: BlitzPTC: TinyPTC for BlitzMax
« Reply #15 on: March 07, 2007 »
Oops! TinDragon, I didn't realize it was your code.

Offline zawran

  • Sponsor
  • Pentium
  • *******
  • Posts: 909
  • Karma: 67
    • View Profile
Re: BlitzPTC: TinyPTC for BlitzMax
« Reply #16 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. :)