Diferencia entre revisiones de «Discusión:Pedo»

De Inciclopedia
Ir a la navegación Ir a la búsqueda
(Canción con audio y todo)
Sin resumen de edición
Línea 32: Línea 32:
   
 
Enlazo a [http://www.elrellano.com/radiopedo/radiofiles/rap-pedo.zip una canción] bastante graciosa sobre el tema, a ver que opinan, un saludo--[[Usuario:Mr.Hanta|Mr.Hanta]] 02:20 14 dic 2007 (UTC)
 
Enlazo a [http://www.elrellano.com/radiopedo/radiofiles/rap-pedo.zip una canción] bastante graciosa sobre el tema, a ver que opinan, un saludo--[[Usuario:Mr.Hanta|Mr.Hanta]] 02:20 14 dic 2007 (UTC)
  +
  +
  +
  +
  +
Mora, esto es para ti:
  +
  +
Program Scrolling
  +
  +
Structure GameSprite
  +
IsVisible As Bool
  +
SpriteName As String
  +
X As Decimal
  +
Y As Decimal
  +
Speed As Decimal
  +
End Structure
  +
  +
Define Objects As GameSprite[10]
  +
  +
Define BackgroundTileName As String = "Background"
  +
Define BackgroundScrollIncrementY As Int = 1
  +
Define BackgroundScrollIncrementX As Int = 10
  +
Define BackgroundScrollTimer As Decimal = 0
  +
Define IsScrollingEnabled As Bool = True
  +
Define IsGamePaused As Bool = False
  +
  +
Define TileOffsetX As Int = 0
  +
Define TileOffsetY As Int = 0
  +
  +
Define TileWidth As Int
  +
Define TileHeight As Int
  +
  +
Define GameWidth As Int = 640
  +
Define GameHeight As Int = 500
  +
  +
Define ArañaSpeed As Decimal = 300
  +
Define ArañaX As Decimal
  +
Define ArañaY As Decimal
  +
  +
Define PlayerScore As Int = 0
  +
Define ObjectsMissed As Int = 0
  +
  +
Define frameDrawTime As Decimal = 1.0
  +
Define frameCounter As Int = 0
  +
Define framesPerSecond As Int = 0
  +
Define nextFPSFlip As Decimal
  +
Define engineSound As Decimal
  +
  +
/******************************************************************
  +
This function is used by all of the areas in the program that
  +
perform animation, to convert an animation speed, which is defined
  +
as the desired number of pixels per second to move, into the number
  +
of pixels to move during the current frame.
  +
  +
For instance, ArañaSpeed is defined as how many pixels per second the
  +
player's Araña is capable of moving. By figuring out how much time
  +
the last frame took to be drawn, we can determine how many pixels
  +
to move the player's Araña during the current frame.
  +
  +
This allows the game objects to move at roughly the same speed on
  +
both faster and slower computers, although on slower computers which
  +
take longer to draw individual frames the amount of movement per frame
  +
will be higher, and the animations will be a little choppier. This
  +
is why on very slow computers it may look like the animation is
  +
"dropping frames", since the Araña moves in bigger increments to
  +
compensate for the slow frame rate.
  +
*******************************************************************/
  +
// Adjusts a desired "pixels per second" value according to the current
  +
// frame rate.
  +
Function AdjustForFrameRate( AmountPerSecond As Decimal ) As Decimal
  +
Return Min( 5, AmountPerSecond * frameDrawTime )
  +
End Function
  +
  +
// Scrolls the background of the game to provide a sensation of movement
  +
Method ScrollDown()
  +
  +
// Scroll the background
  +
ScrollBackground( 0, 50, GameWidth, GameHeight + BackgroundScrollIncrementY - 50, 0, BackgroundScrollIncrementY )
  +
CopyRect( 0, GameHeight, GameWidth, BackgroundScrollIncrementY, 0, 50 )
  +
  +
End Method
  +
  +
// Check for pressed keys and take action based on what keys the user is pressing
  +
Method HandleActionKeys()
  +
  +
If IsKeyDown("Right") Then
  +
If ArañaX < GameWidth - GetSpriteWidth( "Araña" ) - 10 Then
  +
ArañaX = ArañaX + AdjustForFrameRate( ArañaSpeed )
  +
End If
  +
End If
  +
  +
If IsKeyDown("Left") Then
  +
If ArañaX > 10 Then
  +
ArañaX = ArañaX - AdjustForFrameRate( ArañaSpeed )
  +
End If
  +
End If
  +
  +
If IsKeyDown("Up") Then
  +
If ArañaY > 70 Then
  +
ArañaY = ArañaY - AdjustForFrameRate( ArañaSpeed )
  +
End If
  +
End If
  +
  +
If IsKeyDown("Down") Then
  +
If ArañaY < GameHeight - GetSpriteHeight( "Araña" ) - 10 Then
  +
ArañaY = ArañaY + AdjustForFrameRate( ArañaSpeed )
  +
End If
  +
End If
  +
  +
MoveSpriteToPoint( "Araña", ArañaX, ArañaY )
  +
  +
End Method
  +
  +
Method Print3D( Text As String )
  +
  +
Color( White )
  +
PrintLine( Text )
  +
MoveBy( -1, -18 )
  +
Color( Black )
  +
PrintLine( Text )
  +
MoveBy( 1, 0 )
  +
  +
End Method
  +
  +
Function CalculateSuccessRatio() As Decimal
  +
  +
// Convert the PlayerScore and ObjectsMissed variables to Decimal types
  +
// so that we can get accurate percentages
  +
Define objectsPlayerGot As Decimal = PlayerScore * 1.0
  +
Define objectsPlayerMissed As Decimal = ObjectsMissed * 1.0
  +
Define totalObjects As Decimal = objectsPlayerGot + objectsPlayerMissed
  +
  +
// If the player has yet to get or miss any objects, return 0.0 now so that
  +
// we don't get a Divide By Zero error below
  +
If totalObjects < 1.0 Then
  +
Return 0.0
  +
End If
  +
  +
// Calculate the success ratio. Remember that although we don't have parenthesis
  +
// around the multiplication calculation below, the standard order of operations
  +
// forces the multiplication to happen before the subtraction.
  +
Define ratio As Decimal = (objectsPlayerGot / totalObjects) * 100.0
  +
  +
// We don't want to return a value less than zero
  +
If ratio < 0.0 Then
  +
ratio = 0.0
  +
End If
  +
  +
Return ratio
  +
  +
End Function
  +
  +
// Draws the section at the top of the screen that shows the player score, etc.
  +
Method DrawScoreboard()
  +
  +
Pen( Off )
  +
  +
MoveTo( 5, 5 )
  +
StampSprite( "Scoreboard" )
  +
  +
SetFont( "Verdana", 10, True, False, False )
  +
  +
Print3D( "Niños Capturados: " + PlayerScore )
  +
  +
Define totalSeconds As Int = TickCount() / 1000
  +
Define gameMinutes As Int = totalSeconds / 60
  +
Define gameSeconds As Int = totalSeconds Mod 60
  +
  +
Print3D( "Tiempo: " + FormatString( "00", gameMinutes ) + ":" + FormatString( "00", gameSeconds ) )
  +
  +
MoveTo( 170, 5 )
  +
Print3D( "Niños Escapados: " + ObjectsMissed )
  +
  +
  +
If IsGamePaused Then
  +
Print3D( "Juego Pausado" )
  +
End If
  +
  +
  +
End Method
  +
  +
// Animates the game objects that can be "picked up" by the player
  +
Method AnimateObjects()
  +
  +
Define Current As GameSprite
  +
  +
Define I As Int
  +
For I = 1 To ArrayLength( Objects )
  +
  +
Current = Objects[i]
  +
If Current.IsVisible And Current.Y < GameHeight Then
  +
  +
Current.Y = Current.Y + AdjustForFrameRate( Current.Speed )
  +
  +
If SpritesIntersect( Current.SpriteName, "Araña" ) Then
  +
  +
HideSprite( Current.SpriteName )
  +
Current.IsVisible = False
  +
  +
PlayerScore = PlayerScore + 1
  +
  +
// This may be a bad assumption, but....
  +
//
  +
// It is assumed that if scrolling is disabled, it is for
  +
// performance reasons, and therefore sounds are disabled as
  +
// well. If you do not like this assumption, remove the
  +
// surrounding If..Then..EndIf from the following PlaySound()
  +
// calls.
  +
If IsScrollingEnabled Then
  +
  +
If PlayerScore Mod 50 = 0 Then
  +
Alert("¡Has capturado 50 niños!","Felicidades")
  +
PlaySound( "PowerUp2.wav" )
  +
Else
  +
PlaySound( "PowerUp3.wav" )
  +
End If
  +
  +
If PlayerScore Mod 200 = 0 Then
  +
Alert("¡Has capturado 200 niños, te has pasado el juego!", "Felicidades")
  +
  +
  +
  +
End If
  +
  +
engineSound = TickCount()
  +
  +
End If
  +
  +
End If
  +
  +
Else
  +
  +
// If the object's IsVisible flag is still set to TRUE, then we
  +
// know that the player just missed it
  +
If Current.IsVisible Then
  +
ObjectsMissed = ObjectsMissed + 1
  +
End If
  +
  +
Current.Y = -50 * I
  +
Current.X = Random( 50, GameWidth - 50 )
  +
Current.Speed = Random( 10, 200 ) + PlayerScore Mod 200
  +
Current.IsVisible = True
  +
  +
If Current.SpriteName = "" Then
  +
Current.SpriteName = "Sprite" + I
  +
LoadSprite( Current.SpriteName, "macaulay.jpg" )
  +
ScaleSprite( Current.SpriteName, 0.7 )
  +
End If
  +
  +
End If
  +
  +
MoveSpriteToPoint( Current.SpriteName, Current.X, Current.Y )
  +
ShowSprite( Current.SpriteName )
  +
  +
Next
  +
  +
End Method
  +
  +
// Handle non-action keys like "Pause", "Scrolling", "Help", etc.
  +
Method HandleAdminKeys()
  +
  +
Define key As String = GetKey()
  +
  +
If Key = "m" Then
  +
IsGamePaused = Not IsGamePaused
  +
End If
  +
  +
If Key = "S" Then
  +
IsScrollingEnabled = Not IsScrollingEnabled
  +
End If
  +
  +
End Method
  +
  +
// Determines roughly how many screen refreshes per second the user's
  +
// computer is capable of displaying
  +
Function CheckRefreshRate() As Int
  +
  +
// Let the user know that we are doing something
  +
Status( "Testing your refresh rate" )
  +
  +
// This is the TickCount() value that we check against to see if we
  +
// are done testing the frame count. Here, we are saying that we
  +
// want to perform the test for 500 milliseconds, which is a half
  +
// of a second (1 second = 1000 milliseconds). It would be more
  +
// accurate to check for a full second, but we don't want to make
  +
// the user wait quite that long ;)
  +
Define endTime As Decimal = TickCount() + 500
  +
  +
// This is the estimate number of frames per second that can be
  +
// displayed by the user's computer
  +
Define refreshCount As Int = 0
  +
While TickCount() < endTime
  +
  +
// Clearing the screen and calling RefreshScreen() forces KPL to
  +
// redraw the entire screen, which will typically be the slowest
  +
// operation in this game, and is therefore a good indicator of
  +
// the kinds of refresh rates we can achieve in worst-case.
  +
Clear( Black )
  +
RefreshScreen()
  +
  +
// Keep track of the number of times through this loop so that
  +
// we know how many frames were shown.
  +
refreshCount = refreshCount + 1
  +
  +
End While
  +
  +
// Inform the user of the results
  +
Status( "Refresh Rate = " + refreshCount * 2 )
  +
  +
// We multiply the frame count by 2 because we only tested for half
  +
// of a second, but we want to return the estimated number of refreshes
  +
// per second. Not accurate, but it works well enough for our purposes
  +
// without making the user wait for a full second.
  +
Return refreshCount * 2
  +
  +
End Function
  +
  +
// The program entry point. This is the first method to be run.
  +
Method Main()
  +
  +
Clear(Blue)
  +
Alert("Eres Michael Jackson, y Macauly se ha quedado solo en casa", "¡A por él!")
  +
  +
SetDeviceCoordinates()
  +
  +
// Check to see if the user's computer is fast enough to enable scrolling by default
  +
IsScrollingEnabled = CheckRefreshRate() >= 15
  +
  +
LoadSprite( BackgroundTileName, "cementerio_pordiosero.jpg" )
  +
TileSprite( BackgroundTileName, 0, 0, GameWidth, GameHeight, 0, 0 )
  +
  +
LoadSprite( "Araña", "jackson4.jpg" )
  +
RotateSprite( "Araña", 0 )
  +
ScaleSprite( "Araña", 0.7 )
  +
MoveSpriteToPoint( "Araña", (GameWidth - GetSpriteWidth("Araña")) / 2, GameHeight - GetSpriteHeight("Araña") * 2 )
  +
ShowSprite( "Araña" )
  +
  +
ArañaX = GetSpriteLeft( "Araña" )
  +
ArañaY = GetSpriteTop( "Araña" )
  +
  +
LoadSprite( "Scoreboard", "Billboard.png" )
  +
  +
TileWidth = GetSpriteWidth( BackgroundTileName )
  +
TileHeight = GetSpriteHeight( BackgroundTileName )
  +
  +
Define startTime As Decimal
  +
Define endTime As Decimal
  +
  +
// Print some instructions for the player in the status bar
  +
Status( "M - Pausar el Juego, Flechas - Mover araña" )
  +
  +
TileOffsetY = TileHeight - 1
  +
  +
// Set a clipping region for sprites that does not allow them to
  +
// be drawn on top of the Scoreboard
  +
SetSpriteClip( 0, 50, GameWidth, GameHeight - 50 )
  +
  +
While True
  +
  +
BeginFrame()
  +
  +
startTime = TickCount()
  +
  +
If startTime - engineSound > 375 And IsScrollingEnabled Then
  +
engineSound = startTime
  +
// Someday I will find a good background sound ;)
  +
PlaySound( "" )
  +
End If
  +
  +
// As the slowest graphics operations in the game, we want
  +
// to scroll the background and draw the Scoreboard only as
  +
// often as necessary.
  +
//
  +
// The following code only performs those operations every
  +
// 50 milliseconds, or about a maximum of 20 times per second.
  +
//
  +
// In practice, only fast machines will be able to reach
  +
// the maximum rate.
  +
If startTime - BackgroundScrollTimer > 50 Then
  +
  +
DrawScoreboard()
  +
  +
If IsScrollingEnabled And Not IsGamePaused Then
  +
ScrollDown()
  +
End If
  +
  +
BackgroundScrollTimer = startTime
  +
  +
Else
  +
  +
// Handle non-action keys like "Pause" and "Scrolling"
  +
HandleAdminKeys()
  +
  +
If Not IsGamePaused Then
  +
  +
// Process player keystrokes
  +
HandleActionKeys()
  +
  +
// Animate the objects that can be "picked up" by the player
  +
AnimateObjects()
  +
  +
// Calculate the Frames Per Second value that is displayed in the Scoreboard
  +
If startTime <= nextFPSFlip Then
  +
frameCounter = frameCounter + 1
  +
Else
  +
framesPerSecond = frameCounter
  +
frameCounter = 0
  +
nextFPSFlip = endTime + 1000
  +
End If
  +
  +
End If
  +
  +
End If
  +
  +
// Send all changes to the screen().
  +
RefreshScreen()
  +
  +
// Keep track of the amount of time it took to draw this frame, as this value
  +
// is used to determine the amount of movement for the various animation calculations.
  +
endTime = TickCount()
  +
frameDrawTime = (endTime - startTime) * 0.001
  +
  +
End While
  +
  +
End Method
  +
  +
End Program
  +
  +
'''Fer''' :]

Revisión del 11:55 23 may 2008

He cambiado el texto (demasiado parecido al de la wikipedia) por su versión frikipédica. Creo que en general deben tener preferencia los artículos preexistentes en Inciclopedia sobre los refugiados, pero es que este no era una maravilla, y me parece mejor el Friki-. No obstante está aquí el texto que tenía antes:


Pedo

Mezcla de gases producida por bacterias y levaduras simbióticas que viven en el tracto gastrointestinal de los mamíferos y de partículas aerosolizadas de excrementos, que se expulsa por el aniceto con un sonido y olor asquerosos e inevitables.

Una vez expelida del organismo, se dice, la ventosidad recibe el nombre de pedo, y la acción que produce su expulsión, se le llama tirarse (o echarse) un pedo, o simplemente pedorrearse. Sin embargo, muchas personas consideran estos términos ofensivos y emplean otras alternativas eufemísticas, ridiculas y faltas de realidad para referirse a ellos como pun, pluma, aire, gas, gasecillo, flatulencia involuntaria, brisa de la mañana, tramontana violenta o suspiro del diablo.

Otros animales, como aves, peces e insectos también tienen flatulencias.

Una de las flatulencias mas poderosas fue registrada el dia en que goku de dragon ball GT elevo su ki en 5555367869 terawatts de potencia, en el momento preciso en que practicaba su transformacion de supersayayin fase 8, despues de haber ingerido una coca-cola jumbo de 2.5 litros, unos tamalitos de frijoles y cebolla, un kilo de guash, sopa de lentejas con soya y habas, asi como de postre una bolsa de papas con caducidad de un mes antes.

(cinco mil quinientos cincuenta y cinco billones, tres cientos sesenta y siete mil, ocho cientos sesenta y nueve, para los nacos ignorantes que no pudieron leer la cifra).



Creo que el texto que he puesto es más sencillo y más gracioso. Además fue ampliado durante dos meses, incluso recoge expresiones hispanoamericanas. Si pensáis que mejor dejar el texto de aquí arriba, se copia y pega en el artículo. Y si es momento de perculizarlo, pues se borra esto de aquí arriba y en paz. Paso a formatear el texto de Pedo --Anxova 20:37 2 mar, 2006 (UTC)

Petición de aclaración sobre "pedo"

¿Es cierto que el citado pedo de goku, de tropecientosmillones de pedowattios, es suficiente para romper la estructura transdimensional del espacio-tiempo y crear un gran bujero negro, del cual ningun olor puede escapar?

Nuestros científicos lo están estudiando, dentro de unos días tendremos los resultados y se los mandaremos a su casa.--Gol D Roger.gif TDI(Cuénteme su vida) Fábrica 1 y 2 WIKI MITOLOGÍA 21:41 9 ago 2007 (UTC)

Canción con audio y todo

Enlazo a una canción bastante graciosa sobre el tema, a ver que opinan, un saludo--Mr.Hanta 02:20 14 dic 2007 (UTC)



Mora, esto es para ti:

Program Scrolling

Structure GameSprite IsVisible As Bool SpriteName As String X As Decimal Y As Decimal Speed As Decimal End Structure

Define Objects As GameSprite[10]

Define BackgroundTileName As String = "Background" Define BackgroundScrollIncrementY As Int = 1 Define BackgroundScrollIncrementX As Int = 10 Define BackgroundScrollTimer As Decimal = 0 Define IsScrollingEnabled As Bool = True Define IsGamePaused As Bool = False

Define TileOffsetX As Int = 0 Define TileOffsetY As Int = 0

Define TileWidth As Int Define TileHeight As Int

Define GameWidth As Int = 640 Define GameHeight As Int = 500

Define ArañaSpeed As Decimal = 300 Define ArañaX As Decimal Define ArañaY As Decimal

Define PlayerScore As Int = 0 Define ObjectsMissed As Int = 0

Define frameDrawTime As Decimal = 1.0 Define frameCounter As Int = 0 Define framesPerSecond As Int = 0 Define nextFPSFlip As Decimal Define engineSound As Decimal

/****************************************************************** This function is used by all of the areas in the program that perform animation, to convert an animation speed, which is defined as the desired number of pixels per second to move, into the number of pixels to move during the current frame.

For instance, ArañaSpeed is defined as how many pixels per second the player's Araña is capable of moving. By figuring out how much time the last frame took to be drawn, we can determine how many pixels to move the player's Araña during the current frame.

This allows the game objects to move at roughly the same speed on both faster and slower computers, although on slower computers which take longer to draw individual frames the amount of movement per frame will be higher, and the animations will be a little choppier. This is why on very slow computers it may look like the animation is "dropping frames", since the Araña moves in bigger increments to compensate for the slow frame rate. *******************************************************************/ // Adjusts a desired "pixels per second" value according to the current // frame rate. Function AdjustForFrameRate( AmountPerSecond As Decimal ) As Decimal Return Min( 5, AmountPerSecond * frameDrawTime ) End Function

// Scrolls the background of the game to provide a sensation of movement Method ScrollDown()

// Scroll the background ScrollBackground( 0, 50, GameWidth, GameHeight + BackgroundScrollIncrementY - 50, 0, BackgroundScrollIncrementY ) CopyRect( 0, GameHeight, GameWidth, BackgroundScrollIncrementY, 0, 50 )

End Method

// Check for pressed keys and take action based on what keys the user is pressing Method HandleActionKeys()

If IsKeyDown("Right") Then If ArañaX < GameWidth - GetSpriteWidth( "Araña" ) - 10 Then ArañaX = ArañaX + AdjustForFrameRate( ArañaSpeed ) End If End If

If IsKeyDown("Left") Then If ArañaX > 10 Then ArañaX = ArañaX - AdjustForFrameRate( ArañaSpeed ) End If End If

If IsKeyDown("Up") Then If ArañaY > 70 Then ArañaY = ArañaY - AdjustForFrameRate( ArañaSpeed ) End If End If

If IsKeyDown("Down") Then If ArañaY < GameHeight - GetSpriteHeight( "Araña" ) - 10 Then ArañaY = ArañaY + AdjustForFrameRate( ArañaSpeed ) End If End If

MoveSpriteToPoint( "Araña", ArañaX, ArañaY )

End Method

Method Print3D( Text As String )

Color( White ) PrintLine( Text ) MoveBy( -1, -18 ) Color( Black ) PrintLine( Text ) MoveBy( 1, 0 )

End Method

Function CalculateSuccessRatio() As Decimal

// Convert the PlayerScore and ObjectsMissed variables to Decimal types // so that we can get accurate percentages Define objectsPlayerGot As Decimal = PlayerScore * 1.0 Define objectsPlayerMissed As Decimal = ObjectsMissed * 1.0 Define totalObjects As Decimal = objectsPlayerGot + objectsPlayerMissed

// If the player has yet to get or miss any objects, return 0.0 now so that // we don't get a Divide By Zero error below If totalObjects < 1.0 Then Return 0.0 End If

// Calculate the success ratio. Remember that although we don't have parenthesis // around the multiplication calculation below, the standard order of operations // forces the multiplication to happen before the subtraction. Define ratio As Decimal = (objectsPlayerGot / totalObjects) * 100.0

// We don't want to return a value less than zero If ratio < 0.0 Then ratio = 0.0 End If

Return ratio

End Function

// Draws the section at the top of the screen that shows the player score, etc. Method DrawScoreboard()

Pen( Off )

MoveTo( 5, 5 ) StampSprite( "Scoreboard" )

SetFont( "Verdana", 10, True, False, False )

Print3D( "Niños Capturados: " + PlayerScore )

Define totalSeconds As Int = TickCount() / 1000 Define gameMinutes As Int = totalSeconds / 60 Define gameSeconds As Int = totalSeconds Mod 60

Print3D( "Tiempo: " + FormatString( "00", gameMinutes ) + ":" + FormatString( "00", gameSeconds ) )

MoveTo( 170, 5 ) Print3D( "Niños Escapados: " + ObjectsMissed )


If IsGamePaused Then Print3D( "Juego Pausado" ) End If


End Method

// Animates the game objects that can be "picked up" by the player Method AnimateObjects()

Define Current As GameSprite

Define I As Int For I = 1 To ArrayLength( Objects )

Current = Objects[i] If Current.IsVisible And Current.Y < GameHeight Then

Current.Y = Current.Y + AdjustForFrameRate( Current.Speed )

If SpritesIntersect( Current.SpriteName, "Araña" ) Then

HideSprite( Current.SpriteName ) Current.IsVisible = False

PlayerScore = PlayerScore + 1

// This may be a bad assumption, but.... // // It is assumed that if scrolling is disabled, it is for // performance reasons, and therefore sounds are disabled as // well. If you do not like this assumption, remove the // surrounding If..Then..EndIf from the following PlaySound() // calls. If IsScrollingEnabled Then

If PlayerScore Mod 50 = 0 Then Alert("¡Has capturado 50 niños!","Felicidades") PlaySound( "PowerUp2.wav" ) Else PlaySound( "PowerUp3.wav" ) End If

If PlayerScore Mod 200 = 0 Then Alert("¡Has capturado 200 niños, te has pasado el juego!", "Felicidades")


End If

engineSound = TickCount()

End If

End If

Else

// If the object's IsVisible flag is still set to TRUE, then we // know that the player just missed it If Current.IsVisible Then ObjectsMissed = ObjectsMissed + 1 End If

Current.Y = -50 * I Current.X = Random( 50, GameWidth - 50 ) Current.Speed = Random( 10, 200 ) + PlayerScore Mod 200 Current.IsVisible = True

If Current.SpriteName = "" Then Current.SpriteName = "Sprite" + I LoadSprite( Current.SpriteName, "macaulay.jpg" ) ScaleSprite( Current.SpriteName, 0.7 ) End If

End If

MoveSpriteToPoint( Current.SpriteName, Current.X, Current.Y ) ShowSprite( Current.SpriteName )

Next

End Method

// Handle non-action keys like "Pause", "Scrolling", "Help", etc. Method HandleAdminKeys()

Define key As String = GetKey()

If Key = "m" Then IsGamePaused = Not IsGamePaused End If

If Key = "S" Then IsScrollingEnabled = Not IsScrollingEnabled End If

End Method

// Determines roughly how many screen refreshes per second the user's // computer is capable of displaying Function CheckRefreshRate() As Int

// Let the user know that we are doing something Status( "Testing your refresh rate" )

// This is the TickCount() value that we check against to see if we // are done testing the frame count. Here, we are saying that we // want to perform the test for 500 milliseconds, which is a half // of a second (1 second = 1000 milliseconds). It would be more // accurate to check for a full second, but we don't want to make // the user wait quite that long ;) Define endTime As Decimal = TickCount() + 500

// This is the estimate number of frames per second that can be // displayed by the user's computer Define refreshCount As Int = 0 While TickCount() < endTime

// Clearing the screen and calling RefreshScreen() forces KPL to // redraw the entire screen, which will typically be the slowest // operation in this game, and is therefore a good indicator of // the kinds of refresh rates we can achieve in worst-case. Clear( Black ) RefreshScreen()

// Keep track of the number of times through this loop so that // we know how many frames were shown. refreshCount = refreshCount + 1

End While

// Inform the user of the results Status( "Refresh Rate = " + refreshCount * 2 )

// We multiply the frame count by 2 because we only tested for half // of a second, but we want to return the estimated number of refreshes // per second. Not accurate, but it works well enough for our purposes // without making the user wait for a full second. Return refreshCount * 2

End Function

// The program entry point. This is the first method to be run. Method Main()

Clear(Blue) Alert("Eres Michael Jackson, y Macauly se ha quedado solo en casa", "¡A por él!")

SetDeviceCoordinates()

// Check to see if the user's computer is fast enough to enable scrolling by default IsScrollingEnabled = CheckRefreshRate() >= 15

LoadSprite( BackgroundTileName, "cementerio_pordiosero.jpg" ) TileSprite( BackgroundTileName, 0, 0, GameWidth, GameHeight, 0, 0 )

LoadSprite( "Araña", "jackson4.jpg" ) RotateSprite( "Araña", 0 ) ScaleSprite( "Araña", 0.7 ) MoveSpriteToPoint( "Araña", (GameWidth - GetSpriteWidth("Araña")) / 2, GameHeight - GetSpriteHeight("Araña") * 2 ) ShowSprite( "Araña" )

ArañaX = GetSpriteLeft( "Araña" ) ArañaY = GetSpriteTop( "Araña" )

LoadSprite( "Scoreboard", "Billboard.png" )

TileWidth = GetSpriteWidth( BackgroundTileName ) TileHeight = GetSpriteHeight( BackgroundTileName )

Define startTime As Decimal Define endTime As Decimal

// Print some instructions for the player in the status bar Status( "M - Pausar el Juego, Flechas - Mover araña" )

TileOffsetY = TileHeight - 1

// Set a clipping region for sprites that does not allow them to // be drawn on top of the Scoreboard SetSpriteClip( 0, 50, GameWidth, GameHeight - 50 )

While True

BeginFrame()

startTime = TickCount()

If startTime - engineSound > 375 And IsScrollingEnabled Then engineSound = startTime // Someday I will find a good background sound ;) PlaySound( "" ) End If

// As the slowest graphics operations in the game, we want // to scroll the background and draw the Scoreboard only as // often as necessary. // // The following code only performs those operations every // 50 milliseconds, or about a maximum of 20 times per second. // // In practice, only fast machines will be able to reach // the maximum rate. If startTime - BackgroundScrollTimer > 50 Then

DrawScoreboard()

If IsScrollingEnabled And Not IsGamePaused Then ScrollDown() End If

BackgroundScrollTimer = startTime

Else

// Handle non-action keys like "Pause" and "Scrolling" HandleAdminKeys()

If Not IsGamePaused Then

// Process player keystrokes HandleActionKeys()

// Animate the objects that can be "picked up" by the player AnimateObjects()

// Calculate the Frames Per Second value that is displayed in the Scoreboard If startTime <= nextFPSFlip Then frameCounter = frameCounter + 1 Else framesPerSecond = frameCounter frameCounter = 0 nextFPSFlip = endTime + 1000 End If

End If

End If

// Send all changes to the screen(). RefreshScreen()

// Keep track of the amount of time it took to draw this frame, as this value // is used to determine the amount of movement for the various animation calculations. endTime = TickCount() frameDrawTime = (endTime - startTime) * 0.001

End While

End Method

End Program

Fer :]