QNICE-FPGA icon indicating copy to clipboard operation
QNICE-FPGA copied to clipboard

Maze: Show your gamers some more love :-)

Open sy2002 opened this issue 3 years ago โ€ข 13 comments

@MJoergen YOU ROCK ๐ŸคŸ ๐Ÿš€ ๐Ÿฅณ ๐Ÿงจ ๐ŸŽ† I truly love your maze game. It is great that you merged it into dev-vbcc-vasm-fix because that enables us to release it with V1.6 :-)

@bernd-ulmann You can try it in the VGA emulator: First, after having pressed g it starts with a mesmerizing graphics effect, where the labyrinth is being build, then the labyrinth goes away, and you are being dropped into a dungeon: Alone in the dark, just with a candle that barely shines enough so that you see the direct surrounding => now go and find your way out ๐Ÿ˜ˆ

@MJoergen But you need to share more love with your gamers: After one walked through the dungeon, for hours and hours until he found the way out: You need to do more, than just drop him back to the QMON> prompt, where he is greeted with an error message due to the fact that the keypresses that you use to move through the dungeon are now interpreted as Monitor commands. :-)

grafik

One idea could be: Use this ASCII Art Font Generator and show a static "You escaped" or something like that:

 __     __                                              _ 
 \ \   / /                                             | |
  \ \_/ /__  _   _    ___  ___  ___ __ _ _ __   ___  __| |
   \   / _ \| | | |  / _ \/ __|/ __/ _` | '_ \ / _ \/ _` |
    | | (_) | |_| | |  __/\__ \ (_| (_| | |_) |  __/ (_| |
    |_|\___/ \__,_|  \___||___/\___\__,_| .__/ \___|\__,_|
                                        | |               
                                        |_|               

http://patorjk.com/software/taag/#p=display&f=Big&t=You%20escaped

Or you go as far and let something like this here scroll over the screen ๐Ÿ˜บ http://patorjk.com/software/taag/#p=display&f=Alpha&t=You%20escaped

Or... whatever :-)

P.S. I guess you might want to correct "Welcom" to "Welcome"

Thank you for adding such an ultra-cool demo to our portilo ๐Ÿ‘

sy2002 avatar Aug 21 '20 16:08 sy2002

I guess we should also activate the better pseudorandom initialization via cycle count (or instruction count) before closing this issue.

sy2002 avatar Aug 22 '20 01:08 sy2002

A lot of changes have been made to the maze program. Available on the develop branch.

@sy2002 : Please play some games, and give further feedback :-)

MJoergen avatar Oct 12 '20 06:10 MJoergen

@MJoergen Sounds awesome! Will test soon and report back ๐Ÿ˜„

sy2002 avatar Oct 12 '20 07:10 sy2002

@MJoergen This evening, I had the chance to test the newest version on hardware.

โค๏ธ I love it! โค๏ธ ๐Ÿ˜ƒ

Here is what I love most:

  • The fact that you now have three levels that can seamlessly be switched even during the game (and that you use colors to denote the level). I need to admit: Level three is super-tough! ๐Ÿ˜ˆ
  • The fact that the maze is different each time you start it
  • The fact that you seem to show a "you win" message - even though I was not able to see it

Here are some suggestions:

  • I did not get where to go to exit. I played level 1 and thought that I need to go to the top/left but when I arrived there, the game did not end, so I thought I need to go to the bottom/left: Again no success: Bug? Or intention? Maybe we should show the goal of the Maze in all levels by showing a special character, so that the player knows where the goal is?

  • I would love to have support for the cursor keys. As getc is not working, you might use MMIO to read the USB keyboard and to get the keys (I did it like that in Q-TRIS).

  • The screen flickers a lot in level 1. You might want to use a technique called double-buffering to avoid that: Use the fact, that we have multiple textmode pages and draw the new version of the maze on page 1 while you display page 0. Then quickly switch to page 1 using the textmode scroll registers. You could even sync the switch by waiting for the correct raster line.

  • When the game ends, the cursor is off, you might want to switch it on

sy2002 avatar Oct 13 '20 18:10 sy2002

Thank you for your feedback!

I did not get where to go to exit. I played level 1 and thought that I need to go to the top/left but when I arrived there, the game did not end, so I thought I need to go to the bottom/left: Again no success: Bug? Or intention? Maybe we should show the goal of the Maze in all levels by showing a special character, so that the player knows where the goal is?

Actually, in level 1 the goal is shown as an asterisk *. In levels 2 and 3 the goal is not shown. However, you can press the x key to get a hint: That will show the location of the goal until you move again. I'm not sure how I can improve upon this ?

I would love to have support for the cursor keys. As getc is not working, you might use MMIO to read the USB keyboard and to get the keys (I did it like that in Q-TRIS).

Done!

The screen flickers a lot in level 1. You might want to use a technique called double-buffering to avoid that: Use the fact, that we have multiple textmode pages and draw the new version of the maze on page 1 while you display page 0. Then quickly switch to page 1 using the textmode scroll registers. You could even sync the switch by waiting for the correct raster line.

Done! No need for double-buffering, just moved a call to qmon_vga_cls().

When the game ends, the cursor is off, you might want to switch it on

