PlayBasic V1.64N (Work In Progress) Gallery

Started by kevin, April 06, 2011, 12:50:14 AM

Previous topic - Next topic

kevin

#15
PlayBASIC V1.64 N BETA #11 (Retail Compiler Only Beta) - (Avail for Registered Users ONLY)

     PlayBASIC V1.64 N  Beta #11   - This one includes the latest optimizations mainly focusing on the  image library.  



Download


      Deleted


kevin

#16
  PlayBASIC V1.64N BETA #12 - DrawShape Opt's Continued

  While looking over the line routines -> draw shape routines last week (or whenever that was) there was noticeable  early rejection option missing from the line mode.  So that's been tacked back in,  giving around another 10fps back on the tunnel demo.   In fact anything that uses lots of shape drawing in line mode will get a win...

PlayBASIC Code: [Select]
   #include "BlitIMage"

screen=NewFxIMage(GetScreenWidth(),GetScreenHeight())


CreateFxImageEX Screen,GetScreenWidth(),GetScreenHeight(),32

rings =300
RingSize# =800

FarDepth# =20000
NearDepth# =10

me=NewConvexShape(RingSize#,64)

Edges=GetShapeEdges(me,0)*rings

ClsColour=rgb(50,50,50)

Do

rendertoimage Screen


; CLs ClsColour
Cls $405060

ink $405060
mx=getscreenwidth()/2
my=getscreenheight()/2

thisrgb=rgb(50,20,210)
thisrgb= $ffffff

zstep#=(NearDepth#-FarDepth#)/Rings
near=0
far=fardepth#
inkmode 1+ 64;4096
inkalpha 0.50+cos(Angle#)*0.50
Angle#=wrapangle(Angle#+1)


projection#=400
lockbuffer
For lp=0 to rings
x#=cos(angle#+lp*2)*455
y#=sin(angle#+lp)*255

z#=FarDepth#+(lp*zstep#)

ProjectedSize#=(RingSize#*projection#)/z#
Scale#=ProjectedSize#/RingSize#
rotateshape me,Angle#+(lp*10),Scale#

sx#=mx+((x#*projection#)/z#)
sy#=my+((y#*projection#)/z#)

ColourScale=255-(250*(z#/far))

ink RgbAlphaMult(ThisRgb,rgb(ColourScale,ColourScale,ColourScale))
; DrawShape me,sx#,sy#,2

ink $0a0a0a
DrawShape me,sx#,sy#,1
next
unlockbuffer

inkmode 1

rendertoscreen
setcursor 0,0
ink rgb(255,255,255)
angle#=wrapangle(Angle#,1)



BlitImageClear screen,0,0,ClsColour

print fps()
print edges
Sync
loop





kevin


PlayBASIC V1.64N BETA #12 - Cleaned Mappy Library

   The Mappy loader is as old as the hills and has some code that was not longer compatible,  so been cleaning up of the code today and dropped in support for loading the blocks as a different video format.  So bellow we have the old animated map demo running as FX formatted map   

kevin

#18
PlayBASIC V1.64 N BETA #13 (Retail Compiler Only Beta) - (Avail for Registered Users ONLY)

     PlayBASIC V1.64 N  Beta #13   - This revision contains all the latest optimizations,  updated Help Files and the mappy slib..  If it runs ok out there then this is will be it.




Download


      Old beta removed.


kevin


  So everything is running as expected ???  If so, then i can build the upgrade

ATLUS

#20
SetShapeVertex work now 0,1,2 instead 1,2,3

PlayBASIC Code: [Select]
 CreateShape 1,3,3


SetShapeVertex 1,1,50,-60
SetShapeVertex 1,2,150,260
SetShapeVertex 1,3,-150,460

SetShapeEdge 1,1,0,1
SetShapeEdge 1,2,1,2
SetShapeEdge 1,3,2,3

DrawShape 1,400,300,2

Print GetShapeVertexX(1,1)
Print GetShapeVertexY(1,1)

Print GetShapeEdge(1,1,0)
Print GetShapeEdge(1,1,1)
Print GetShapeEdge(1,2,0)
Print GetShapeEdge(1,2,1)
Print GetShapeEdge(1,3,0)
Print GetShapeEdge(1,3,1)


Sync
WaitKey




kevin


  That's actually an older change,  where many of the inclusive / inclusive media ranges,  became inclusive / exclusive.

  So creating a shape with 3 vertex original creates 4 of them, 0,1,2,3...  Now it's 0,1,2   

 

ATLUS


kevin


Well, it would seems the VERTS and  EDGES use different rules...  But I might let that one slide for the time being

kevin


LemonWizard

Just updated. and testing stuff I made.
I wonder how much better some of my older programs will run now. most of the stuff I make is sprite and image heavy.