Creando tiles y escenarios

This commit is contained in:
2022-10-10 22:14:25 +02:00
parent 41d72d48d5
commit f6a233546e
14 changed files with 215 additions and 81 deletions

View File

@@ -0,0 +1,9 @@
frameWidth=16
frameHeight=16
[animation]
name=default
speed=8
loop=0
frames=0,1,2,3
[/animation]

BIN
data/enemies/dimallas_v.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 285 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 707 B

After

Width:  |  Height:  |  Size: 892 B

View File

@@ -8,6 +8,8 @@ roomDown=0
roomLeft=02.room
roomRight=0
autoSurface=left
itemColor1=bright_cyan
itemColor2=yellow
[enemy]
tileset=bin.png

View File

@@ -17,7 +17,7 @@
25,25,0,0,0,0,0,0,0,0,0,0,0,0,0,0,505,0,0,0,0,0,0,0,25,0,0,0,0,0,25,25,
25,25,0,0,0,0,0,0,0,253,253,253,253,253,253,253,0,0,0,0,0,0,0,0,0,0,0,0,0,0,25,25,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,25,25,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,473,473,473,473,0,0,0,0,0,0,0,0,25,25,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,441,441,441,441,0,0,0,0,0,0,0,0,25,25,
25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25
</data>
</layer>

View File

@@ -1,16 +1,19 @@
name=no 55
name=that's a guitar
bgColor=black
border=red
border=black
tilemap=55.tmx
tileset=standard.png
roomUp=0
roomDown=0
roomLeft=54.room
roomRight=56.room
itemColor1=yellow
itemColor2=red
autoSurface=left
[enemy]
tileset=diskette.png
animation=diskette.ani
tileset=heavy.png
animation=heavy.ani
width=16
height=16
x=2
@@ -26,7 +29,7 @@ color=magenta
[item]
tileset=items.png
tile=1
tile=33
x=1
y=1
counter=1

View File

@@ -3,22 +3,22 @@
<tileset firstgid="1" source="standard.tsx"/>
<layer id="1" name="Capa de patrones 1" width="32" height="16">
<data encoding="csv">
25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,134,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,134,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,134,
0,0,0,523,302,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,134,
0,0,523,0,0,0,0,0,302,0,0,0,0,302,0,0,0,0,302,0,0,0,0,302,0,0,0,0,0,0,0,134,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,134,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,433,0,0,0,134,
0,0,0,0,0,0,0,0,326,0,0,0,0,326,0,0,0,0,326,0,0,0,0,326,0,0,0,0,0,0,0,134,
16,16,16,16,538,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,134,
16,16,16,16,16,538,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
16,16,16,16,16,16,538,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
349,349,349,349,349,349,349,349,349,349,349,349,349,349,349,349,349,349,349,349,349,349,349,349,349,349,349,349,349,349,349,349
</data>
</layer>
</map>

View File

@@ -1,33 +1,76 @@
name=no 56
name=heavy demons on leggins
bgColor=black
border=red
border=black
tilemap=56.tmx
tileset=standard.png
roomUp=0
roomDown=0
roomLeft=55.room
roomRight=57.room
itemColor1=bright_red
itemColor2=green
autoSurface=left
[enemy]
tileset=diskette.png
animation=diskette.ani
tileset=demon.png
animation=demon.ani
width=16
height=16
x=2
y=2
x=12
y=3
vx=0
vy=0
x1=2
y1=2
x2=2
y2=2
color=magenta
vy=0.5
x1=12
y1=3
x2=12
y2=12
color=red
[/enemy]
[enemy]
tileset=demon.png
animation=demon.ani
width=16
height=16
x=18
y=5
vx=0
vy=0.5
x1=18
y1=3
x2=18
y2=12
color=red
[/enemy]
[item]
tileset=items.png
tile=1
x=1
y=1
tile=28
x=15
y=10
counter=1
[/item]
[item]
tileset=items.png
tile=28
x=16
y=10
counter=2
[/item]
[item]
tileset=items.png
tile=28
x=15
y=5
counter=3
[/item]
[item]
tileset=items.png
tile=28
x=16
y=5
counter=4
[/item]

View File