I seems the cursor was on all the time. Anyway, after the other changes I've made, this appears to be solved. Please check again.

MJoergen avatar Oct 13 '20 20:10 MJoergen

Great progress. ๐Ÿ˜„ I retested on the emulator and on the hardware: Works very well!

  • Now I understood the "*" concept and successfully escaped in level 1
  • I also managed level 2 successfully.
  • Level 3 is yet to come ๐Ÿ˜…
  • The flickering is completely gone - looks great ๐Ÿ‘
  • It is a big pleasure to see how well the random generator works! Each maze is truly different ๐Ÿฅณ

Here are bugs that I suggest to fix:

  • Currently, the cursor is on, all the time. I suggest that I turn it OFF at the beginning of the game and ON just before you end and return back to Monitor
  • Level 1: When leaving the game using "x" you might want to clear the screen
  • In Level 3 it seems that the @ are not deleted (see screenshot at the very bottom of this comment)

And here is something for the gamer in me: A score system! You might for example give 1000 points for level 1, 2000 points for level 2, 3000 points for level 3 and calculate the optimum amount of steps to the goal and the deviation from that somehow reduces the points. And each hint also "costs" something? Or some other formula that takes the level and the quality of the player's work into consideration.

Last but not least: I would consider myself an experienced gamer but originally I did not get, that I need to search the screen for a "" in level 1. The "" is hard to find in the crazyness of the maze (which is good, it increases the game's challenge) - but as as first starter of the game, I was lost as I did not know it. Therefore I suggest that you write something like this on your start game:

You are trapped in the maze. Find your way to the * to escape! In Level 1, you know were you are.
In Level 2, a you can still remember the path you walked. But in level 3, only a dim torch
is illuminating the direct surrounding. Don't be ashamed to ask for help and press "x" in
level 2 and level 3.

Here is a photo of my screen (tested on real hardware, level 3): grafik

sy2002 avatar Oct 17 '20 10:10 sy2002

@sy2002 : Thank you SO MUCH for your feedback. It is VERY HELPFUL and I'm learning a lot from you! I really appreciate it!

I've fixed the small bugs you mentioned and added a welcome text.

Regarding scoring, I have an idea of using a real-time clock that counts the number of seconds used. And then have a separate high score, with the lowest time so far for each level (and possibly number of 'hints' used). Or just let each hint add ten seconds to the timer. Any thoughts on this idea ?

MJoergen avatar Oct 18 '20 15:10 MJoergen

Sounds great! :-)

sy2002 avatar Oct 18 '20 20:10 sy2002

A timer has now been added to the game! What is your record time?

MJoergen avatar Oct 20 '20 06:10 MJoergen

Cool idea using the timer interrupt! ๐Ÿ˜ƒ

I do have some challenges though. My setup: I PULLed the latest GitHub repo, ran tools/make-toolchain.sh and then synthesized everything. After that I ran qbin/make.sh and used the resulting file to play.

Challenge 1

I played Level 1 on hardware: I escaped and made a new record: See photo 1 below. Now how can I see my record? Pressing "g" would generate a new maze and pressing "m" shows no result (see photo 2). This seems to be a bug.

Additionally to fixing the bug: I think the optimum case would be: The player can see his time (and the latest record) on the "you win screen" as well as on the menu screen.

Photo 1 grafik

Photo 2 grafik

Challenge 2

I played the game on hardware in level 2 and escaped. The problem is, that the main menu is not showing my time, but only the penalty time that I received for pressing "x". See this photo:

grafik

Last but not least:

You might want to disable "x" in level 1: It is not helpful (as the * is visible all the time) but still gives you a penalty when pressed accidently.

sy2002 avatar Oct 24 '20 17:10 sy2002

The behavior is currently different on the hardware and on the emulator. The reason is that Issue #172 has not yet been implemented.

I've tested the game on the emulator, and do not see the problems you're experiencing.

I've changed the behavior of the 'x' key, so level 1 does not get penalized.

MJoergen avatar Oct 25 '20 07:10 MJoergen

Now, that you have implemented issue #172, I synthesized and played again on hardware.

After solving level 1 it said: You escaped, New record. But I could not see my score. It looked exactly as photo 1 shown in https://github.com/sy2002/QNICE-FPGA/issues/87#issuecomment-716021287.

Is this maybe by intension, that you are not supposed to see your high score directly after achieving it (if yes, you might want to reconsider).

And then when pressing "m" to go back to the menu it exactly looked as shown in photo 2 in https://github.com/sy2002/QNICE-FPGA/issues/87#issuecomment-716021287 .

And by the way: I did not remember what key I needed to press to go back (it was "m"), so I pressed some keys. You might want to tell the player "press g to play again press m to go back to the menu" or something like this.

sy2002 avatar Oct 31 '20 19:10 sy2002

Additionally to my other test today (https://github.com/sy2002/QNICE-FPGA/issues/87#issuecomment-719979899) one more test: when you press "r" during playing level 2, your player @ is reset to the starting position, but your old player @ is still visible where it was before. (Another topic, not related: Is in level 2 "r" supposed to clear the path that you walked so far, or not?)

sy2002 avatar Oct 31 '20 19:10 sy2002