BASIC Graphics on FreeDOS

Поділитися
Вставка
  • Опубліковано 30 вер 2024
  • After buying a thin client for £13 as a DOS machine, I installed FreeDOS and a BASIC interpreter to do some graphics experiments. I'm new to this flavour of BASIC (I think it is QBASIC, it doesn't actually say anywhere) and to DOS in general. I set myself the challenge of doing 3D graphics from scratch without looking up how to do it (I've mostly used the built in help for command Syntax and a small amount of online search to find commands I wanted). I also made a simple "Spirograph" type program which allows you to enter the annulus diameter, planetary diameter and pen radius on a basic simulated Spirograph.
    It's nice to be programming in BASIC as it is the first programming language I learnt as a child, although I started with BBC BASIC on my first computer, an already elderly BBC Micro.
    For anyone giving it a go, it's all school maths, nothing past G.C.S.E. Break the problem down and work out each part on its own on bit of paper, then combine them. The worst bit is defining the models, which I did by hand on graph paper. Initially the cube model was hard coded in the listing, but I realised it was easier to read in more complex models from an external file as CSV.
    One pitfall is that to rotate objects I used Inverse Tan, but you need to check what quadrant you're in and add pi if you're in the... second or third quadrant? Basically if Y is negative, add pi to the resultant theta. ;)
    There are absolutely better and faster ways to do everything I did. I'm not a programmer, mathematician or even competent.

КОМЕНТАРІ • 15

  • @zgintasz2
    @zgintasz2 3 місяці тому +2

    nice. So realistic, even your cat got scared of that missile

  • @devd_rx
    @devd_rx 3 місяці тому +5

    have u published ur code anywhere?

    • @phipli
      @phipli  3 місяці тому +2

      I hadn't thought to, I'm not great at programming and it's currently a mess due to finding my way as I went, both technically and in terms of the dialect of BASIC. I'll have a rummage and see if I can tidy the current mess up and make something a bit tidier. No promises though 😂 I have gotten distracted by repairing broken eBay Voodoo1 cards and building a Pentium III FreeDOS machine.

  • @rodrigogirao8344
    @rodrigogirao8344 3 місяці тому +1

    I think s mething is missing n that car, but I d n't kn w what it is.

    • @phipli
      @phipli  3 місяці тому

      I think I forgot the stereo.

  • @idodo1
    @idodo1 3 місяці тому +1

    Very cool!

  • @antoniodeodilonbrito7643
    @antoniodeodilonbrito7643 3 місяці тому +1

    This is absolutely excellent! As a programmer who loves doing stuff from scratch, this brings tears of joy to my eyes! Sir, you've got a new subscriber now! (And thank you, youtube algorithm, for recommending me this video!) XD

    • @phipli
      @phipli  3 місяці тому +2

      Thank you kindly :)

  • @OfficialJacob
    @OfficialJacob 3 місяці тому +1

    cool shit

  • @BartomiejPoles
    @BartomiejPoles 3 місяці тому +1

    Really nice work.
    It would be great to see a library providing abstraction for creating such things.

  • @claytonbennett7797
    @claytonbennett7797 3 місяці тому +2

    Cool. This is neat to see. Our "ancestors" did pretty well with what they had! Arguably more creative.

    • @phipli
      @phipli  3 місяці тому +4

      It probably counts as cheating when you do stuff like this on 21st century hardware because I don't even have to pause to think about optimisations, in fact, I had to add delays in the loop to slow the animation down. Even something we barely think of as a computer these days is hundreds or thousands of times faster than an 8 bit micro from the eighties. I ran some of these on a 500MHz Pentium and they still run crazy fast, I might try on a 486 at some point (my only 486 is not set up atm). Perhaps I could rewrite it and run it on an Acorn or a 68k Mac.

  • @lamputtales5906
    @lamputtales5906 3 місяці тому

    wow this is really cool! especially when it's C++! I LOVE IT!!!!❤💓💗

    • @phipli
      @phipli  3 місяці тому

      Sorry to say it is in BASIC not C++! But thank you anyway :)

  • @senser1o76
    @senser1o76 3 місяці тому

    Nice!