Autor Beitrag
axlegolas
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 42

WIN 2000, WIN XP
D 6,D 2006, C#
BeitragVerfasst: Do 28.12.06 19:50 
hallo zusammen.

habe zur zeit ein kleines logisches (?) problem: ich möchte gerne eine 2d-karte erstellen.die karte setzt sich jedoch dynamisch aus verschiedenen (geländetypen) sechsecken zusammen.wenn ich diese karte nun erzeuge,muß das erste sechseck wissen (?) welches sechseck als nächstes kommen darf.zum schluß soll eben dadurch eine 2d-karte entstehen.kann mir jemand bei der realisierung helfen?gibt es noch eine andere möglichkeit eine karte dynamisch zu erstellen?

die verschiedenen geländetypen sind vom Typ TObjekt und ich hatte versucht diese in einem dynam. array anzulegen.aber meine objekte müssen intelligent sein (ähnlich wie memory).

hoffe ihr könnt mir helfen...

danke schonmal
jakobwenzel
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1889
Erhaltene Danke: 1

XP home, ubuntu
BDS 2006 Prof
BeitragVerfasst: Do 28.12.06 20:44 
Ich versteh dein Prob nich wirklich: Einfach ne 2dimensionale For-Schleife und die Objekte erstellen!

_________________
I thought what I'd do was, I'd pretend I was one of those deaf-mutes.
axlegolas Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 42

WIN 2000, WIN XP
D 6,D 2006, C#
BeitragVerfasst: Do 28.12.06 21:00 
2d-schleife??wie soll die dann aussehen??das puzzle soll zum schluß eine 2d-karte darstellen mit tiles auf die man klicken kann.
jakobwenzel
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1889
Erhaltene Danke: 1

XP home, ubuntu
BDS 2006 Prof
BeitragVerfasst: Do 28.12.06 21:27 
ich mein einfach ne geschachtelte for-Schleife:
ausblenden Delphi-Quelltext
1:
2:
3:
for x:=0 to width-1 do //0 basiert, für dynamische Arrays
  for y:=0 to height-1 do
    map[x,y]:=fooooooooooo;

_________________
I thought what I'd do was, I'd pretend I was one of those deaf-mutes.
axlegolas Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 42

WIN 2000, WIN XP
D 6,D 2006, C#
BeitragVerfasst: Do 28.12.06 21:36 
es soll am ende aussehen wie 'Civilisation II'
axlegolas Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 42

WIN 2000, WIN XP
D 6,D 2006, C#
BeitragVerfasst: Do 28.12.06 22:12 
mein problem liegt beim anzeigen des arrays.wie wird das ganze dann dargestellt??
Narses
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Administrator
Beiträge: 10185
Erhaltene Danke: 1261

W11x64
TP3 .. D7pro .. D10.2CE
BeitragVerfasst: Do 28.12.06 22:37 
Moin!

Was ist denn nun eigentlich dein Problem... :gruebel: Kriegst du die Generierung der Karte nicht hin (logisch) oder die Sechsecke nicht gemalt? :nixweiss: Irgendwie blicke ich durch deine Postings nicht mehr durch. :?

cu
Narses

_________________
There are 10 types of people - those who understand binary and those who don´t.
axlegolas Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 42

WIN 2000, WIN XP
D 6,D 2006, C#
BeitragVerfasst: Fr 29.12.06 01:35 
sorry wenn ich mich so unkenntlich ausdrücke...ich bekomme das array nicht gemalt.wie mache ich das?
axlegolas Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 42

WIN 2000, WIN XP
D 6,D 2006, C#
BeitragVerfasst: Fr 29.12.06 01:36 
wie male ich die karte aus dem array der sechsecke (optische darstellung!!).
Narses
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Administrator
Beiträge: 10185
Erhaltene Danke: 1261

W11x64
TP3 .. D7pro .. D10.2CE
BeitragVerfasst: Fr 29.12.06 01:48 
Moin!

Wie liegen denn die Grafiken vor?

cu
Narses

_________________
There are 10 types of people - those who understand binary and those who don´t.
Coder
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 1383
Erhaltene Danke: 1

WinXP
D2005 PE
BeitragVerfasst: Fr 29.12.06 01:55 
Für Spiele eignet sich OpenGL.
Darin solltest du dich erstmal einarbeiten.
Es lassen sich auch 2D Spiele damit programmieren.
www.delphigl.com
wiki.delphigl.com/index.php/Tutorial
Im Forum findest du auch noch andere Links.

MfG
Phobeus
ontopic starontopic starhalf ontopic starofftopic starofftopic starofftopic starofftopic starofftopic star
Beiträge: 1280

Linux (FC6), WinXP Pro (Box)
D6 Pers, D7 Pro, FPC 2.x
BeitragVerfasst: Fr 29.12.06 09:09 
Und bei genauerer Suche, wirst Du auch im Wiki einen Artikel zu diesem Thema finden:
wiki.delphigl.com/index.php/Hexfeld

_________________
"Menschen sterben nicht wenn man sie zu Grabe trägt, sondern wenn sie ihre Träume verlieren..."
axlegolas Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 42

WIN 2000, WIN XP
D 6,D 2006, C#
BeitragVerfasst: Fr 19.01.07 09:59 
vielen dank für eure bemühungen und die links, haben mir sehr geholfen...
Ironwulf
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 733
Erhaltene Danke: 2



BeitragVerfasst: Sa 20.01.07 04:16 
user profile iconaxlegolas hat folgendes geschrieben:
es soll am ende aussehen wie 'Civilisation II'


Civ 2 wird mit Quadraten gespielt die um 45 grad gedreht sind (Pseudo 3D) da gibts keine sechsecke ;D
marconist
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 25

xp sp2
D5 pers
BeitragVerfasst: So 28.01.07 20:43 
Bei Sechsecken ist jede zweite Reihe versetzt, also brauchst du drei Schleifen verschachtelt. Was dein Problem dabei ist, das ist nicht so klar geworden.

srs,
marconist
GTA-Place
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
EE-Regisseur
Beiträge: 5248
Erhaltene Danke: 2

WIN XP, IE 7, FF 2.0
Delphi 7, Lazarus
BeitragVerfasst: So 28.01.07 21:44 
user profile iconIronwulf hat folgendes geschrieben:
user profile iconaxlegolas hat folgendes geschrieben:
es soll am ende aussehen wie 'Civilisation II'


Civ 2 wird mit Quadraten gespielt die um 45 grad gedreht sind (Pseudo 3D) da gibts keine sechsecke ;D

Das sind dann "Diamonds" und das ganze nennt sich Isometrie.

user defined image

_________________
"Wer Ego-Shooter Killerspiele nennt, muss konsequenterweise jeden Horrorstreifen als Killerfilm bezeichnen." (Zeit.de)