graphics for demo game

This commit is contained in:
2026-05-25 19:55:18 +02:00
parent df7219677e
commit f0b86871f6
10 changed files with 115 additions and 29 deletions

View File

@@ -12,7 +12,7 @@ func defineCat(g *p.Game) {
Sprite: "spr/cat",
Speed: 40,
SpeechColor: color.RGBA{200, 200, 255, 255},
W: 18,
H: 14,
W: 34,
H: 20,
})
}

View File

@@ -12,7 +12,7 @@ func definePlayer(g *p.Game) {
Sprite: "spr/player",
Speed: 80,
SpeechColor: color.RGBA{255, 230, 160, 255},
W: 14,
H: 28,
W: 28,
H: 62,
})
}

View File

@@ -8,7 +8,7 @@ func defineBedroom(g *p.Game) {
Background: "bg/bedroom",
Music: "mus/wakeup",
Actors: []p.SceneActor{
{CharacterName: "player", At: p.Point{X: 160, Y: 120}},
{CharacterName: "player", At: p.Point{X: 160, Y: 145}},
},
Hotspots: []p.Hotspot{
{
@@ -29,7 +29,7 @@ func defineBedroom(g *p.Game) {
OnTake: p.If(p.Flag(FlagKeyTaken),
p.Say("player", "Már elvittem."),
p.Seq(
p.Walk("player", p.Point{X: 130, Y: 120}),
p.Walk("player", p.Point{X: 130, Y: 145}),
p.Give("key"),
p.SetFlag(FlagKeyTaken),
p.Say("player", "Pont jól jöhet."),
@@ -38,7 +38,7 @@ func defineBedroom(g *p.Game) {
OnUse: p.If(p.Flag(FlagKeyTaken),
p.Say("player", "Már elvittem a kulcsot."),
p.Seq(
p.Walk("player", p.Point{X: 130, Y: 120}),
p.Walk("player", p.Point{X: 130, Y: 145}),
p.Give("key"),
p.SetFlag(FlagKeyTaken),
p.Say("player", "Megvan a kulcs."),
@@ -51,7 +51,7 @@ func defineBedroom(g *p.Game) {
Label: "ajtó",
OnLook: p.Say("player", "Az ajtó a konyhába vezet."),
OnUse: p.Seq(
p.Walk("player", p.Point{X: 260, Y: 130}),
p.Walk("player", p.Point{X: 260, Y: 145}),
p.GoTo("kitchen"),
),
},

View File

@@ -8,8 +8,8 @@ func defineKitchen(g *p.Game) {
Background: "bg/kitchen",
Music: "mus/calm",
Actors: []p.SceneActor{
{CharacterName: "player", At: p.Point{X: 60, Y: 130}},
{CharacterName: "cat", At: p.Point{X: 210, Y: 132}},
{CharacterName: "player", At: p.Point{X: 60, Y: 145}},
{CharacterName: "cat", At: p.Point{X: 215, Y: 142}},
},
Hotspots: []p.Hotspot{
{
@@ -21,7 +21,7 @@ func defineKitchen(g *p.Game) {
p.Say("player", "Már nyitva van."),
p.If(p.HasItem("key"),
p.Seq(
p.Walk("player", p.Point{X: 70, Y: 130}),
p.Walk("player", p.Point{X: 70, Y: 145}),
p.Say("player", "Klikk."),
p.SetFlag(FlagCupboardOpen),
p.Give("beans"),
@@ -32,7 +32,7 @@ func defineKitchen(g *p.Game) {
),
OnUseWith: map[string]p.Action{
"key": p.Seq(
p.Walk("player", p.Point{X: 70, Y: 130}),
p.Walk("player", p.Point{X: 70, Y: 145}),
p.Say("player", "Klikk."),
p.SetFlag(FlagCupboardOpen),
p.Give("beans"),
@@ -48,7 +48,7 @@ func defineKitchen(g *p.Game) {
OnTake: p.If(p.Flag(FlagMugTaken),
p.Say("player", "Tiszta már mind elfogyott."),
p.Seq(
p.Walk("player", p.Point{X: 125, Y: 130}),
p.Walk("player", p.Point{X: 125, Y: 145}),
p.Give("mug"),
p.SetFlag(FlagMugTaken),
p.Say("player", "Egy bögre, kérem."),
@@ -57,7 +57,7 @@ func defineKitchen(g *p.Game) {
OnUse: p.If(p.Flag(FlagMugTaken),
p.Say("player", "Már elvettem egyet."),
p.Seq(
p.Walk("player", p.Point{X: 125, Y: 130}),
p.Walk("player", p.Point{X: 125, Y: 145}),
p.Give("mug"),
p.SetFlag(FlagMugTaken),
p.Say("player", "Egy bögre, kérem."),
@@ -75,7 +75,7 @@ func defineKitchen(g *p.Game) {
),
OnUseWith: map[string]p.Action{
"beans": p.Seq(
p.Walk("player", p.Point{X: 180, Y: 130}),
p.Walk("player", p.Point{X: 180, Y: 145}),
p.SetFlag(FlagCoffeeHasBeans),
p.TakeAway("beans"),
p.Say("player", "Bab a helyén."),
@@ -83,7 +83,7 @@ func defineKitchen(g *p.Game) {
p.RunScript("victory")),
),
"mug": p.Seq(
p.Walk("player", p.Point{X: 180, Y: 130}),
p.Walk("player", p.Point{X: 180, Y: 145}),
p.SetFlag(FlagCoffeeHasMug),
p.TakeAway("mug"),
p.Say("player", "Bögre a helyén."),
@@ -105,7 +105,7 @@ func defineKitchen(g *p.Game) {
Label: "ajtó",
OnLook: p.Say("player", "Vissza a hálóba."),
OnUse: p.Seq(
p.Walk("player", p.Point{X: 20, Y: 130}),
p.Walk("player", p.Point{X: 20, Y: 145}),
p.GoTo("bedroom"),
),
},

View File

@@ -9,7 +9,7 @@ func defineIntroScript(g *p.Game) {
p.Wait(0.4),
p.Say("player", "Brr, hideg van."),
p.Say("player", "Egy kávé kéne, mielőtt szétszakad a fejem."),
p.Walk("player", p.Point{X: 160, Y: 130}),
p.Walk("player", p.Point{X: 200, Y: 145}),
),
})
}