Español
Juegos

PingPong

 
Nette PingPong-Variant de Volkmar con 4K-kleinem Ver código fuente:

Descargar
externer Descargar



' 4k-Wettbewerb @Volkmar 2013
Declarar Int SX, SY, CX, CY, SW, SL, FL, FO, FW, FH, BX, BY, BRV, BRH, SP, CP, VZ, TI
Título de la ventana "Ping Pong 5"
Ventana de Estilo 24
Ventana 600, 400
CLS 0
Selección aleatoria
FL = 4 : FO = 4
FW = Width(%HWnd, 0) - 2 * FL
FH = Height(%HWnd, 0) - 2 * FO
SW = 2
SL = 30
SX = 4 : CX = FW - (4 + SW)
SY = FO
CY = FO
BX = FW \ 2
BY = 6 + Rnd(FH - 12)
BRH = 1
VZ = 10
MCLS FW, FH, 0
Mensajes del usuario 16

Mientras que %UMessage <> 16

    TI = &gettickcount

    If (SP + CP) < 7

        Malen

    Más

        Ergebnis

    EndIf

    If (CY + 9) > BY

        If BRH

            If BX > ((FW \ 3) * 2)

                Dec CY, 2

            EndIf

        EndIf

    ElseIf CY < (FH - SL)

        If BRH

            If BX > ((FW \ 3) * 2)

                Inc CY, 2

            EndIf

        EndIf

    EndIf

    If IsKey(38)

        If SY > FO

            Dec SY, 2

        EndIf

    ElseIf IsKey(40)

        If SY < (FH - SL)

            Inc SY, 2

        EndIf

    ElseIf IsKey(93) Or IsKey(2)

        Menu

    EndIf

    Mientras que 1

        Case &gettickcount-TI > VZ : BREAK
        Sleep 1

    EndWhile

EndWhile

Proc Menu

    CreateMenu
    AppendMenu 1, "&Langsam"
    AppendMenu 2, "&Mittel"
    AppendMenu 3, "&Schnell"

    If SL > 28

        AppendMenu 8, "Schläger &Klein"

    Más

        AppendMenu 9, "Schläger &groß"

    EndIf

    TrackMenu 0, 0

    If MenuItem(1)

        VZ = 22

    ElseIf MenuItem(2)

        VZ = 16

    ElseIf MenuItem(3)

        VZ = 10

    ElseIf MenuItem(8)

        SL = 20

    ElseIf MenuItem(9)

        SL = 30

    EndIf

ENDPROC

Proc BallCalc

    If BRH

        If (BX > (FW - 13)) And (BY > CY) And (BY < (CY + SL))

            BRH = 0
            Sound 300, 20

        ElseIf BX > FW - 8

            BRH = 0
            Sound 1400, 28
            Inc SP

        Más

            Inc BX, 2

        EndIf

    Más

        If (BX < 11) And (BY > SY) And (BY < (SY + SL))

            BRH = 1
            Sound 300, 20

        ElseIf BX < 6

            BRH = 1
            Sound 1400, 28
            Inc CP

        Más

            Dec BX, 2

        EndIf

    EndIf

    If BRV

        If BY > FH - 8

            BRV = 0
            Sound 1200, 16

        Más

            Inc BY, 2

        EndIf

    Más

        If BY < 7

            BRV = 1
            Sound 1200, 16

        Más

            Dec BY, 2

        EndIf

    EndIf

ENDPROC

Proc Punkte

    UseFont "COURIER NEW", 24, 0, 1, 0, 0
    Color del texto RGB(200, 220, 32), -1
    DrawText (FW \ 2) - 22, 10, (FW \ 2) - 4, 30, Str$(CP), 1
    DrawText (FW \ 2) + 4, 10, (FW \ 2) + 22, 30, Str$(SP), 1

ENDPROC

Proc Ergebnis

    StartPaint -1
    UseBrush 1, 0
    USEP 0, 1, RGB(240, 64, 64)
    Rectángulo 0, 0 - FW, FH
    Line FW \ 2 , 2 - FW \ 2 , FH - 4
    Punkte
    UseFont "ARIAL", 24, 0, 0, 0, 0

    If SP > CP

        Color del texto RGB(0, 255, 48), -1
        DrawText 22, 96, "Du hast gewonnen"

    Más

        Color del texto RGB(255, 96, 0), -1
        DrawText 22, 96, "Du hast verloren"

    EndIf

    EndPaint
    MCopyBMP 0, 0 - FW, FH > FL, FO; 0

ENDPROC

Proc Malen

    BallCalc
    StartPaint -1
    UseBrush 1, 0
    USEP 0, 1, RGB(240, 64, 64)
    Rectángulo 0, 0 - FW, FH
    Line FW \ 2 , 2 - FW \ 2 , FH - 2
    USEP 0, 1, RGB(240, 240, 64)
    Rectángulo SX, SY - SW + SX, SY + SL - 2
    USEP 0, 1, RGB(64, 240, 240)
    Rectángulo CX, CY - CX + SW, CY + SL - 2
    USEP 0, 1, RGB (240, 64, 64)
    UseBrush 1, RGB(240, 64, 64)
    Ellipse BX - 3, (BY - 3) - BX + 8, BY + 8
    Punkte
    EndPaint
    MCopyBMP 0, 0 - FW, FH > FL, FO; 0

ENDPROC


442 kB
Hochgeladen:07.04.2013
Ladeanzahl241
Descargar
6 kB
Hochgeladen:07.04.2013
Ladeanzahl225
Descargar
 
07.04.2013  
 



Zum Spiel


Título del Tema, max. 100 Signo.
 

Systemprofile:

Kein Systemprofil creado. [anlegen]

XProfan:

 Contribución  Font  Smilies  ▼ 

Bitte registro en una Contribución a verfassen.
 

Tema opciones

5.202 Views

Untitledvor 0 min.
Stringray05.01.2022
Sven Bader14.07.2021
p.specht09.06.2021
Ernst26.03.2016
Más...

Themeninformationen

Dieses Thema ha 1 subscriber:

iF (1x)


Admins  |  AGB  |  Applications  |  Autores  |  Chat  |  Política de Privacidad  |  Descargar  |  Entrance  |  Ayuda  |  Merchantportal  |  Pie de imprenta  |  Mart  |  Interfaces  |  SDK  |  Services  |  Juegos  |  Búsqueda  |  Support

Ein Projekt aller XProfan, el lo son!


Mi XProfan
Privado Noticias
Eigenes Ablageforum
Temas-Merkliste
Eigene Beiträge
Eigene Temas
Zwischenablage
Cancelar
 Deutsch English Français Español Italia
Traducciones

Política de Privacidad


Wir uso Cookies sólo como Session-Cookies wegen el technischen Notwendigkeit y en uns hay no Cookies de Drittanbietern.

Wenn du hier en unsere Webseite klickst oder navigierst, stimmst du unserer Erfassung de Informationen en unseren Cookies en XProfan.Net a.

Weitere Informationen a unseren Cookies y dazu, como du el Kontrolle darüber behältst, findest du en unserer nachfolgenden Datenschutzerklärung.


einverstandenDatenschutzerklärung
Yo möchte no Cookie