Painting in Coloric Ascii Art

The Oric video chip is not an easy beast to master, so any trick or method that allows to achieve nice visual results is welcome. Don't hesitate to comment (nicely) other people tricks and pictures :)
Post Reply
jbperin
Officer Cadet
Posts: 38
Joined: Wed Nov 06, 2019 11:00 am

Painting in Coloric Ascii Art

Post by jbperin » Thu Feb 27, 2020 4:54 pm

It is still under development at Oric Software Studios but it may soon be possible to have this kind of render by using glOric:

Image

BEWARE : Video recorded with OVERCLOCK *2 ..

For now the code is being actively profiled and some C part requires to be ported to assembly in order to reach this kind of performance.
DBug's profiler, described here, reveals that some severe optimisations remain to be done:

Code: Select all

Frame:0004 Time=079C08
0x01 079B9D Global
1x01 052F83 glDrawFaces
2x01 00F43F glDrawSegments
3x01 000086 glDrawParticules
4x01 00357C glProjectArrays
5x01 002707 initScreenBuffers
6x01 010682 buffer2screen
7x00 000000 

User avatar
Symoon
Archivist
Posts: 1848
Joined: Sat Jan 14, 2006 12:44 am
Location: Paris, France
Contact:

Re: Painting in Coloric Ascii Art

Post by Symoon » Thu Feb 27, 2020 8:37 pm

Looking good! (on a small screen at least!)
Interesting and impressive.

User avatar
Chema
Game master
Posts: 2570
Joined: Tue Jan 17, 2006 10:55 am
Location: Gijón, SPAIN
Contact:

Re: Painting in Coloric Ascii Art

Post by Chema » Thu Feb 27, 2020 10:19 pm

It looks really great. I was toying with the idea of using text mode for some simple raycasting engine, but never actually did anything.

Great work!

User avatar
kenneth
Flying Officer
Posts: 241
Joined: Fri Nov 26, 2010 9:11 pm
Location: France PdD
Contact:

Re: Painting in Coloric Ascii Art

Post by kenneth » Thu Feb 27, 2020 10:29 pm

Nice result ! 8)

User avatar
ibisum
Wing Commander
Posts: 1216
Joined: Fri Apr 03, 2009 8:56 am
Location: Vienna, Austria
Contact:

Re: Painting in Coloric Ascii Art

Post by ibisum » Fri Feb 28, 2020 10:47 am

Very nice! Culling in the demo was very nice to see.

I imagine with a slightly tweaked CHARSET and maybe using only a quarter of the screen, some pretty performant effects could be had. BATTLEZONE Oric sure seems incoming..

jbperin
Officer Cadet
Posts: 38
Joined: Wed Nov 06, 2019 11:00 am

Re: Painting in Coloric Ascii Art

Post by jbperin » Fri Feb 28, 2020 7:04 pm

Thank you all for your feedback.

I attach a TAP file of the stuff for those who want to gives a try on real screen.

BE CAREFUL : Think of setting Overclock to at least 2

2 functions was translated to assembly for a 25 000 cycles gain.
But still far from enough :?

Code: Select all

0x01 07377A Global
1x01 04CC08 glDrawFaces
2x01 00F431 glDrawSegments
3x01 000087 glDrawParticules
4x01 003579 glProjectArrays
5x01 002707 initScreenBuffers
6x01 0107C2 buffer2screen
If someone is able to test on a real Oric and tell me if it works .. I would be very grateful
Attachments
PopulateMe.TAP
glimpse of glOric with colors
(34.49 KiB) Downloaded 20 times

User avatar
Chema
Game master
Posts: 2570
Joined: Tue Jan 17, 2006 10:55 am
Location: Gijón, SPAIN
Contact:

Re: Painting in Coloric Ascii Art

Post by Chema » Fri Feb 28, 2020 8:04 pm

Hi! I have just tested it in my Atmos. It looks really nice. Sure it is a bit slow, but not as much as I'd expected.

I notice two things, though. One is that sometimes you are setting a 60Hz attribute somewhere, which is well noticed in my TV as the picture gets higher and makes a small "jump". The second is that the program halted after some seconds running.
20200228_195210.jpg
20200228_195210.jpg (590.31 KiB) Viewed 1403 times
Great work!!!

jbperin
Officer Cadet
Posts: 38
Joined: Wed Nov 06, 2019 11:00 am

Re: Painting in Coloric Ascii Art

