Skip to content

Commit

Permalink
Distribucion niveles
Browse files Browse the repository at this point in the history
  • Loading branch information
JuanchiNogueira committed Nov 6, 2024
1 parent 01e7b01 commit 7ab3016
Show file tree
Hide file tree
Showing 13 changed files with 4,195 additions and 26 deletions.
Binary file added assets/reja1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/reja2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/reja3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
45 changes: 37 additions & 8 deletions bicho.wlk
Original file line number Diff line number Diff line change
Expand Up @@ -3,35 +3,64 @@ import isaac.*
import nivel.*
import obstaculos.*


class Enemigo{

var subiendo = true
var horizontal = true
var property moverse = true
var property position = game.at(20,3)

const limiteSuperior = 15
const limiteInferior = 3
const limiteDerecho = 15
const limiteIzquierdo = 3

method image() = "enemigo.png"

method moverse() {game.onTick(400, "movimiento", {self.movimientoVertical()})}
method moverse() =
if(moverse && subiendo){
game.onTick(400, "movimiento", {self.movimientoVertical()})
moverse = false
}
else if (moverse && horizontal){
game.onTick(400, "movimiento", {self.movimientoHorizontal()})
moverse = false
}

method movimientoVertical(){
if(position.y()<15 and subiendo){
if(position.y()<limiteSuperior and subiendo){
position = position.up(1)
}else{
position = position.down(1)
if(position.y()>3){
if(position.y() > limiteInferior){
subiendo=false
}
if(position.y() == 3){
if(position.y() == limiteInferior){
subiendo = true
}
}
}

method movimientoHorizontal(){
if(position.x()< limiteDerecho and horizontal){
position = position.right(1)
}else{
position = position.left(1)
if(position.x()> limiteIzquierdo){
horizontal = false
}
if(position.x() == limiteIzquierdo){
horizontal = true
}
}
}

method lastimar(){
isaac.danio(10)
}
}

const bicho1 = new Enemigo( position = game.at(20,3))
const bicho2 = new Enemigo( position = game.at(10,3))
const bicho3 = new Enemigo( position = game.at(20,3))
const bicho1 = new Enemigo(subiendo = false, limiteDerecho = 28 , limiteIzquierdo = 1, position = game.at(15,6))
const bicho2 = new Enemigo(horizontal = false, limiteSuperior = 18, limiteInferior = 1, position = game.at(20,1))
const bicho3 = new Enemigo(horizontal = false, limiteSuperior= 18, limiteInferior = 1,position = game.at(16,17))
const bicho4 = new Enemigo(subiendo = false, limiteDerecho = 28, limiteIzquierdo = 1, position = game.at(15,16))
2 changes: 1 addition & 1 deletion isaac.wlk
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ object isaac{
}

method avanzarNivel(){
nivel.cambiarEscenario(nivel2)
nivel.cambiarEscenario(nivel2)
}

method danio(n) {
Expand Down
1,661 changes: 1,661 additions & 0 deletions log/wollok11.log

Large diffs are not rendered by default.

39 changes: 39 additions & 0 deletions log/wollok12.log

Large diffs are not rendered by default.

1,471 changes: 1,471 additions & 0 deletions log/wollok13.log

Large diffs are not rendered by default.

335 changes: 335 additions & 0 deletions log/wollok14.log

Large diffs are not rendered by default.

537 changes: 537 additions & 0 deletions log/wollok9.log

Large diffs are not rendered by default.

50 changes: 47 additions & 3 deletions nivel.wlk
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ object nivel{

method cambiarEscenario(nivel){
escenarioActual = nivel

self.clearGame()
game.addVisual(fondoDelJuego)
isaac.moverse(game.at(2,2))
escenarioActual.aniadirIsaac()
escenarioActual.visuales()
}
Expand All @@ -55,6 +55,7 @@ object nivel{
method muerte(){
self.clearGame()
self.inicio()

}
}

Expand All @@ -73,19 +74,62 @@ class Escenario1 inherits Escenario{
game.addVisual(pincho2)
game.addVisual(pincho3)
game.addVisual(pincho4)
game.addVisual(pincho5)
game.addVisual(pincho6)
game.addVisual(reja1)
game.addVisual(reja2)
game.addVisual(reja3)
game.addVisual(reja4)
game.addVisual(reja5)
game.addVisual(reja6)
game.addVisual(reja7)
game.addVisual(reja8)
game.addVisual(reja9)
game.addVisual(reja10)
game.addVisual(reja11)
game.addVisual(reja12)

game.addVisual(bicho1)
game.addVisual(bicho2)

bicho1.moverse()
bicho2.moverse()
}
}

class Escenario2 inherits Escenario{
override method visuales(){
game.addVisual(puerta2)
game.addVisual(bicho2)

game.addVisual(reja13)
game.addVisual(reja14)
game.addVisual(reja15)
game.addVisual(reja16)
game.addVisual(reja17)
game.addVisual(reja18)
game.addVisual(reja19)

game.addVisual(pincho7)
game.addVisual(pincho8)
game.addVisual(pincho9)
game.addVisual(pincho10)
game.addVisual(pincho11)
game.addVisual(pincho12)
game.addVisual(pincho13)
game.addVisual(pincho14)
game.addVisual(pincho15)
game.addVisual(pincho16)
game.addVisual(pincho17)
game.addVisual(pincho18)
game.addVisual(pincho19)
game.addVisual(pincho20)


game.addVisual(bicho3)
game.addVisual(bicho4)

bicho2.moverse()
bicho3.moverse()
bicho4.moverse()
}
}

Expand Down
65 changes: 60 additions & 5 deletions obstaculos.wlk
Original file line number Diff line number Diff line change
Expand Up @@ -7,25 +7,80 @@ class Pinchos{

method image() = "pinchosDefinitivo.png"

var property position = game.at(15,1)
var property position = game.at(6,1)

method lastimar(){
isaac.danio(5)
}
}

const pincho1 = new Pinchos()
const pincho2 = new Pinchos(position= game.at(15,3))
const pincho3 = new Pinchos(position= game.at(15,5))
const pincho4 = new Pinchos(position= game.at(15,7))
const pincho2 = new Pinchos(position= game.at(6,3))
const pincho3 = new Pinchos(position= game.at(6,8))
const pincho4 = new Pinchos(position= game.at(6,10))
const pincho5 = new Pinchos(position = game.at(6,14))
const pincho6 = new Pinchos(position = game.at(6,16))

class Puerta{

method image() = "puerta1.png"

method lastimar() {}

var property position = game.at(15,18)
}

class Reja1{
var property position = game.at(6,12)
method image() = "reja1.png"

method lastimar() {
isaac.moverse(position - 1 )
}
}
class Reja2 inherits Reja1{
override method image() = "reja2.png"
}

class Reja3 inherits Reja1{
override method image() = "reja3.png"
}

const reja1 = new Reja1()
const reja2 = new Reja2(position = game.at(8,12))
const reja3 = new Reja2(position = game.at(10,12))
const reja4 = new Reja2(position = game.at(12,12))
const reja5 = new Reja2(position = game.at(14,12))
const reja6 = new Reja2(position = game.at(16,12))
const reja7 = new Reja3(position = game.at(18,12))
const reja8 = new Reja1(position = game.at(22,12))
const reja9 = new Reja2(position = game.at(24,12))
const reja10 = new Reja2(position = game.at(26,12))
const reja11 = new Reja2(position = game.at(28,12))
const reja12 = new Reja3(position = game.at(30,12))

const reja13 = new Reja1(position = game.at(2,4))
const reja14 = new Reja2(position = game.at(4,4))
const reja15 = new Reja2(position = game.at(6,4))
const reja16 = new Reja2(position = game.at(8,4))
const reja17 = new Reja2(position = game.at(10,4))
const reja18 = new Reja2(position = game.at(12,4))
const reja19 = new Reja3(position = game.at(14,4))

const pincho7 = new Pinchos(position = game.at(10,6))
const pincho8 = new Pinchos(position = game.at(10,8))
const pincho9 = new Pinchos(position = game.at(10,10))
const pincho10 = new Pinchos(position = game.at(10,12))
const pincho11 = new Pinchos(position = game.at(10,14))
const pincho12 = new Pinchos(position = game.at(18,4))
const pincho13 = new Pinchos(position = game.at(20,4))
const pincho14 = new Pinchos(position = game.at(22,4))
const pincho15 = new Pinchos(position = game.at(24,4))
const pincho16 = new Pinchos(position = game.at(24,6))
const pincho17 = new Pinchos(position = game.at(24,8))
const pincho18 = new Pinchos(position = game.at(24,10))
const pincho19 = new Pinchos(position = game.at(24,12))
const pincho20 = new Pinchos(position = game.at(24,14))

const puerta1 = new Puerta()
const puerta2 = new Puerta(position = game.at(18,18))
const puerta2 = new Puerta(position = game.at(6,18))
16 changes: 7 additions & 9 deletions readme/README.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,26 @@
# The binding of unArgentino
# EL TEMPLO DE LAS ARENAS

UTN - Facultad Regional Buenos Aires - Materia Paradigmas de Programación

## Equipo de desarrollo:

- Juan Jose Nogueira
- Fabricio Lopes
- Fabricio Lopez Garro


## Capturas

![pepita](assets/golondrina.png)
![pepita](assets/pantallaDeCarga.png)

## Reglas de Juego / Instrucciones

Hacer daño a los enemigos disparando "lagrimas" para pasar el nivel
Agarrar items especiales para modificar el ataque
Esquivas las superficies con obstaculos que hagan daño
Llegar hasta la proxima puerta para pasar de nivel
Una vez que supere todas las habitaciones gana el juego
Tiene un nivel de vida basado en corazones, al vaciarse se vuelve al inicio

Cada enemigo y obstáculo resta vida
Si el nivel de vida llega a 0, se termina el juego

## Controles:

- `Up` para...
- `Up` `Down` `Left` `Right` para moverse en el juego
- `S` para abrir una puerta

0 comments on commit 7ab3016

Please sign in to comment.