News:

PlayBASIC2DLL V0.99 Revision I Commercial Edition released! - Convert PlayBASIC programs to super fast Machine Code. 

Main Menu

Updated Sprite Alpha Mode Demo

Started by kevin, April 10, 2006, 01:19:37 PM

Previous topic - Next topic

kevin

This is updated Sprite Alpha demo fr PB1.29.   On my duron 800+GF2 combo it's running 30fps for 250 sprites, and about 20fps for 500.    

Sprite Modes used

Mode 2+4 = Rotated+ Variable Alpha
Mode 2+8 = Rotated+ 50% Alpha
Mode 2+16 = Rotated+ Alpha ADD
Mode 2+32 = Rotated+ 50% Sub  (fixed in PB1.29)


Alpha ADD/SUB now have MMX support also

BlinkOk

#1
is this using the video controller/directx for the alpha or not?

Ian Price

Incredible - you've captured "orbs" on film!

UFO and ghosthunters pay big money for actual footage :P


Seriously, looking very nice and with a good FPS count too :)
I came. I saw. I played some Nintendo.

kevin

Quoteis this using the video controller/directx for the alpha or not?

Not.

kevin

QuoteIncredible - you've captured "orbs" on film!
UFO and ghosthunters pay big money for actual footage :P

Right.. For some reason now I can't shake the feeling your sitting there in tin foil hat, collecting radio waves ? .. strange


 
QuoteSeriously, looking very nice and with a good FPS count too :)

 It runs pretty well.  Most likely better than most people would expect.

Tracy

I know I'm personally looking forward to that in the next version of PB. Way to go, Kevin.

Fash

For PC game/demo music visit
Future Developments

thaaks

I love those PlayBasic FX demos - they always do something that I even couldn't imagine. And then I look at the source code and see something that I couldn't code.

Can't wait to stare at this demo running on my computer  :D

Tommy

Big C.

thats not FX... it will be the truth with the forth coming Version... 1.29 maybe 1.30...  :D

thaaks

Didn't want to confuse anyone. I'm used to use "FX" for any nice graphical effect.

So I did not mean the new PlayBasic FX. I am just always impressed by those graphical demos Kevin can code with PB.

Will be more precise next time  ;)

Tommy

kevin

#10
This demo and few others can be found bellow.

PB1.30 Misc Demos

Tracy

For anyone desiring to play with the wispish lights in this demo, add the following at line 149 (i.e. right before the 'return' command.) For some reason, I thought this was just loads of fun and decided to share. It looks really cool if you un-comment-out the "zz=2" line of code.


 If LeftMouseButton() Or RightMouseButton()
  If LeftMouseButton()
  rev=-2
  Else rev=2
  EndIf
  If LeftMouseButton() And RightMouseButton() Then rev=-5
  For i=0 To max
   mx#=MouseX()
   my#=MouseY()
   sX#=GetSpriteX(objects(i).sprite)
   sy#=GetSpriteY(objects(i).sprite)

   attractangle#=ATanFull((sy#-my#),(sx#-mx#))
   distance#=GetDistance2D(sx#,sy#,mx#,my#)
   speed#=Sqrt(objects(i).xdir#^2+objects(i).ydir#^2)
   If speed#>25 Then speed#=25
   angle#=ATanFull(objects(i).ydir#,objects(i).xdir#)
   newangle#=CurveAngle(attractangle#,angle#,1)
   g#=(1-distance#/200)*0.3
   If g#<0 Then g#=0
   `If distance#<50 Then speed#=speed#*0.90
   objects(i).xdir#=speed#*Cos(angle#)+speed#*Cos(attractangle#)*g#*rev
   objects(i).ydir#=speed#*Sin(angle#)+speed#*Sin(attractangle#)*g#*rev
   
 Next
 EndIf


(I hope I'm in line posting modifications to someone else's code, but I thought it'd be okay since it was a demo.)

kevin

Very cool..  If you make a MOD, just zip up the project and files and upload the sucker..