CS2D steuerung

Übersicht BlitzBasic Beginners-Corner

Neue Antwort erstellen

Progger93

Betreff: CS2D steuerung

BeitragDo, Jun 28, 2007 17:09
Antworten mit Zitat
Benutzer-Profile anzeigen
Ich hab ein Problem:
Ich hab eine 2D Tilemap und brauche jetzt die Steuerung.
Ich hätte gern so eine wie in CS2D also schräg laufen und nicht immer ein ganzes Tile laufen, aber ich weiß nicht wie man so etwas macht.

das is der Code den ich bisher hingekriegt habe:

Code: [AUSKLAPPEN]


;_____________________Bewegungsrutinen für die einzelnen pfeil-tasten________________________________


;rechs-taste
If KeyDown(205)
   If map(px+1,py) < 6 Then 
    scrollx = scrollx + 2
    ppx = ppx + 2
    xr = xr + 1
    If xr = 16 Then px = px + 1:xr = 0
   End If
End If

;links-taste
If KeyDown(203)
   If map(px-1,py) < 6 Then 
    scrollx = scrollx - 2
    ppx = ppx - 2
    xl = xl + 1
    If xl = 16 Then px = px - 1:xl = 0
   End If
End If

;oben-taste
If KeyDown(200) Then

   If map(px,py-1) < 6 Then 
    scrolly = scrolly - 2
    ppy = ppy - 2
    xo = xo - 1
    If xo = 16 Then py = py - 1:xo = 0
   End If
End If
;unten-taste
If KeyDown(208) Then
   If map(px,py+1) < 6 Then 
    scrolly = scrolly + 2
    ppy = ppy + 2
    xo = xo + 1
    If xo = 16 Then py = py + 1:xo = 0
   End If
End If


Wäre schön wenn ihr mir helfen könntet

Schonmal Danke im Vorraus

Progger12

Edit:
Das haupt problem ist die nicht funktionierende Kollision.
  • Zuletzt bearbeitet von Progger93 am Do, Jun 28, 2007 17:18, insgesamt 2-mal bearbeitet
 

ChristianK

BeitragDo, Jun 28, 2007 17:15
Antworten mit Zitat
Benutzer-Profile anzeigen
Such mal nach ATan, Sin, Cos usw.
Hier gibt es ein paar Beiträge zu dem Thema.

D2006

Administrator

BeitragDo, Jun 28, 2007 17:59
Antworten mit Zitat
Benutzer-Profile anzeigen
Schau dir mal das hier an:
http://www.chaos-interactive.de/tuts/winkel.html
Intel Core i5 2500 | 16 GB DDR3 RAM dualchannel | ATI Radeon HD6870 (1024 MB RAM) | Windows 7 Home Premium
Intel Core 2 Duo 2.4 GHz | 2 GB DDR3 RAM dualchannel | Nvidia GeForce 9400M (256 MB shared RAM) | Mac OS X Snow Leopard
Intel Pentium Dual-Core 2.4 GHz | 3 GB DDR2 RAM dualchannel | ATI Radeon HD3850 (1024 MB RAM) | Windows 7 Home Premium
Chaos Interactive :: GoBang :: BB-Poker :: ChaosBreaker :: Hexagon :: ChaosRacer 2

Progger93

Betreff: Problem ist kollision

BeitragDo, Jun 28, 2007 18:17
Antworten mit Zitat
Benutzer-Profile anzeigen
Das problem ist ja gar nicht die Steuerung selbst sondern die Kollision auf einer 2D Tilemap!
MfG Pascal
Win 7|T7250@2.0Ghz|3GB RAM|M8600GT

Neue Antwort erstellen


Übersicht BlitzBasic Beginners-Corner

Gehe zu:

Powered by phpBB © 2001 - 2006, phpBB Group