@@ -3,22 +3,22 @@
<tileset firstgid="1" source="standard.tsx"/>
<layer id="1" name="Capa de patrones 1" width="32" height="16">
<data encoding="csv">
25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,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0,0,0,0,18,
0,0,0,0,0,0,520,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,544,0,0,0,0,0,0,
0,0,0,0,0,520,555,555,555,555,555,555,555,555,555,555,555,555,555,555,555,555,555,555,555,555,544,0,0,0,0,0,
18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18
</data>
</layer>
</map>

View File

@@ -1,33 +1,100 @@
name=no 57
bgColor=black
border=red
name=jailgames go to hell
bgColor=red
border=bright_red
tilemap=57.tmx
tileset=standard.png
roomUp=0
roomDown=0
roomLeft=56.room
roomRight=58.room
itemColor1=yellow
itemColor2=green
autoSurface=left
[enemy]
tileset=diskette.png
animation=diskette.ani
tileset=dimallas.png
animation=dimallas.ani
width=16
height=16
x=2
y=2
vx=0
x=13
y=13
vx=0.5
vy=0
x1=2
y1=2
x2=2
y2=2
color=magenta
x1=6
y1=13
x2=20
y2=13
color=green
[/enemy]
[enemy]
tileset=dimallas_v.png
animation=dimallas_v.ani
width=16
height=16
x=17
y=5
vx=0
vy=0.5
x1=17
y1=5
x2=17
y2=11
color=white
[/enemy]
[enemy]
tileset=dimallas_v.png
animation=dimallas_v.ani
width=16
height=16
x=10
y=8
vx=0
vy=0.5
x1=10
y1=5
x2=10
y2=11
color=yellow
[/enemy]
[item]
tileset=items.png
tile=1
x=1
y=1
tile=32
x=7
y=8
counter=1
[/item]
[item]
tileset=items.png
tile=32
x=14
y=8
counter=2
[/item]
[item]
tileset=items.png
tile=32
x=21
y=8
counter=3
[/item]
[item]
tileset=items.png
tile=32
x=9
y=14
counter=4
[/item]
[item]
tileset=items.png
tile=32
x=19
y=14
counter=5
[/item]

View File

@@ -3,22 +3,22 @@
<tileset firstgid="1" source="standard.tsx"/>
<layer id="1" name="Capa de patrones 1" width="32" height="16">
<data encoding="csv">
25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,
19,0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0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25
0,0,525,19,549,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,525,19,549,0,0,0,0,0,0,
19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19
</data>
</layer>
</map>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.6 KiB

After

Width:  |  Height:  |  Size: 5.9 KiB

View File

@@ -519,6 +519,16 @@ bool Director::setFileList()
asset->add("/data/enemies/jailer3.ani", data);
asset->add("/data/enemies/printer.png", bitmap);
asset->add("/data/enemies/printer.ani", data);
asset->add("/data/enemies/code.png", bitmap);
asset->add("/data/enemies/code.ani", data);
asset->add("/data/enemies/demon.png", bitmap);
asset->add("/data/enemies/demon.ani", data);
asset->add("/data/enemies/dimallas.png", bitmap);
asset->add("/data/enemies/dimallas.ani", data);
asset->add("/data/enemies/dimallas_v.png", bitmap);
asset->add("/data/enemies/dimallas_v.ani", data);
asset->add("/data/enemies/heavy.png", bitmap);
asset->add("/data/enemies/heavy.ani", data);
asset->add("/data/player/player.png", bitmap);
asset->add("/data/player/player.ani", data);

View File

@@ -24,10 +24,10 @@ Game::Game(SDL_Renderer *renderer, Screen *screen, Asset *asset, Input *input, D
// currentRoom = "06.room";
// spawnPoint = {14 * 8, 9 * 8, 0, 0, 0, s_standing, SDL_FLIP_HORIZONTAL};
// currentRoom = "60.room";
// const int x = 16;
// const int y = 13;
// spawnPoint = {x * 8, y * 8, 0, 0, 0, s_standing, SDL_FLIP_HORIZONTAL};
currentRoom = "57.room";
const int x = 30;
const int y = 13;
spawnPoint = {x * 8, y * 8, 0, 0, 0, s_standing, SDL_FLIP_HORIZONTAL};
// ****
// Crea los objetos
@@ -390,7 +390,7 @@ void Game::killPlayer()
return;
}
board.lives--;
//board.lives--;
// Destruye la habitacion y el jugador
delete room;