It is currently Sat Dec 05, 2020 6:48 am

All times are UTC + 1 hour




Post new topic Reply to topic  [ 39 posts ]  Go to page Previous  1, 2, 3
Author Message
 Post subject: Re: LineXY
PostPosted: Thu Sep 17, 2020 8:51 am 
Offline
User
User

Joined: Fri Sep 11, 2020 1:53 pm
Posts: 25
Little John wrote:
Ivan wrote:
Of course you have to learn new stuff, if you try another languages - what else.
Well, you previously wrote
Quote:
I assumed that [.. we ..] could use the knowledge we already have.
Hence my respective reply.

In this case I was thinking of "normal" cartesian coordinate system still could be used with the features that PB provides. I was surprised of the upside down way, PB way do graphics.

It's is Basic and should be so easy to use as possible and the logic in turning y-values 180 degrees I don't understand, but that seem to be an issue only for me.

I have just learned a little about the unit circle and when I applied my new knowledge the graphic system in BBC BASIC it worked fine.

Little John wrote:
Ivan wrote:
No problem, if you ask me.

I still do not understand why in this message you quoted text from me, and what the purpose of that message was ...
However, when there are no problems, that's fine. :-)

Eh... :-)


Top
 Profile  
Reply with quote  
 Post subject: Re: LineXY
PostPosted: Thu Sep 17, 2020 8:58 am 
Offline
User
User

Joined: Fri Sep 11, 2020 1:53 pm
Posts: 25
oreopa wrote:
Ivan wrote:
oreopa wrote:
Does BBC BASIC invert the Y coords? Didn't know that... interesting...


BBC BASIC does what I have learned about coordinate systems.

For me it's logically when y = 0 then you are on the floor and increasing y-values goes upwards.

And that view goes fine with the origin at 0,0 and move in a quadrant or in an octant 0,0,0


It's not an issue for me for you to have your own preference :) I have no comment on that at all...

I should have been clearer. I was simply interested in the way the BBC is handling this internally... it means that bitmap memory is stored left-right/bottom-up? Or that it's just simply a translation in basic interpreter that y=0 is the bottom? Curious... I will look into it...


If I remember correctly about the BBC Micro Basic I would say that the first address on screen was at the top left corner.

Then coloums of 8 pixels downwards from left to right.


Top
 Profile  
Reply with quote  
 Post subject: Re: LineXY
PostPosted: Thu Sep 17, 2020 12:49 pm 
Offline
New User
New User

Joined: Thu Dec 26, 2019 3:31 pm
Posts: 6
BBC Basic does use 'conventional' coordinates, although it uses 'Graphic Units' in which 1 pixel is equal to 2 g.u. . This of course conflicts with the text coordinate system, unless text was printed at the graphics cursor.
In memory it is stored from the top left corner - getting my head round the way pixels were stored for the different modes gave me many a headache back in the day.
It should be remembered that it was designed primarily as an educational machine so, to me, it would seem to make sense to use the coordinate system that everyone was learning in school.
Having spent years working in assembler, I naturally think of the screen 'expanding' down and right.


Top
 Profile  
Reply with quote  
 Post subject: Re: LineXY
PostPosted: Thu Sep 17, 2020 6:29 pm 
Offline
User
User

Joined: Fri Sep 11, 2020 1:53 pm
Posts: 25
KianV wrote:
BBC Basic does use 'conventional' coordinates, although it uses 'Graphic Units' in which 1 pixel is equal to 2 g.u. . This of course conflicts with the text coordinate system, unless text was printed at the graphics cursor.
In memory it is stored from the top left corner - getting my head round the way pixels were stored for the different modes gave me many a headache back in the day.
It should be remembered that it was designed primarily as an educational machine so, to me, it would seem to make sense to use the coordinate system that everyone was learning in school.
Having spent years working in assembler, I naturally think of the screen 'expanding' down and right.


I'm currently writing a program with updating rulers because of scrolling. It's fairly easy for me to place the numbers in the right positions at the graphics cursor.

I did write some of Castle Quest clone mostly in 6205 assembler back in the eighties. But that was long before I know of any Cartesian coordinate system.


Top
 Profile  
Reply with quote  
 Post subject: Re: LineXY
