zerstörbares terrain

Übersicht BlitzBasic Allgemein

Neue Antwort erstellen

ChrisAttack

Betreff: zerstörbares terrain

BeitragDo, Jul 08, 2004 20:30
Antworten mit Zitat
Benutzer-Profile anzeigen
hi
ihr kennt doch bestimmt spiele wie canon hill oder worms, in denen man das terrain zerstören muss. wie bekommt man sowas hin?
B3D
MSVC++
DX9SDK

stfighter01

BeitragDo, Jul 08, 2004 20:34
Antworten mit Zitat
Benutzer-Profile anzeigen
bei worms glaub ich ist die welt ein grosses image.
und rund um die aufschlagstelle werden die pixel einfach auf transparent gesetzt.

mfg stfighter
Denken hilft!
 

Dreamora

BeitragDo, Jul 08, 2004 20:36
Antworten mit Zitat
Benutzer-Profile anzeigen
Kommt draufan ... das neue Clonk verwendet dazu 3D sprites und manipuliert da auf den Texturen rum, da es dann Hardware beschleunigt ist.
Ihr findet die aktuellen Projekte unter Gayasoft und könnt mich unter @gayasoft auf Twitter erreichen.

ChrisAttack

BeitragDo, Jul 08, 2004 20:46
Antworten mit Zitat
Benutzer-Profile anzeigen
danke für die vorschläge
B3D
MSVC++
DX9SDK

Mr.Keks

BeitragFr, Jul 09, 2004 8:51
Antworten mit Zitat
Benutzer-Profile anzeigen
http://www.inarie.art-fx.org/s...index.html
MrKeks.net

ChrisAttack

BeitragFr, Jul 09, 2004 13:35
Antworten mit Zitat
Benutzer-Profile anzeigen
super! DANKE !!! Very Happy
B3D
MSVC++
DX9SDK
 

cavebird

BeitragDi, Okt 12, 2004 14:28
Antworten mit Zitat
Benutzer-Profile anzeigen
Inarie dein Link funzt aber nicht. Mach mal bitte richtig.
MegaUpload.de -- Uploade bis zu 2MB pro Bild !!DEIN PARTNER IN SACHEN UPLOAD --bitte weiterempfehlen, nur so können wir bekannt werden...

Mr.Keks

BeitragDi, Okt 12, 2004 15:55
Antworten mit Zitat
Benutzer-Profile anzeigen
dazu hast du diesen thread ausgegraben? Rolling Eyes

http://www.inarie.art-fx.org/o...index.html
MrKeks.net

Mattis_the_brain

BeitragDi, Okt 12, 2004 20:14
Antworten mit Zitat
Benutzer-Profile anzeigen
Noch null optemiert aber es geht^^
Code: [AUSKLAPPEN]

Global GFX_Rx, GFX_Ry
GFX_Rx = 1024
GFX_Ry = 768

Graphics(GFX_Rx, GFX_Ry, 32, 1)

Dim HighMap#(GFX_Rx)
For x = 0 To GFX_Rx
   HighMap(x) = 50
Next

Global MousePosX, MousePosY
Global MouseKey1, MouseKey2

Global Radius = 80

SetBuffer(BackBuffer())
While(KeyHit(1) = False)
   
   ClsColor(119, 164, 177)
   Cls
   
   Color(100, 100, 255)
   Rect(0, GFX_Ry - 200, GFX_Rx, 200, 1)
   
   For x = 0 To GFX_Rx
      Color(128, 128, 128)
      Line(x, GFX_Ry, x, GFX_Ry - HighMap(x))
      If(HighMap(x) > 200) Color(100, 200, 0)
      If(HighMap(x) > 500) Color(255, 255, 255)
      Line(x, GFX_Ry - HighMap(x) + 10, x, GFX_Ry - HighMap(x))
      If(MouseDown(1))
         If(x > MousePosX - Radius / 2)
            If(x < MousePosX + Radius / 2)
               AngleAlpha# = x - MousePosX + Radius
               HighMap(x) =  HighMap(x) - Cos((AngleAlpha# / Radius) * 180) * 10
            EndIf
         EndIf
      EndIf
      If(MouseDown(2))
         HighMap(MousePosX) = 300
      EndIf
   Next
   
   If(KeyHit(64)) Load()
   If(KeyHit(63)) Save()
   
   UpdateMouse()
   
   Flip(False)
Wend
End

Function Save()
   file = WriteFile("maps/map1.map")
   For x = 0 To GFX_Rx
      WriteShort(file, HighMap(x))
   Next
   CloseFile(file)
End Function

Function Load()
   file = ReadFile("maps/map1.map")
   For x = 0 To GFX_Rx
      HighMap(x) = ReadShort(file)
   Next
   CloseFile(file)
End Function

Function UpdateMouse()
   MousePosX = MouseX()
   MousePosY = MouseY()
   MouseKey1 = MouseHit(1)
   MouseKey2 = MouseHit(2)
   
   Line(MousePosX - 10, MousePosY, MousePosX + 10, MousePosY)
   Line(MousePosX, MousePosY - 10, MousePosX, MousePosY + 10)
   
   Plot(MousePosX - Radius / 2, MousePosY)
   Plot(MousePosX + Radius / 2, MousePosY)
End Function


Ach um wenn die Berge aus dem Wasser kommen wächst Gras drauf und wenn sie ganz hoch werden dann kommt Schnee^^

Neue Antwort erstellen


Übersicht BlitzBasic Allgemein

Gehe zu:

Powered by phpBB © 2001 - 2006, phpBB Group