The Indistructible!.... Ball Of String 1.0

Demon666 - Adventure level - from Windows
Play42 players liked this.Log in to like this level.

you just run things over... thats all there is to it lmao

slider or A/D: drive left or right

future improvements:
- increase stabilization

Views: 5551 Downloads: 2072 Unique objects: 1 Total objects: 160

Discuss this level

Log in to comment on this level.
  • Hoborg: @zardOz: Meaby you right
  • zardOz2: @Hoborg: its about learning for me, I have to electronics pretty much mastered so I learn lua... also iits not as bad as you think, only a few of the top all time levels are lua related, and theyre way down the list
  • Hoborg: @Demon666: I know in bigger mashines lua is needed but most people use lua to very basic thinks like a simple car only for fame. Od course not you:D
  • Demon666: @Hoborg: cuz alot of the older players left. it's still very possible to make things from AND and OR gates but it's just easier when lua. the thing about lua is that it allows you to make things extremely compact that's one of the main reasons I use it.
  • Hoborg: Where did these times when in principia important been amazing mashines and logic gates ? Now everything without lua is not cool and boring . Of course not for everyone. Yet.
  • JOELwindows7: Allow Derivatives
    Already Awesome
  • Demon666: @principia_rus: thanks
  • principia_rus: Wow! Awesome!
  • zardOz2: @Johnsinna: well its about as basic as I can get... I knew nothing about electronics when I started... each piece I learned I made a simple tutorial... you should show her how to run wires from the rc and how to set the buttons and sliders. if she can run wires to different parts and the grapher she can begin testing basic stuff, best way to learn.
  • Johnsinna: @zardOz: But She Extreme Noob That Doesnt Know About Mechanics And Electronics
  • zardOz2: @Johnsinna: well I made my "basic parts tutorial" series for absolute newbs, it begins with a few parts and adds more info with each level... at level 9 it starts with the complex signal values... its intended for eachh part to be tested and played with until you understand what its doing ten move on to the next one... gotta learn one part at a time and of course i can answer any specific questions that come up
  • Johnsinna: @zardOz: Hey Can You Teach skai102 How To Use Principia Shes A Real Noob
  • rainbowbuilder26: hello people that are reading this massage i have gone on the following site and registred an account then i went to get the game and it said buy the game for 14.99 or download the free demo i thoat it was ment to be free thusday to friday is there something i missed please answer as soon as posable thanks
  • zardOz2: @Johnsinna: arrays are just data tables, if demons level doesnt work for you, read my wiki biginners guide. with your background you should be able to breeze through it pretty quick. even though i still have some errors in it still. part 4 covers tables
  • Johnsinna: ok
  • Demon666: @Johnsinna: read this
  • Johnsinna: @zardOz: Whats An Array
  • JOELwindows7: Duper Awesome!!!
    Allow Derivatives after contest end!
  • electro: Is it a vehicle?
  • Demon666: @zardOz: thanks... another vehicle from Saints row lol
  • zardOz2: lol good one
  • Demon666: @Johnsinna: from what I can tell in python can link directly to images but in lua you can't do that you have to have the data for the image in the code. you have to make an array to hold each individual pixel in the image and them use a for loop to scan through it.
  • Johnsinna: the only thing similar that lua has to python is init
  • Demon666: @Johnsinna: i dont know how python works but if you have experience with other programing languages then lua shouldnt be that difficult lol
  • Johnsinna: Its One Of My Ping Pong
  • Johnsinna: init:

    image bg pong field = "pong_field.png"


    class PongDisplayable(renpy.Displayable):

    def __init__(self):


    # Some displayables we use.
    self.paddle = Image("pong.png")
    self.ball = Image("pong_ball.png")
    self.player = Text(_("[povname!t]"), size=36)
    self.eileen = Text(_("Joshua"), size=36)
    self.ctb = Text(_("Click to Begin"), size=36)

    # The sizes of some of the images.
    self.PADDLE_WIDTH = 8
    self.PADDLE_HEIGHT = 79
    self.BALL_WIDTH = 15
    self.BALL_HEIGHT = 15
    self.COURT_TOP = 108
    self.COURT_BOTTOM = 543

    # If the ball is stuck to the paddle.
    self.stuck = True

    # The positions of the two paddles.
    self.playery = (self.COURT_BOTTOM - self.COURT_TOP) / 2
    self.computery = self.playery

    # The speed of the computer.
    self.computerspeed = 350.0

    # The position, dental-position, and the speed of the
    # ball.
    self.bx = 88 = self.playery
    self.bdx = .5
    self.bdy = .5
    self.bspeed = 300.0

    # The time of the past render-frame.
    self.oldst = None

    # The winner.
    self.winner = None

    def visit(self):
    return [ self.paddle, self.ball, self.player, self.eileen, self.ctb ]

    # Recomputes the position of the ball, handles bounces, and
    # draws the screen.
    def render(self, width, height, st, at):

    # The Render object we'll be drawing into.
    r = renpy.Render(width, height)

    # Figure out the time elapsed since the previous frame.
    if self.oldst is None:
    self.oldst = st

    dtime = st - self.oldst
    self.oldst = st

    # Figure out where we want to move the ball to.
    speed = dtime * self.bspeed
    oldbx = self.bx

    if self.stuck: = self.playery
    self.bx += self.bdx * speed += self.bdy * speed

    # Move the computer's paddle. It wants to go to, but
    # may be limited by it's speed limit.
    cspeed = self.computerspeed * dtime
    if abs( - self.computery) <= cspeed:
    self.computery =
    self.computery += cspeed * ( - self.computery) / abs( - self.computery)

    # Handle bounces.

    # Bounce off of top.
    ball_top = self.COURT_TOP + self.BALL_HEIGHT / 2
    if < ball_top: = ball_top + (ball_top -
    self.bdy = -self.bdy"pong_beep.wav", channel=0)

    # Bounce off bottom.
    ball_bot = self.COURT_BOTTOM - self.BALL_HEIGHT / 2
    if > ball_bot: = ball_bot - ( - ball_bot)
    self.bdy = -self.bdy"pong_beep.wav", channel=0)

    # This draws a paddle, and checks for bounces.
    def paddle(px, py, hotside):

    # Render the paddle image. We give it an 800x600 area
    # to render into, knowing that images will render smaller.
    # (This isn't the case with all displayables. Solid, Frame,
    # and Fixed will expand to fill the space allotted.)
    # We also pass in st and at.
    pi = renpy.render(self.paddle, 800, 600, st, at)

    # renpy.render returns a Render object, which we can
    # blit to the Render we're making.
    r.blit(pi, (int(px), int(py - self.PADDLE_HEIGHT / 2)))

    if py - self.PADDLE_HEIGHT / 2 <= <= py + self.PADDLE_HEIGHT / 2:

    hit = False

    if oldbx >= hotside >= self.bx:
    self.bx = hotside + (hotside - self.bx)
    self.bdx = -self.bdx
    hit = True

    elif oldbx <= hotside <= self.bx:
    self.bx = hotside - (self.bx - hotside)
    self.bdx = -self.bdx
    hit = True

    if hit:"pong_boop.wav", channel=1)
    self.bspeed *= 1.10

    # Draw the two paddles.
    paddle(68, self.playery, 68 + self.PADDLE_WIDTH)
    paddle(724, self.computery, 724)

    # Draw the ball.
    ball = renpy.render(self.ball, 800, 600, st, at)
    r.blit(ball, (int(self.bx - self.BALL_WIDTH / 2),
    int( - self.BALL_HEIGHT / 2)))

    # Show the player names.
    player = renpy.render(self.player, 800, 600, st, at)
    r.blit(player, (20, 25))

    # Show Joshua's name.
    eileen = renpy.render(self.eileen, 800, 600, st, at)
    ew, eh = eileen.get_size()
    r.blit(eileen, (790 - ew, 25))

    # Show the "Click to Begin" label.
    if self.stuck:
    ctb = renpy.render(self.ctb, 800, 600, st, at)
    cw, ch = ctb.get_size()
    r.blit(ctb, (400 - cw / 2, 30))

    # Check for a winner.
    if self.bx < -200:
    self.winner = "eileen"

    # Needed to ensure that event is called, noticing
    # the winner.

    elif self.bx > 1000:
    self.winner = "player"

    # Ask that we be re-rendered ASAP, so we can show the next
    # frame.
    renpy.redraw(self, 0)

    # Return the Render object.
    return r

    # Handles events.
    def event(self, ev, x, y, st):

    import pygame

    # Mousebutton down == start the game by setting stuck to
    # false.
    if ev.type == pygame.MOUSEBUTTONDOWN and ev.button == 1:
    self.stuck = False

    # Set the position of the player's paddle.
    y = max(y, self.COURT_TOP)
    y = min(y, self.COURT_BOTTOM)
    self.playery = y

    # If we have a winner, return him or her. Otherwise, ignore
    # the current event.
    if self.winner:
    return self.winner
    raise renpy.IgnoreEvent()

    label demo_minigame:

    label demo_minigame_pong:

    window hide None

    # Put up the pong background, in the usual fashion.
    scene bg pong field

    # Run the pong minigame, and determine the winner.
    winner = ui.interact(suppress_overlay=True, suppress_underlay=True)

    window show None

    if winner == "eileen":

    j "I win!"
    jump rtn


    m "I won! ."
    jump rtn

  • Johnsinna: @Demon666: examples
  • Johnsinna: @Demon666: yup
  • Johnsinna: yup
  • Demon666: @that guy: lol i was thinking of making one
  • Demon666: @Johnsinna: its when you have one variable that contains multiple other variables.
  • Demon666: @Johnsinna: they don't have the term arrays or tables in python?
  • Johnsinna: @that guy: I can draw a cat with python
  • Johnsinna: @Demon666: Im An Expert At Python Coding
  • that guy2: Now we just need a huge cat...
  • Johnsinna: @Demon666: oh ok
  • Demon666: @Johnsinna: if you don't understand atleast that much about programing then your not going to understand anything im saying lol... try looking at zordoz's lua tutorials hes a better teacher then me lol.
  • Johnsinna: @Demon666: This Question May Seem Dumn But Whats An Array
  • Johnsinna: How Do You Arrange It
  • Demon666: @Johnsinna: I used this to convert an existing image into an array for lua.
  • Johnsinna: Demon666: Hey How Do You Draw A Lua Sprite
  • Johnsinna: Wow

LEVEL ID: 11621