Post by jbperin » Fri Feb 28, 2020 8:41 pm

Chema wrote:
Fri Feb 28, 2020 8:04 pm
Hi! I have just tested it in my Atmos.
WAOU !! It's the first time in my life that my code runs on a real machine !! Thank you very much !!
I bought an Oric Atmos when I started programming on Oric (4 months ago) but i still haven't managed to put my code in it.
So that's the very first time my code runs on a real machine. :D
Chema wrote:
Fri Feb 28, 2020 8:04 pm
I notice two things, though. One is that sometimes you are setting a 60Hz attribute somewhere, which is well noticed in my TV as the picture gets higher and makes a small "jump".
Yes .. I noticed the same .. and was wondering if it was a problem that could prevent the program to work on a real machine.
I didn't know it was a problem of 60 Hz attribute. Thanks.
There's also a problem with the last lines of the screen .. as though the top of the tower was relected on the bottom line of the screen.
Chema wrote:
Fri Feb 28, 2020 8:04 pm
The second is that the program halted after some seconds running.
Once it stops .. it should be possible to navigate into the scene with arrow keys or A/Q/w/x/P/;
It is very slow ... but you should ear the key-pressed sound if you press an arrow key.

Well .. in any case .. thank you so much for this photo !!

jbperin
Officer Cadet
Posts: 38
Joined: Wed Nov 06, 2019 11:00 am

Re: Painting in Coloric Ascii Art

Post by jbperin » Mon Mar 02, 2020 10:07 pm

After optimisation, the number of cycle is divided by two. So the use of overclocking is no longer required to reach the level of performance as in the animated gif.

Code: Select all

0x01 0314C5 Global
1x01 01BF67 glDrawFaces
2x01 00A911 glDrawSegments
3x01 000086 glDrawParticules
4x01 003583 glProjectArrays
5x01 0026E3 initScreenBuffers
6x01 003F50 buffer2screen
Moreover, the issue about the 60Hz seem to be solved ..

Before the forthcoming official release of glOric, source files of this demo are available in the develop branch of glOric.

and here's an updated TAP file:
PopulateMeCozAmFast.TAP
Accelerated color demo.
(30.51 KiB) Downloaded 17 times
Thanks you all for your feedback.

jbperin
Officer Cadet
Posts: 38
Joined: Wed Nov 06, 2019 11:00 am

Re: Painting in Coloric Ascii Art

Post by jbperin » Sat Mar 21, 2020 9:41 pm

Chema wrote:
Fri Feb 28, 2020 8:04 pm
The second is that the program halted after some seconds running.
Oups I hadn't met this bug ..
As a matter of fact, I allways do the same routine to check for non regression .. and then I hadn't detect that I had introduced some infinite loop in some circunstances.

I think I solved this issue in the version i released here.

Thank you again for your help and sorry for I did not understand properly you remark.

I want to take advantage of this message to ask you if you could have a look at this source code which fits in less than 600 lines of C and which is the clean code for the scene in the demo. I would love to have your opinion ..

User avatar
Chema
Game master
Posts: 2570
Joined: Tue Jan 17, 2006 10:55 am
Location: Gijón, SPAIN
Contact:

Re: Painting in Coloric Ascii Art

Post by Chema » Mon Mar 30, 2020 11:51 am

jbperin wrote:
Sat Mar 21, 2020 9:41 pm
I want to take advantage of this message to ask you if you could have a look at this source code which fits in less than 600 lines of C and which is the clean code for the scene in the demo. I would love to have your opinion ..
I have taken a look and your code is clean and neat! I am not sure what I could comment on it on the technical side. Dbug is much much better than me spotting things on other people's code :) and all I know about 3D is what I learnt (and also moslty forgot) when developing 1337 :cry:

What I can asssure you is that there is plenty of room for optimization if you take the asm path. Clean code with lots of functions and such things, trends to be fat and slow when compiled for the Oric. When I was developing Pinforic (all in C in the first version) I noticed a huge amount of optimization both in size and speed just by removing the use of parameters, replacing them by global variables (I know, argh!!). But the came Fabrice and started rewriting functions in asm and everything changed... the improvement in speed and size was completely unexpected!

I'd say that there could be a 10 factor in speed and 1/10 in size. If your code is already optimized for speed, maybe a bit less.

To be honest, I just gave the code a quick look, but I promise I will look into it deeper as soon as I can.

Congratulations!

Post Reply