Home
JAQForum Ver 20.06
Log In or Join  
Active Topics
Local Time 10:27 02 May 2024 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : PicoMite Fun with VT100 terminal

Author Message
Martin H.

Guru

Joined: 04/06/2022
Location: Germany
Posts: 903
Posted: 08:27am 06 Apr 2024
Copy link to clipboard 
Print this post

Since I didn't have a Pico with graphical capabilities available for the time over Easter, so only my laptop and a "naked" Raspberry Pico,
I have dealt a little with the possibilities of the display in the terminal window.

Since I've already been asked several times to add the monster to my 3D Maze, I've gone on a search.
I found a well documented source code of the ZX classic 3D Monster Maze and an overview of the game mechanics
So what could be more obvious (or because I like to torture myself) than to try to adapt the game to the VT graphics.


The "TERMINAL" font contains a few graphic symbols.
Since these are very limited, I decided that each character is composed of 2 characters. Some ZXsymbols are still couldn't bee done, but in my opinion you can get over that.

so this is, what i got so far...
VTMaze08.zip

What is still missing?
*Rex is immobile and harmless in the game, so he just stands around (like me) in the way
*The exit is placed but not yet drawn or considered.
*You can only end the game with Ctrl&C.
So I still have to write the animation for the exit, the game mechanics for Rex (he's only half as fast as the player, but keeps running even if the player doesn't move)
But have Fun with the Game so far.
Cheers
Martin
Edited 2024-04-06 18:31 by Martin H.

Footnote added 2024-04-08 00:18 by Martin H.
3D Monster Maze in Terminal
'no comment
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 3848
Posted: 08:59am 06 Apr 2024
Copy link to clipboard 
Print this post

Well done Martin, I look forward to seeing a completed version.

Best wishes,

Tom
Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
twofingers
Guru

Joined: 02/06/2014
Location: Germany
Posts: 1133
Posted: 02:41pm 06 Apr 2024
Copy link to clipboard 
Print this post

@Martin, looks good! I'm amazed that something like this can be achieved with VT100. I miss a navigation aid. Something like a direction display (N-E--S-W) or an optional map might help.
Kind regards
Michael
 
Martin H.

Guru

Joined: 04/06/2022
Location: Germany
Posts: 903
Posted: 03:00pm 06 Apr 2024
Copy link to clipboard 
Print this post

  twofingers said  @Martin, looks good! I'm amazed that something like this can be achieved with VT100. I miss a navigation aid. Something like a direction display (N-E--S-W) or an optional map might help.
Kind regards
Michael

Hi Michael
this wouldn't be hard to incorporate but it's part of the difficulty of the game, you have no map view and no compass, the only thing you know is that you start in the southeast, facing weat, and Rex starts in the north. ;-)

Cheers
Martin
'no comment
 
twofingers
Guru

Joined: 02/06/2014
Location: Germany
Posts: 1133
Posted: 03:03pm 06 Apr 2024
Copy link to clipboard 
Print this post

  Martin H. said  
Hi Michael
this wouldn't be hard to incorporate but it's part of the difficulty of the game, [...]

Too bad, then I'm lost.
 
Martin H.

Guru

Joined: 04/06/2022
Location: Germany
Posts: 903
Posted: 01:41pm 07 Apr 2024
Copy link to clipboard 
Print this post

Next level
Rex now tries to catch you, but doesn't hurt you yet (for debug reasons) ...
So you can (still) simply walk through him.
Have fun.
Martin

VTMaze09.zip

Intro


Gameplay



Gotyou

Edited 2024-04-07 23:44 by Martin H.
'no comment
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 3550
Posted: 05:15am 08 Apr 2024
Copy link to clipboard 
Print this post

Hi Martin,

My VT100 screens look like normal ascii characters, not.the block graphics in your screenshots. Putty.
I will try teraterm later today.

Volhout
Edited 2024-04-08 15:20 by Volhout
PicomiteVGA PETSCII ROBOTS
 