PostPosted: Thu Sep 17, 2020 7:26 pm 
Offline
New User
New User

Joined: Thu Dec 26, 2019 3:31 pm
Posts: 6
I guess everyone's brain just has a preferred way of looking at things.
When using BBC Basic I've always used a function to 'invert' the y coordinate, just because I think of layout that way.
e.g. PLOT 69,xpos%,FN_yinv(pos%)
A minor overhead, but if you're working in interpreted BASIC, you're going for ease of use rather than blistering speed.

Loved Castle Quest too.


Top
 Profile  
Reply with quote  
 Post subject: Re: LineXY
PostPosted: Fri Sep 18, 2020 12:56 am 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Sat Jun 24, 2006 3:29 am
Posts: 263
Location: Edinburgh, Scotland.
KianV wrote:
Having spent years working in assembler, I naturally think of the screen 'expanding' down and right.


This. That's really why I asked the question.

Ivan wrote:
I did write some of Castle Quest clone mostly in 6205 assembler back in the eighties.

KianV wrote:
Loved Castle Quest too.


That makes 3 of us. The stool/ledge/burning torch/prison cell bed/escape set-piece is one of the coolest things ever in a game.

_________________
Proud supporter of PB! * Musician * C64/6502 Freak


Top
 Profile  
Reply with quote  
 Post subject: Re: LineXY
PostPosted: Fri Sep 18, 2020 9:35 am 
Offline
User
User

Joined: Fri Sep 11, 2020 1:53 pm
Posts: 25
I'm currently writing a program for efficient use of expensive fabric and the user starts at the bottom left corner. As a person I'm more practical than theoritical so The Cartesian coordinate suits me fine.

I agre in the "ease" use of Basic is priotized over speed.

I'm surprised how well the present BBC BASIC hold the speed despite I use lot of arrays of structs and collision detectections. That little experience I have with PB also indicates a high speed as well.


Oops not 6205 but 6502... :oops:

I even remember many of the instruktions: LDA, BNE, ADC ect.

Back then you would use inline [assembler] in Basic and a call to get the speed.

I was and am still impressed how Micro Power managed to control the video chip 6845 with flicker free scrolling in mode 2, 160x256 pixels.

I have recently learned that the BBC Micro had 4 MHz ram speed and was one of the reasons why it's Basic was the fastest Basic.


Top
 Profile  
Reply with quote  
 Post subject: Re: LineXY
PostPosted: Sun Sep 20, 2020 5:13 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Sat Jun 24, 2006 3:29 am
Posts: 263
Location: Edinburgh, Scotland.
Ivan wrote:
I was and am still impressed how Micro Power managed to control the video chip 6845 with flicker free scrolling in mode 2, 160x256 pixels.


I don't know of this specific case, but that's what I love about 8 bit computers in general... some things actually did seem impossible back becuase of the limitations of the hardware, then until some genius comes up with a solution. Usually using the hardware in a non documented way. I think C64 is a contender for most "appropriatable" 8-bit computer, especially in the GFX dept, but that's debatable. There are so many unconventional tricks on C64 such as scrolling bitmaps with barely any cpu hit and the like. The VIC-II chip is very persuadable :)

Ivan wrote:
I'm surprised how well the present BBC BASIC hold the speed despite I use lot of arrays of structs and collision detectections.


I think the BBC Basic was one of the very best implementations in the mass market in the 80s. I know it had things like inline asm and proper procedures/functions. This was lacking in the C64... in fact the C64 basic has to be one of the worst implementations of the 80s :)

_________________
Proud supporter of PB! * Musician * C64/6502 Freak


Top
 Profile  
Reply with quote  
 Post subject: Re: LineXY
PostPosted: Sun Sep 20, 2020 8:04 pm 
Offline
User
User

Joined: Fri Sep 11, 2020 1:53 pm
Posts: 25
Non documented - Acorn tried unsuccesfully to have users to follow certain rules. :)

David Braben had to break almost all rules to write Elite - World first 3D game.

Especially Sophie Wilson was the master mind of BBC BASIC and the first ARM processor.

https://www.youtube.com/watch?v=jhwwrSaHdh8


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 39 posts ]  Go to page Previous  1, 2, 3

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 14 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye