Just some tinkering

Popular in previous forums place your programming snippets here
Post Reply
PaulK
Posts: 66
Joined: Wed Jan 04, 2023 11:54 am

Just some tinkering

Post by PaulK »

Hi,

With all the adventure game discussions on the forum recently, got me tinkering with some really simple ASCII "graphics" stuff that could incorporated into a graphics adventure.

The ASCII art comes from https://www.asciiart.eu/, but I've modified/added some simple animation to make it more interesting.

Anyway, it amuzed me for a few hours!

Many thanks
Paul :-)

Waves2.opl
Owl2.opl
Feet3.opl
You do not have the required permissions to view the files attached to this post.
amenjet
Posts: 412
Joined: Tue Jan 03, 2023 7:54 pm

Re: Just some tinkering

Post by amenjet »

PaulK wrote: Wed Jan 01, 2025 11:44 pm Hi,

With all the adventure game discussions on the forum recently, got me tinkering with some really simple ASCII "graphics" stuff that could incorporated into a graphics adventure.

The ASCII art comes from https://www.asciiart.eu/, but I've modified/added some simple animation to make it more interesting.

Anyway, it amuzed me for a few hours!

Many thanks
Paul :-)


Waves2.opl
Owl2.opl
Feet3.opl
I hope you don't mind, I have added these to the Newopl tests. Waves2 needed a tweak as I haven't done int->float autoconversion in the runtime yet.
Owl runs:

Code: Select all

$ ./newopl_tran Owl2.opl 

global size:0016
Externals size:0000
Writing binary...
Length:0023
 44 lines scanned Ok  0 lines scanned failed  3 variables  2 lines blank

$ ./newopl_exec ob3_nopl.bin 

 /\_/\
(( v ))


():::()
 VV-VV
Feet runs too, but Waves needs to run the tweaked version in waves.opl...
There's no UDG at the moment.
PaulK
Posts: 66
Joined: Wed Jan 04, 2023 11:54 am

Re: Just some tinkering

Post by PaulK »

Hi Andrew,

No problem at all. Use however you like.

I keep thinking about the potential that your recreation will offer if you manage to include proper graphics commands in new OPL to take advantage of the full graphics display eg: LINE X1,Y1,X2,Y2, Rect, circ etc...

While UDG are helpful, the 8 x 5 dimensions and max of 8 unique UDG is pretty limiting, and the non graphical regions between the LCD matrix sections limits what's possible further.

That said, for its intended use, the original display does the job I guess. Just fantasising over what could be!!

Many thanks
Paul
amenjet
Posts: 412
Joined: Tue Jan 03, 2023 7:54 pm

Re: Just some tinkering

Post by amenjet »

PaulK wrote: Thu Jan 02, 2025 3:44 pm Hi Andrew,

No problem at all. Use however you like.

I keep thinking about the potential that your recreation will offer if you manage to include proper graphics commands in new OPL to take advantage of the full graphics display eg: LINE X1,Y1,X2,Y2, Rect, circ etc...

While UDG are helpful, the 8 x 5 dimensions and max of 8 unique UDG is pretty limiting, and the non graphical regions between the LCD matrix sections limits what's possible further.

That said, for its intended use, the original display does the job I guess. Just fantasising over what could be!!

Many thanks
Paul
Thanks.

Graphics commands should be fairy easy. I'm doing the floating point division at the moment and that isn't quite so easy...
User avatar
Martin
Global Admin
Posts: 428
Joined: Mon Jan 02, 2023 5:18 pm

Interesting

Post by Martin »

Paul

That ASCIIart site is definitely food for thought...

I added
IF KEY :RETURN :ENDIF
to prevent the infinite loop in OWL2

Interesting
Martin
PaulK
Posts: 66
Joined: Wed Jan 04, 2023 11:54 am

Re: Just some tinkering

Post by PaulK »

Thanks Martin.

Yes, the code was just hacked together late one evening, and not pretty!

I think there is a lot of opportunity with ASCII art on simple displays like the Org2. I'm particularly interested in the "one line" examples (like the Wave) since these are very well suited to a very limited display. I note that the Psion doesn't have a tilde symbol (~) which a lot of the ASCII art seems to depend on, so you'd have to make an equivalent using a UDG.

It's interesting how the single line "art" relies on the different vertical height variations of the various ASCII symbols to generate shapes - clever stuff, which I guess has been honed over many years, given how fundamental ASCII characters are in the computing world!

Cheers
Paul
User avatar
Martin
Global Admin
Posts: 428
Joined: Mon Jan 02, 2023 5:18 pm

Graphic sets

Post by Martin »

Yes.. takes me back to PETSCII character set?
.
charset.png
.
Jaap wrote somewhere that if you update a UDG in the code then it updates immediately on the screen..

Martin
You do not have the required permissions to view the files attached to this post.
amenjet
Posts: 412
Joined: Tue Jan 03, 2023 7:54 pm

Re: Graphic sets

Post by amenjet »

Martin wrote: Thu Jan 02, 2025 10:02 pm
Jaap wrote somewhere that if you update a UDG in the code then it updates immediately on the screen..

Martin
Yes, I believe that the UDG command reprograms the character generator RAM so any character with that code will start using the new character immediately. The display isn't bit mapped like a computer display, it has rows of characters specified by codes. Each code maps to a bit pattern, soe of which are in RAM (the UDGs).
Post Reply