david-pfx / PuzzleScriptNext

A direct successor to PuzzleScript, building on the work of PuzzleScript Plus, Pattern:Script and others.
http://www.puzzlescriptnext.polyomino.com
MIT License
12 stars 5 forks source link

level only wins the turn after you meet all winconditions #69

Closed Pool-E closed 2 months ago

Pool-E commented 2 months ago

Describe the bug i am making a game, i meet all winconditions, verbose logging says winconditions met, but i need to make another input before i win

Reproduction Steps

  1. Use PS> for a while.
  2. Try to beat a level.
  3. You will need to do another input before you can win

What did you expect would happen? the level to be imediatly beaten as soon as all winconditions are met.

OS & Browser version, desktop/mobile Windows 11, Google, laptop

Screenshots, example projects, other relevant issues, etc. Any project should work.

david-pfx commented 2 months ago

I haven't seen that as a general problem, but rather as something that can happen depending how the rules are written. So it might help if you can provide a repro case with a specific game and specific set of inputs.

Pool-E commented 2 months ago

I haven't seen that as a general problem, but rather as something that can happen depending how the rules are written. So it might help if you can provide a repro case with a specific game and specific set of inputs.

it will happen in this game: on later levels:


title linked
author Pool128
sprite_size 6
//

=====
TAGS
=====

frames = 1 2 3

========
OBJECTS
========

Background .
brown darkbrown
000000
111111
000011
011000
111111
000000

wall #
darkred darkgrey
000001
111111
000100
111111
010000
111111

bumper $
purple pink
.0000.
001100
011110
011110
001100
.0000.

belt:1:directions
black darkgrey grey
011110
012210
022220
011110
012210
022220
rot:up:>

belt:2:directions
black darkgrey grey
012210
022220
011110
012210
022220
011110
rot:up:>

belt:3:directions
black darkgrey grey
022220
011110
012210
022220
011110
012210
rot:up:>

animated
transparent

player p
lightblue blue darkblue
..00..
.0011.
001111
111122
.1122.
..22..

player1
lightblue blue darkblue
......
..01..
.0111.
.1112.
..12..
......

player2
lightblue blue darkblue
......
......
..11..
..11..
......
......

goal g
yellow orange
.0000.
001100
011110
011110
001100
.0000.

fragilegoal f
lightred red 
copy:goal

fragilegoal1
lightred red
......
.0000.
.0110.
.0110.
.0000.
......

=======
LEGEND
=======

players = player or player1 or player2

w = belt:1:up
a = belt:1:left
s = belt:1:down
d = belt:1:right

@ = player and wall

=======
SOUNDS
=======

=========
MAPPINGS
=========

frames => nextframe
1 2 3 -> 3 2 1

================
COLLISIONLAYERS
================

Background
goal, fragilegoal, fragilegoal1
belt:frames:directions
player, player1, player2
animated
wall, bumper

======
RULES
======

[no bumper|> player|bumper] -> [|< player|bumper]
[bumper|> player|bumper] -> [bumper|player|bumper]
[> player|wall] -> cancel
[animated] -> []
frames[belt:frames:directions no animated] -> [belt:nextframe:directions animated]
[player belt:frames:up] -> [up player belt:frames:up]
[player belt:frames:left] -> [left player belt:frames:left]
[player belt:frames:down] -> [down player belt:frames:down]
[player belt:frames:right] -> [right player belt:frames:right]

late[player2] -> []again
late[player1] -> [player2]again
late[fragilegoal1] -> []again
late[player goal] -> [player1 goal]again
late[player fragilegoal] -> [player1 fragilegoal1]again

==============
WINCONDITIONS
==============

no players

=======
LEVELS
=======

message rights and wrongs
#######
#....g#
#.#####
#.###.#
#.###.#
#p....#
#######

message parallel universe
#############
#..g..#.#g..#
#.###.#..##.#
#.....#...#.#
#...#.#.#...#
#p#...#p....#
#############

message two worlds

message removal
#############
#....g#.#..##
#.###.#.....#
#.....#.....#
#.#.#.#..#..#
#p....#p#g..#
#############

message offset
########
#.#.p###
#.#..###
#.g..p.#
#..#.#.#
#..#..##
##.....#
#.....##
#.#...##
########

message fragile
#######
###...#
#f..#p#
##....#
#..fp.#
#.#...#
#..#..#
#######

message offset
#############
####.########
###..######f#
#s...d......#
#......######
#..p...######
#p.........f#
#############
david-pfx commented 2 months ago

I played the game right through, didn't see a problem. Can you tell me which level and which moves to make?

Is it possible you're triggering a cancel? That might do it.

Pool-E commented 2 months ago

I played the game right through, didn't see a problem. Can you tell me which level and which moves to make?

Is it possible you're triggering a cancel? That might do it.

a cancel should never happen the turn i win, also, my player still ends up on the goal. it happens sometimes on fragile. i have no real idea when it is though.

david-pfx commented 2 months ago

If I can't reproduce it, I can't fix it. Perhaps you should ask a question on the PuzzleScript discord channel?

Pool-E commented 2 months ago

ok