PureBasic Forumhttp://forums.purebasic.com/english/ LineXYhttp://forums.purebasic.com/english/viewtopic.php?f=7&t=75944 Page 3 of 3

 Author: Ivan [ Thu Sep 17, 2020 8:51 am ] Post subject: Re: LineXY Little John wrote:Ivan wrote:Of course you have to learn new stuff, if you try another languages - what else. Well, you previously wroteQuote: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...

 Author: Ivan [ Thu Sep 17, 2020 8:58 am ] Post subject: Re: LineXY 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,0It'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.

 Author: KianV [ Thu Sep 17, 2020 12:49 pm ] Post subject: Re: LineXY 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.

 Author: Ivan [ Thu Sep 17, 2020 6:29 pm ] Post subject: Re: LineXY 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.

 Author: KianV [ Thu Sep 17, 2020 7:26 pm ] Post subject: Re: LineXY 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.

 Author: oreopa [ Fri Sep 18, 2020 12:56 am ] Post subject: Re: LineXY 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.

 Author: Ivan [ Fri Sep 18, 2020 9:35 am ] Post subject: Re: LineXY 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... 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.

 Author: oreopa [ Sun Sep 20, 2020 5:13 pm ] Post subject: Re: LineXY 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

 Author: Ivan [ Sun Sep 20, 2020 8:04 pm ] Post subject: Re: LineXY 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

 Page 3 of 3 All times are UTC + 1 hour Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Grouphttp://www.phpbb.com/