Martin H.

Guru

Joined: 04/06/2022
Location: Germany
Posts: 903
Posted: 06:32am 08 Apr 2024
Copy link to clipboard 
Print this post

  Volhout said  Hi Martin,

My VT100 screens look like normal ascii characters, not.the block graphics in your screenshots. Putty.
I will try teraterm later today.

Volhout

Good Morning Harm,

For the correct representation, pay attention that your terminal program uses a font that contains the graphic symbols in the range above 128.

Especially CHR 176-178, 219, 220 and 223 are important here.
I Use a Font called TERMINAL


Cheers
Martin
'no comment
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 3550
Posted: 07:21am 08 Apr 2024
Copy link to clipboard 
Print this post

Hi Martin,

On teraterm I selected "Terminal" font, and now it looks the same.
On Putty I have tried several fonts (i.e. Monospace, Ubuntu Mono, Fixed, Courier), but none give the same result as teraterm. The "Mono" fonts do show some graphical characters, but they do not have the contrast (black versus grey). I'll try somemore later today.

Regards,

Volhout
PicomiteVGA PETSCII ROBOTS
 
Martin H.

Guru

Joined: 04/06/2022
Location: Germany
Posts: 903
Posted: 08:25am 08 Apr 2024
Copy link to clipboard 
Print this post

  Volhout said  Hi Martin,

On teraterm I selected "Terminal" font, and now it looks the same.Volhout

Same as my Hardcopys or same as before?
  Volhout said  
On Putty I have tried several fonts (i.e. Monospace, Ubuntu Mono, Fixed, Courier), but none give the same result as teraterm. The "Mono" fonts do show some graphical characters, but they do not have the contrast (black versus grey). I'll try somemore later today.

Regards,

Volhout

could it be that your Terminal use 7 Bit Coding or no VT100 Emulation?



btw: I have adapted the key query and changed/extended the logic of Rex a little.
Now only the exit, the game over sequence and the warnings Messages are missing.
Edited 2024-04-08 19:08 by Martin H.
'no comment
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 3550
Posted: 10:23am 08 Apr 2024
Copy link to clipboard 
Print this post

Hi Martin,

Teraterm, with font "Terminal" gives the same as the pictures you posted. So it is correct.
Putty with 10+ fonts I tried gives either text, or it gives graphics, but the graphical symbols are different. I.e. the black blocks and the grey blocks all look the same (grey).
I also googled about graphical symbols and putty and vt100, and saw several hints to settings in Putty that could be changed, but neither of them solved the problem (data encoding, translation, etc..). I think it is imply a different implementation of the graphics symbols in these fonts.

I also looked for the "Terminal" font for Putty, but could not find any reference, nor a way to import it into putty. I guess it does not work in Putty. I may try Minicom tonight. Maybe that works....

Volhout
PicomiteVGA PETSCII ROBOTS
 
twofingers
Guru

Joined: 02/06/2014
Location: Germany
Posts: 1133
Posted: 10:39am 08 Apr 2024
Copy link to clipboard 
Print this post

Hi Martin,
If I remember correctly, in the original the approach of the T-Rex was announced through messages!??

My baud rate is 115200:


You got a private message.

Kind regards
Michael
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 3848
Posted: 10:43am 08 Apr 2024
Copy link to clipboard 
Print this post

Bizarrely enough look to put your terminal/console in a font for "Code page 862 (Hebrew language)" as this should include the correct graphics characters: https://www.ascii-codes.com/cp862.html

Best wishes,

Tom
Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 3848
Posted: 11:01am 08 Apr 2024
Copy link to clipboard 
Print this post

... or for that matter Cp437.

In PuTTY (untested) this may be via the Window->Translation->Remote character set setting.

Good luck,

Tom
Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
Martin H.

Guru

Joined: 04/06/2022
Location: Germany
Posts: 903
Posted: 11:03am 08 Apr 2024
Copy link to clipboard 
Print this post

