iso und maus

Übersicht BlitzMax, BlitzMax NG Allgemein

Neue Antwort erstellen

Mathias-Kwiatkowski

Betreff: iso und maus

BeitragMo, Mai 03, 2010 0:19
Antworten mit Zitat
Benutzer-Profile anzeigen
hi,
ich habe mein code nun überarbeitet, schaut auch recht gut aus, allerdings bleibt mir die frage, wie kann ich da eine maus einbinden, so das wenn ich über ein tile fahre das er mir das tile auch anzeigt (position) und welches tile, so das ich dieses tile auch ändern könnte wenn ich die linke maustaste betätige.

ansonsten wäre noch cool wenn ich resulantz höre wie ihr den code aufbau findet...

Code: [AUSKLAPPEN]
Graphics 1024, 768, 1
SetMaskColor 255, 0, 255

Global tileset:TImage = LoadAnimImage("isomap.png", 32, 16, 0, 3)
Global MAP:Int[300, 300]
Global Map_X:Int = 0
Global Map_y:Int = 0


For x = 0 To 299
   For y = 0 To 299
      MAP[x, y] = 1
   Next
Next

Repeat
   Cls
   xd:Int = 0
   yd:Int = 0
   For y = 0 To 299
      For x = 0 To 299
         If xd + Map_X > cam_x - 32 And xd + Map_X < cam_x + 1024 + 32 And yd + Map_y > cam_y - 16 And yd + Map_y < cam_y + 768 + 16 Then DrawImage tileset, Map_X + xd, Map_y + yd, MAP[x, y]
         xd:Int = xd:Int + 16
         yd:Int = yd:Int + 8
      Next
      yd:Int = y * 8
      xd:Int = -y * 16
   Next
   
   If KeyDown (KEY_LEFT) Then Map_X = Map_X + 8
   If KeyDown (KEY_RIGHT) Then Map_X = Map_X - 8
   If KeyDown (KEY_UP) Then Map_y = Map_y + 8
   If KeyDown (KEY_DOWN) Then Map_y = Map_y - 8
   Flip
Until KeyDown(KEY_ESCAPE)
End
 

Lion

BeitragMo, Mai 03, 2010 0:21
Antworten mit Zitat
Benutzer-Profile anzeigen
Ich könnte schwören, ich hätte dir da schonmal was gegeben...
Intel Core 2 Quad 4x2.66 ghz - 4gb ddr2 - nvidia GeForce GTX660 2gb
Intel Atom 1x1.83 ghz - 2gb ddr2 - intel GMA 3150 256mb
AMD A10-5750M 4x2.5 ghz - 8 gb ddr4 - AMD R9 M290x

Xeres

Moderator

BeitragMo, Mai 03, 2010 0:26
Antworten mit Zitat
Benutzer-Profile anzeigen
Gewöhn' dir lieber gleich an mit (Super)Strict zu arbeiten.
Win10 Prof.(x64)/Ubuntu 16.04|CPU 4x3Ghz (Intel i5-4590S)|RAM 8 GB|GeForce GTX 960
Wie man Fragen richtig stellt || "Es geht nicht" || Video-Tutorial: Sinus & Cosinus
T
HERE IS NO FAIR. THERE IS NO JUSTICE. THERE IS JUST ME. (Death, Discworld)
 

Macintosh

BeitragMo, Mai 03, 2010 17:47
Antworten mit Zitat
Benutzer-Profile anzeigen
Da gabs/gibts nen tutorial zu..: https://www.blitzforum.de/foru...hp?t=33499
Leider fehlen die bilder.. :(

Neue Antwort erstellen


Übersicht BlitzMax, BlitzMax NG Allgemein

Gehe zu:

Powered by phpBB © 2001 - 2006, phpBB Group