Jump to content

Photo

pfhline with random hole?


3 replies to this topic

#1 Captain Spazer OFFLINE  

Captain Spazer

    Star Raider

  • 80 posts

Posted Sun Dec 25, 2016 10:16 AM

I have a question about using the pfhline, is it possible to have a hole in the line at a random location, and if so, how would I go about making it?



#2 Lewis2907 OFFLINE  

Lewis2907

    Chopper Commander

  • 138 posts
  • Location:Senatobia, MS

Posted Sun Dec 25, 2016 10:26 AM

I think so with pfpixel or pfhline using the on and off switch like I did for the walls in Pac man eat and run and for the Safe house in that game.

#3 bogax OFFLINE  

bogax

    Dragonstomper

  • 718 posts

Posted Sun Dec 25, 2016 6:07 PM

draw a line then poke a hole in it



#4 Gemintronic OFFLINE  

Gemintronic

    Jason S. - Lead Developer & CEO

  • 8,851 posts

Posted Tue Dec 27, 2016 7:34 PM

One performance and size optimization is to access the playfield variables instead of line drawing commands.  Each variable is eight pixels on the screen. The value 255 is like eight pixels drawn in a row. 

http://www.randomter....html#playfield
 
So, you want a line near the middle of the screen?  Try:
 
var20 = 255 : var21 = 255 : var22 = 255 : var23 = 255






0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users