:-)
this is just to show, what could be done with a sinple Picomite without any hardware extensions.
So just buy a 2,95$ clone from ali express, flash Picomite and store the Basic Program and you are ready to play.  
When everything is ready, I plan to convert this for Game*Mite and VGA as well (would Take a couple of Days couse I have to "redraw" everything).
I have already built a customized ZX character set, with all ZX character and  4 additional symbols for diagonally split characters (for the lines of the walls).



Font_ZX2.zip

But one thing at a time.
Edited 2024-04-08 21:19 by Martin H.
'no comment
 
Martin H.

Guru

Joined: 04/06/2022
Location: Germany
Posts: 903
Posted: 11:40am 08 Apr 2024
Copy link to clipboard 
Print this post

  twofingers said  Hi Martin,
If I remember correctly, in the original the approach of the T-Rex was announced through messages!??

Kind regards
Michael

Michael,
You are right, the messages appear in line 24, i.e. at the bottom of the screen.
These messages are already included in the code, but I have not yet built in a sub-routine do show them.
Here I try to orientate again on the explanation of the original game, when which message should appear.
I also created the Sub for the Maze after this explanation.. and it took me 3 attempts until it worked like it does on the ZX81 (only much faster).

Cheers
Martin
'no comment
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 3550
Posted: 11:59am 08 Apr 2024
Copy link to clipboard 
Print this post

  thwill said  ... or for that matter Cp437.

In PuTTY (untested) this may be via the Window->Translation->Remote character set setting.

Good luck,

Tom


Tried CP437 -> no change...

Volhout
PicomiteVGA PETSCII ROBOTS
 
Martin H.

Guru

Joined: 04/06/2022
Location: Germany
Posts: 903
Posted: 03:39pm 08 Apr 2024
Copy link to clipboard 
Print this post

Many small changes and I have now added the message display.
Determining the distance works (thank you pythagoras). It is still missing to determine whether he is in a straight line with no Wall Blocks to the player(REX HAS SEEN YOU) and the warnings that he is next to or behind the player.I have also not yet implemented the time-controlled hiding of messages if the status does not change.
But that shouldn't be the problem

I have the coordinates of Rex and the player displayed for checking, but I will remove this in the final version.
VTMaze_wip.zip
Have fun testing
Martin
Yes I know, when you are eaten by Rex he jumps back and forth, this is because his coordinates are the same as yours, so neither bigger nor smaller. This is where the 2nd method comes in, that he looks for a random path if he can't find a direction. But that doesn't matter, because the game is normally over then.
Edited 2024-04-09 01:51 by Martin H.
'no comment
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 3848
Posted: 06:58pm 08 Apr 2024
Copy link to clipboard 
Print this post

This works for me:

Ubuntu 23.10 (mantic)
PuTTY 0.78
Window->Fonts->Font used for ordinary text: Courier New
Window->Translation->Remote character set: CP437
Window->Override with UTF-8 if locale say so: unchecked <-- may not be necessary

The only issue is narrow white horizontal lines between each row ... and that PuTTY keeps crapping out, but I think that's just PuTTY.

Best wishes,

Tom
Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 3550
Posted: 07:33pm 08 Apr 2024
Copy link to clipboard 
Print this post

Hi Tom,

I think I found the culprit. I am running Ubuntu 20.04 LTS at home. And the latest version of putty for ubuntu 20.04 is 0.73.2
Version 0.73 does not have Courier font. On my work I run 22.04 LTS and that one has Courier font. I will try your proposal tomorrow.

This is what it looks like with the available font (i.e. server.fixed).
But I will experiment a bit more...





EDIT: It is the color setting: Window->Colour: change Default Foreground to 255,255,255
Then select font 8x16, 10x20 or 12x24, these fonts do not show the white lines...





Volhout
Edited 2024-04-09 05:59 by Volhout
PicomiteVGA PETSCII ROBOTS
 
Print this page


To reply to this topic, you need to log in.

© JAQ Software 2024