scemino / engge

Open source remake of Thimbleweed Park's engine
https://scemino.github.io/
MIT License
148 stars 15 forks source link

Tutorial texts do not appear #115

Closed Mac1512 closed 4 years ago

Mac1512 commented 4 years ago

When a new game starts, the tutorial to learn how to play begins, specifically in the bridge room, although the arrows appear, the texts do not appear. These being the following:

40089 Click on OPEN, then click on the GATE. 40090 Click on TALK TO then click on WILLIE. 40091 Click on LOOK AT then the NOTE. 40092 Click on the ground to walk. 40093 Click on PICK UP and then the ROCK. 40094 Click on USE then on ROCK, then the LIGHT. 40095 Click on the ground to walk.

In the dialogue between Willie and Boris:

40126 Haz clic en las DECISIONES para hablar.

Also note that when Ray or Reyes change from the bridge room to the "highwayMainStreetDoor", new tutorial images appear, which are passed by clicking on the right or left arrows as appropriate. At this point, inventory objects continue to be detected by hovering over them, and that's a mistake.

I show a screenshot of the first image:

tutorial2_1

scemino commented 4 years ago

For this bug, it will be tricky to fix it. The position of the text is given in the screen coordinates:

_textObject = createTextObject("WalterTurncoat15", translate(text), ALIGN_TOP | ALIGN_LEFT | 340)
objectScreenSpace(_textObject, YES)
objectScale(_textObject, 2)
objectAt(_textObject, 50, 660)

And the y-axis in Thimbleweed Park is pointing up.

This is why in the game you will see this:

auto size = g_pEngine->getRoom()->getRoomSize();
y = size.y - y;

But in the case of the tutorial text, I should not subtract the room height but the screen height. I have to refactor a lot of code.

Mac1512 commented 4 years ago

I see ... It's a lot of work

Mac1512 commented 4 years ago

There is an error when compiling this commit: https://github.com/scemino/engge/commit/345add1e5aacdbac5af060bf9c2ad9ac4a2f07e4

In the engine.cpp file, the following must be included:

#include <**iomanip**>

std::setprecision is undefined

Now the texts of the tutorial are seen, although new errors have emerged, I have made some clarifications here: https://github.com/scemino/engge/issues/113

scemino commented 4 years ago

There are too much regressions now with this change, I'm reverting them and move them to the branch y-axis.