Is MicroPython better than Basic? Let's reprogram 80s basic retro games in Python!

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] I've been working on myself I really try my best to change but something's another right maybe we should stay in B pretend that everything's the same just a little baby [Music] right the baby we changing can't be help it might just enjoy now we said forever whatever means nothing if we don't give it all we got it we can cry when it's over we can cry it's [Music] over over we C really a good round though but maybe you me love we will Trav Dan road so now we start forever forever means nothing and we don't give it up we can cry when it's over we can we can C over we can C over [Music] love it was special but baby you can't really St St don't anybody I love it was special but baby you can't what it we can call [Applause] so we can when it's over hey we can B when it's [Music] over we can when it's [Music] over we can C it's over we can C it's over over gra over we can find it's over [Music] [Applause] [Music] [Music] a [Music] [Music] n [Music] [Music] la [Music] hey robot makers hope you're having a good day so far so do you want to learn how to convert old 1980s basic games into micropython and run them on a rasby pi Pico then this is the show for you so that's stting my name is Kevin come with me as we build robots bring them to life with code and have a whole load of fun along the way okay let's get to the keynote slides and have a a look what today's show is all about here we go so yes this is all about retro coding and trying to convert some of these old games from basic into micropython and I've got this book um on my desk actually at the moment we'll have a look at it in depth in a minute just hold it up here and this is our original book from the 1980s we bought this one um very very very long time ago probably when it first came out from a local um book shop called W Smiths which is very popular in the UK you'll find at all the airports and transport hubs so let's let's see what we'll cover in today's show then so yes we're going to have a look at some basic code we're going to look at techniques to convert this you could just stick all this in chat GPT but where's the fun in that we want to learn some techniques uh better programing techniques and we can also see how things have improved since the 1980s from a programming perspective particularly for beginners uh students and so on so we're going to we're going to improve a game uh that's that we're going to type out from the book today uh and we're going to run it on a raspber pi peo using micropython because you get that same kind of 1980s vibe from this because running it from the uh the command line from the reppel so this book I've got here then this rainbow book of basic programs it's actually designed for many different platforms that are available in the 1980s so the Sinclair zc Spectrum I think it might be called the timix um Spectrum over in the uh uh the states we had the BBC there's a few variants of the uh BBC um computer the master master B and so on we have the electron as well the dragon Vic 20 uh so yeah these are quite probably UK Cent computers because this book was published in the UK uh but yeah most of these computers if not all of them ran some variant of basic uh which is the beginners allpurpose symbolic instruction code I'm sure that's one of these acronyms I'm sure it just they came up with the word basic because it was a basic language uh and it was created in the 1960s basic by John um is that kemy and Thomas E ctz at dmouth College the idea behind basic was to provide a simple way for students uh to write computer programs and understand the basic principles of programming and what I find interesting is how things have changed in those 30 40 years 40 years is it that old uh since we had um these computers in the 198 is this sort of explosion of personal micros so one of the things I noticed when I look through these uh basic um code things if I just hold up one here for example this is uh games BBC computers play you can see the code just there on the screen it's all in caps so there's no lowercase and uppercase that's something that came along later on with the lights of main frame C and languages like that um and a lot of the times that you wouldn't actually have to type in the whole word so the word print you wouldn't type in p r i n t You' just press the P key and it would have the word print on the actual key itself and it would the whole word would just appear so it's a different style of programming that than we used to now the other thing thing as well is that line numbers are really important in basic programming because that's how we actually address the individual lines of code we can say go to a particular line of code and the code would jump to that section that code block um so there was no functions or anything it was all just one big listing of code and the code blocks um were controlled using these go to and go sub go sub is goto a sub routine which is like a block of code that performs some specific task very similar to how we'd have like a function nowadays and very abl tend it to be single letters so if you're writing a program and you can only have a single letter for the variables that makes them quite difficult to read they don't read very naturally one of the things that's happened over the the course of those 40 years is that we have variable names that are a lot easier to read now they tend to be the word representing what they are rather than just like an individual letter that was really just down to how much space was available on the uh the micros of the day so they didn't have lots of ram to be able to store luxurious names of variables they just had these letters also mean you could only have like 26 uh variables probably so what we're going to do to translate the uh this basic program from basic into Python and micropython so we can run it on this Raspberry Pi Peak I've got my desk we're going to look at any anywhere in the code where it says go sub we're going to change those into functions anywhere where we have variables that have a single letter we're going to change them into a meaningful name so instead of Zed it'll be zombies for example and we're going to change anywhere where they say dim you can see on the screen there line 170 180 I've got dim their Dimensions they are arrays in effect arrays or lists so we can very easily convert those and um comments we're going to add some comments to our code that seems to be something that was missing from a lot of these languages back then as well um they they they would manually put the the the comments in next to the code listing uh and we're going to run this like I said on micropython on a Raspberry Pi PCO as well so I just give a shout out to our sponsor uh so PCB way I'm going to uh do two things I'm just going to go over to this web browser and I'm just going to load up uh PCB way.com so a while back I designed my own uh PCB um which is a Bluetooth remote control for a robot and you can see that it's got Rasberry Pi Pico and I got five of these in one pack so you can see there they have for $5 you can get 10 pcbs uh for $5 which is insanely um seemly cheap it depends on what kind of things you have so this one was a very simple uh two layer uh board with through the whole components and it's simply just got eight clicky push buttons little battery connector and then the PECO just goes into the little header pins there so I I simply just designed this in Fusion 360 there's actually a show if you want to watch that if you're searching my channel uh and then I went over to PCB way and I went into um this screen that you can see now so um I went into the um I think it was instant quote um you can then say what size of board you want to use so what is the actual size of the PCB you want to end up with and that that will Define one element of the price you can say how many different layers you want to have it on so you can have up to 14 layers which is crazy um and then the thickness of the board as well so I just chose some of the default ones and they've got this option here get $5 free prototype order so you're ordering really small numbers they're really good with that it's very easy to uh uh to order basically prototypes of your thing and then when you come to order multiple copies of this um you've got everything good to the go go and you know everything fits and and works the way you want they can also assemble the PCB for you as well if you want from $30 that's for 100 components um sorry they've got hundreds of components from different vendors as well to be able to put in there um you can get rigid you can get Flex um rigid flexx pcbs and they also do CNC um Machining as well so if you want some kind of nice aluminium part creating or 3D printed part they will also do that too um so you can have the full experience of having something manufactured and when I got these I think it was less than two weeks from me actually pressing the button to upload this to actually receiving in the post and the fit and finish of these is absolutely amazing so really really smooth no sharp edges everything was precisely machined no no errors whatsoever in the manufacturing process so can't wait um to start working on another PCB very soon once I've got um open source out the way and uh yeah I'll be definitely returning back to PCB way uh to place a few orders myself so check them out uh and thank you again for sponsoring Today's Show okay so let's get back over to zombies so we're going to escape the swamp and avoid some zombies today let's have a look at this in a bit more detail so this book um that I've got here I've got a little bookmark in so I can just find it very easily there we go this page that you can see on the screen here is from this book and we're going to look through the basic code it's just 49 lines of code they have got some sub routines we're not really going to look at those to be honest uh I could just show you where they are in the book as you can understand what they do and we going to explain um what the main blocks of code do so they've got a nice section on on the screen here if you look at this uh line notes I've got this uh in Visual Studio in a second so we can have a look at this in a bit more detail but they've essentially grouped together blocks of code and they've explained what each of those do because it isn't very easy to read that's one of the first things when I looked at this and I'm quite familiar with programing I look at this and I think GH that's that's a bit horrible that's a bit complicated to read um so then yeah the book has also got instructions on how to play the game and how to win the game how to lose the game so this so we'll have a look through this introduction and some hints that they've got to but that's that's the entirety of the game this is one of the things I love um from the 19 8s you could buy a magazine things like Computing weekly or um there was a crash magazine for the Spectrum I remember used to get that one quite often and they would often have these code listings and you'd have to sit there type away and hope there's no kind of mistakes in it you'd certainly learn how to debug code um if you did come across any of these kind of issues and uh yeah then you could run the game and the game would play a lot of these games did tended to be um number guessing games and very basic games they didn't tend to have Graphics in them simply because it's quite hard to to do Graphics programming on these machines and if you do they just tend to be Lads of like statements to push pixels around and it's not very interesting if you just want to quickly you know have a bit of fun for 15 minutes typing out a game like this it'd be a lot more laborious to do that so how we actually control this game then so in the book they talk about pressing the number Keys one to nine and they've got them in a kind of grid so 1 2 3 4 5 6 7 8 nine in that kind of arrangement we're going to do it slightly different we're going to use qwe ASD and zxc on the query keyboard so we' got like a little control set of keys there almost like a joystick and you can see on the screen there this is kind of what it's going to look like we're going to have a grid we're surrounded on all sides in this swamp so those little stars represent the border of the swamp and the stars that are in the middle of the screen they're quicksand so these quick sand um can actually kill us as a player but we can also trick the zombies cuz they always travel in straight lines um they where they make a Bel line for wherever you are each turn you can basically stand behind one of these quick Sands and they will fall into the quicksand and die and you'll be able to then escape from the uh from the swamp so the zombies will move every time you press return to to move they will also move themselves and we're going to put all that kind of game logic into our game it's quite surprising that they've managed to do this in such few lines of code but this is why it's uh not particularly graphical so you can see that the H where the human Zs are the zombies and the stars that are in the middle of the screen are the uh the quicksand so that's the controls that's how we win the game you like this and you want me to do more kinds of videos I don't know people like coding videos on a live stream let me know in the comments and also let me know what your first computer was I'm really Keen to know you know is it all comod 64s or is a lot of people who had other types of computer in there so let me know in the comments what your first computer was if you've not subscribed to the channel also consider doing that I do go live every single Sunday 7 o'clock British summer time or GMT depending what time of year we're in um so yeah if it's not a day like savings then um we'll be in GMT so yeah every Sunday check out and you can have a chat as well okay so let's code let's get straight over to it shall we so let me bring up uh Visual Studio code and I'm going to talk you through um the code that we have so let me go over to zombies basic and I will also just get my notes up on the screen so yes let me just grab this book so like I said we're going to go through a couple of different things on this uh book so there's this hint section which we kind of explain about how you play the game and then there's these line notes so I've got these line notes kind of typed up here and we can have a look at the basic code side by side with these line notes just to have a quick look through and then we'll start to to do some actual coding um and I also want to show you what this game actually looks like to play for real so I've actually got on this browser over here um I managed to find online the exact game that was typed by somebody um and it's an emulator so you can go down to zombies we can uh hit return and it says there we go so you've been abandoned a lost aodan Ranch of the count Maru is that like is that like um what's the name of that uh famous island where the weird creatures are the island of somebody Maro is it so this is probably just a a variance of that I guess a ripoff of that so the Mad Big Game Hunter oh count Maru as look would have it the only game that he really enjoys is hunting his humans so uh he sets you free on the ranch and within a half day's Head Start sends four slave zombies out to track you down your goal is simply to stay alive so we press the space bar for the next page the ranch is surrounded on all sides by an impenetrable swamp so there's no weight of escaping from here pools of quick sand abound as well so you're only chances to survive is to low the zombies the Zeds um into the quick sand while avoiding it yourself before they catch you your position on the map um is shown by a h which we've just seen already so with each turn you can move by pressing one of the uh the keys numbered from 1 to n the arrow keys on the grid um show the direction in which the play will move if you press 5 you will stay still and kind of not do anything that turn um it takes very careful planning to outmaneuver the zombies it's also completely random where you you are and where they are and where the quick handsand are so let's press uh space and there you go that's the controls again so it's kind of like that uh grid so I just need to make a mental map of those as soon as the keys are all laid out linearly rather than in that kind of um nice grid Arrangement that we're going to do for our code so the zombies always come towards you uh by the most direct route possible they're not aware for example that quicksand is dangerous now this is really cool within 49 lines of code they've got a bit of AI they've got a bit of a a machine it's not learning so much as machine intelligence because how do they know where to go to they're making a beline to you wherever you are so it's quite clever that they managed to do that uh in such a few lines of code okay here we go we also have sound on this one as well we have a few beeps and blops right so there I am right behind um a piece of quicksand so what I'm going to do I'm going to press one to kind of go diagonally up and then I'm going to press um three to go diagonally up again and that zombie that's beneath me is now coming towards me so if I press five he should go into that quick sand he's died the other two now this is going to get a bit tricky because one's higher another's higher and one's on the same level so if I go down say nine and then maybe nine again and try and hide behind I might have messed this up let's try there be one two three four nope no I'm dead I'm going to be I'm going to die now so if I just uh if I just press up I'll go into a zombie so you are caught that's the uh the end of it and that's the game just quits at that point so if you wanted to play the game again you'd have to type in run and then it would just start all over again you can see we're completely randomly generated each time it's interesting they don't use the full screen they just use that small section you can also see the aspect ratio of this is is unusual but this is they had like 40 characters by 20 characters or something on these screens it was uh um not the pixels weren't Square essentially um so that's how you play the game so if you want to check that out as well just go to BBC micro.com book of basic games um part one 1984 there you go you can click on that you can find out more about it you can even download the the code if you have a BBC emulator um but you can just play the games directly in your browser so yes this is pretty neat isn't it so that's what we're going to go for um what else do I need to talk about there so the screen grid which we've just seen as well um we could potentially have different sizes of grid because we could change that just by having a variable for how wide and how tall is the grid grid and the zombies are really just positions in in that array in that grid so really they're just coordinates we've just got an array of zombie coordinates that's really all the zombies are they haven't they don't have any other kind of attribute in our game so they're very very simple to model uh and our position in the grid is also just an x and y coordinate and then the main game Loop itself simply just says um are we in quicksand if we are we dead it is a zombie in the quick sand if so it's dead and it just gets moved off screen to 0 uh if a zombie was has caught us then we die and if we killed all the zombies if the array of zombies is all in that z0 coordinate then we've won the game we've escaped so that's really how the game Loop will work it'll just check for those conditions right let's go back to visual studio code and let's start looking through um I'll bring up the zombie basic code I think it's mostly typed out correctly um so let me get that there and then I'll also try and get these code hints side by side oh so they do have comments in I did say before that they didn't have comments they have these REM these are reminders uh and essentially it's like a comment so REM REM zombies is just like a a statement at the top of your code to say this is the zombies program and then this go sub routine so if I go to this book and I go to the very beginning they've got a library of sub routines and depending on what which line we go there so you can see that uh go sub and it's like 1100 um that will basically say mode five which is like the graph a graphics mode of the uh the BBC vd19 probably clears the screen I'm guessing and then this withth 20 d32 um not sure too much what they do but they're just setting some variables up I guess it's just like the the variable widths of the widths and dimensions of that grid that we're going to draw out so that's what that go sub does that' be better as being a function u in Python so we'll we'll definitely create a function for each of those where we have see go sub uh print does what you'd expect that's very similar to uh microp Python's print and then let if you've ever used JavaScript you'll understand what let is it's a way of defining um a variable and then assigning it a value so let t equal 2 is essentially saying the variable T will be an integer 2 uh we don't have to say it's an integer it can infer that from um the fact that there's just a single letter single value um whole number and the other thing that's interesting is they've got these um these colons here and that means you could write these on separate lines of code but instead they put it all into one line of code um again they got some more go sub routines uh we can jump over that for now because um we can um it'll just kind of stop the flow of what we're trying to do here but we can actually do that in Python if we wanted to a microp python using the semicolon you can put more than one statement on a single line it's just considered to be bad form to do that because you can't really read the code top to bottom which is kind of how we really read code if we're skimming through and trying to find a problem if it's all on one line it might be like the third statement on that line um and you might miss it so it's considered to be bad form but the reason they did this in magazines particularly it's just for brevity for conciseness it means you can print things on less lines so that's what those little col that mean uh I put a space in here just to be able to um align this to these like lines 100 230 sets the area of text and prints the title on the screen so that's what that four lines there does now the other thing that's worth noting on here is these all end in zero these numbers so why don't they just have like line one line two why do they have zero at the end so does anybody know the answer to that uh if not I shall tell you so often when you're writing these programs if you only to think you you write your your code and you think ah I want to insert a line above that one there uh if you'd had your um code with whole numbers rather than these um numbers with zero on the end it quite hard to insert that new line but what you could essentially do if you wanted to put like an extra line on here you could do um oops 101 and then you could just do like hello something like that capitals if we're sticking to the era and yes this this would essentially allow you to insert extra lines in there once you've done that you could then renumber there usually like a renumbering command and it would go through and it would update all the numbers again with hope with um numbers with the zero at the end and it would also update any references to that as well so it's quite clever um somebody's ing this cuz I think these people probably program basic um I'll just bring that on screen actually so I think let see that was yet another one who uh guessed that one first and Bob as well he said allows one to insert a line between two lines so yeah once you do that reum it would update any references to previous lines as well which is quite clever that it could do that but back in the day we didn't have idees we had a very very big basic um programming interface okay so that's how we will do the first block so that's um setting up there the next thing 140 to 160 I mean you could just look at these is like line 14 to line 16 I guess print area of the ranch within which you and the zombies can move that's very odd English so these lines here print print and then another print so if you do a blank print it just goes down a line a bit like a printer I guess and then print we'll just print out a whole bunch of stars to start the grid and then we got little Loops so 4 I = 1 to 13 that's almost like python um so we can see there that it's going to basically print out um a star a load of spaces in the star so that's going to form our grid and then next I is um incrementing the value of I so essentially what that does is just says if I is one it does this increments I I is two and it'll go around until um just like a regular for Loop we've hit that main value there 13 and then it prints the the bottom of the grid area so that's nice and simple we can convert that into python very simply so then from 170 to 20 uh 210 the starting positions of the zombies um uh which are randomly chosen as shown again this this language is like from the 1980s as well it's a bit back to front so we're going to basically set um some random values for our zombies and for the um quick sand as well so there you go the next bit 220 to 240 randomly choose quick sand traps and place them on the screen they're just again positions in an array and then your position will be placed on the screen as well at 250 uh so that's just a nice simple one so let's scroll up to 250 so there we go so they've crammed in uh one two 3 four five six is that six lines of code seven lines of code eight lines of code um into one little block of uh code there um and again they got some Go Subs that do various different things we can skip over that okay then the position on the screen so we've done that one and then your position your choice of mve is registered so this is going to read in from uh the keyboard um a character so we can we can emulate that using the import command on microp python it' be nice and simple to do and once we've done that um we can act upon whatever key press or whatever Direction we've done the game Loop can then update the new position report if we hit the quick sand straight into the swamp or caught by zombies or with' one so lines 290 to 370 will basically update that game Loop so yeah there's a lot of lets in here lots of variables being set lots of um for loops and so on so we're going to unpack this so I'm just going to move that basic program to this side over here here and what I'm going to do what I've started to do just to make the uh the show a little bit quicker because it'll take a bit of time to type all this out is I created a skeleton based on those um those blocks of code uh that we've just looked at there so line 100 100 to 130 sets up the area of the screen so this is going to be the set area of the screen print title so this initialize screen function with print zombies and then print a new line that will basically represent present that uh and then these other ones I've just put the word pass um with a function name so let's have a look there print the area within the ranch which which you and the zombies can um so just got something in the way of the screen there um with which you can move so that is essentially that uh that line there and we're going to fill this out in a second we're just going to type the code in ourselves so you can see what I've done there for each of these blocks code I've created a function in Python just put pass for now which just does nothing and I've also put some um some parameters that we can pass just to make these a bit more useful so um you can see the get key press will be um registering the choice um of our um whichever move command we say and then the most of the game logic will be in the last block in this main function so so let's go up to the top and start writing some code so I'm just going to get up my on my other screen over here uh some sample code that I've started to write okay so the first things I've done I've just imported random because we've got a lot of random number generation uh to start at the start of the game to guess where the the zombies are going to be and where we are and where the quick sand are going to be so we definitely need to choose random and I've also included time just because we might want to put a little delay uh whenever we print something out to the screen the next thing I've done is I've created two variables one for grid width and grid height so we can change this we could have a much larger Grid or a smaller grid depending on going to make the game easy or hard or longer to to play or not um and then we've also got two other variables so how many zombies do we want so the original game had four zombies hardcoded and the width and the height were also hardcoded we've got this quicksand count as well so how many quick Sands do we want to have in the game that might make it easier because we can hide behind them we might also get trapped randomly so um depends on on how we want to uh to play that we can make it easier or harder right so we've I've already filled out the initialized the screen section of the code so let's do the get random coordinate piece right so this is going to be a very simple um line here so let's just remove pass and let's say return and this is going to be random randant one and then limit so limit is being passed in so what's the highest number we want to get Rand number four and we're basically just saying choose any random integer between the value of one and the upper limit and then just return that back so get random number we'll simply just return that random number within the range that's nice and simple to do uh next is creating this empty grid right so we'll probably want um some kind of array to be able to draw this in so let's just do a a nice empty uh list and I love how uh Visual Studio is trying to guess what the code is going to be for this and it's not wrong so we can say for underscore in range height now underscore if you not used that before in micropython sometimes you want to know what the value within the loop is sometimes you don't care you just want to go around the loop a number of times so if you don't care what the value is you can just do an underscore uh and it doesn't have to store a value it'll just go round the loop so we're saying then row equals an empty um array an empty list and then for um the range of the width so however wide our array is our our grid is um then we can basically just put an empty character in there and we want to append um this new r that we created to our grid so grid. append will'll just create that as a new line in our grid so we just need to do that and then once we've done that we can just return that grid um back to whichever function is calling it so that's nice and simple to do uh we can also have along this side here if we want to compare how they did it in the original code and what we've come up with uh so let's just find that starting position of zombies they said that was um let's see 170 to 210 so let's go to 170 to 210 so they've got two um two arrays q and Zed uh and we have two arrays uh and they've got eight by two which is I think this is where they're just starting out with the the number of zombies is four um and they've got a second element to the array which I think is where the positions are going to be and the Q I think is quick sand as a guess so we need to create um something to hold that later on in the in the main game we can actually move that to the the main game Loop instead but that's what they've done there um and then they will print the Zed on screen um when um we draw out the zombies where they are so that's just going to create our empty grid we want to then have a draw function right so let's go down do our draw function next this has got a bit more meat to it so the first thing we want to do is we want to create that empty grid so we've got the function up there already so we can just say grid equals create our empty grid we can provide the width and the height uh because we've defined them above as constants and this is one of the new things that we do in micro python as compared to basic we can use case to represent different things so uppercase characters in Python and micropython usually Define this as being a constant whereas other variables such as the grid can be lowercase so and we also use snake case rather than camel case which is popular in like JavaScript and snake case just means you have these underscores to separate words whereas camel case would have the words squished together and the only way you can see the different words is by the first letter of the word word will be capitalized um so that's just a variation on house style right so the next thing we want to do is place our quick sand in the grid so we want to save for x and y in quicksand um the grid uh y - one and x - one so basically at the very start of our grid we want to draw a star so that's going to draw out um um the quick sand with within that um within that grid uh that's going to draw the outline I guess isn't it uh let's just have a oh so we're going to pass in sorry quick sand which will have the locations of these quicksands in so wherever they are X and Y within um that being passed in we will draw them on the screen in the grid so there we go so next we want to uh place our zombies so let's place our zombies on the grid uh there we go so for x and y and zombies zombies is going to be passed in as parameter as well and if X is not zero and Y is not zero that's when they're in the sort of they've been killed and they're in limbo they're in Zombie Heaven um so if they're in z0 if they're not in z0 they must be on the on the main um board and therefore we can actually draw a zed wherever they appear so the grid coordinates X and Yus one we can just draw them on screen so that's going to place the zombies on the grid next up we want to place the human on the grid so that's just one of us so so we can pass in the human coordinates for this uh human X and human y will become equal to human human has got two variables in it um so that will work fine there and then we can simply just say uh grid human minus y minus one and human x - one equals H so that'll just draw that nicely on the screen right so now we need to draw the grid and its borders so we want to print this is a nice piece of python I think so just show you this so we're going to print a star and then this star is separate from the Star that's inside the speech string uh and this means rather than just drawing one draw it multiplied by a number so the number is the grid width plus two because we want to have a little bit extra because we've got some um columns going down either side so that's a nice little hack rather than having to count how many stars you have like they have there and how many is that is it 18 or something if I remember when I counted that we don't need to do that we can have it dynamically draw based on the width of the grid that we've provided as a constant okay next up then we want to uh let's see a little for Loop so for rowing grid and then we want to place this star plus we want to join that together so this join is like a string routine um and it's going to join whatever we've got in the row plus the uh the other star so it's it's going to just draw them with a blank bit in between essentially okay that's that and then we then want to print um the under the underneath piece which is similar to that one there so just do a whole bunch of stars depending on the width of the grid that's it that's how we would draw our um our grid next up we want to have a delay so this is simply just going to do a Time sleep for how many seconds we pass in it's a little bit redundant that we could just have sleep and seconds in our code if I was probably going to rewrite this I probably wouldn't have that as a function I would just call the Sleep function within the code it's a little bit over engineered to do it that way but there we go right the next bit which is getting our key presses so let's have a look what that looked like in um this other block of code so this was 260 to 280 let's have a look what they had there 260 to 280 so let's a see so they've got a whole bunch of these uh Go Subs I guess they're going to do the the keyboard reading routines so we can uh put that into our code here no problem so we simply want to say what direction do we want to go in so direction is going to equal input and then enter the directions and we want it a little bit different than that so we want it to be um W equals up uh x equals let's do Capital equals down um s equals stay still that's in the middle uh a equals left and D equals right uh Q equals oops let me just scroll that across there uh which is left and up so up left and we've got e is upright Z equals down left and finally C equals downright okay so this input command if you not use this before in python or microp python this will essentially just ask the user um it'll print whatever you put in there on the screen and then it will accept whatever you press so it receives as a string essentially so direction will be a string uh hopefully a single character of the direction we want people to to travel in okay so next up we want to say some if statements so we will say if Direction uh and let's do equals W then essentially we're going up so let's uh do that uh else if Direction equals X then we want to go down like so if the direction is s we want to stay still so we don't do anything let's just have that little comment there it's a little bit boring this piece then a equals left that's correct let's do that oops so that comment to be in there just so we can see D equals right there we go it's helping the auto complete help me out I'm just checking that it's guessing correctly so this should be up left there we go and then this is e which is up right then we got Zed which is down left just Ty in that comment there down left and then C is down right there we go that's it and then we'll have a final else um if they've not typed in any of those characters it must mean that they've typed in something that's not a valid character so let's just say input invalid please try again um there we go and then we can return the get key press oops so let's just uh return that and that basically just does keep calling try again if the input is invalid there we go right then we're going to get on to the main Loop of the game so we started out here we're initializing the screen that's going to print the zombies um then we have um three variables so human zombies and quicksand so these are all um well the human is just a symbol two coordinates so human equals get random coord with the grid widths so that's going to give us a random coordinate between one and whatever the the grid width is so we had a grid width of uh is it 20 um then it'll be 1 to 20 and then we're going to do the same again for the the sort of y coordinate so get another random one between the the grid height one and the grid height and then for the zombies we've got um an array of these so want to do this four times or however many times we've got in our zombie count so forever value in the range of one to zombie count create four zombie coordinates randomly and then the quick sand is the same kind of thing but however the quick sand count is we could just have one count if we wanted the the number of zombies and quick quick sand to be the same but I wanted to have them both separately just so we could tweak it and have a bit more fun in our game right and then we've got um draw the grid so we draw the grid we pass in the humans the zomb is in the quick sand as parameters it'll then update the screen and then we've got this uh key equals get key pressed so let me see what we need to do um to build out this code because I think uh I think I'm going to get rid of that uh let me see no no it's going to be Direction so Direction equals get key pressed and that should be the name of that function that we've got up there which is get key press there we go and we want to set our human X and Y coordinates so let's do that let's just set that under here so uh human undor X will become equal to uh plus equal so whatever the current direction is just add a value to that and similar with the human y we're going to plus equals the direction why is it not happy with that it's because I've done equals as well there we go so this is the same as typing out um human x equals human X Plus Direction so that's all that's doing there uh so we probably just need to update a little bit of code so that initialize human let's just have a little block of code down here because it's saying what is that that red underline is telling me that we've we've missed a step out here so let's just do that so human x uh equals get random coordinates and that's the grid width minus two cuz we don't need the extra columns on the end they're kind of not valid space do the same with the grid height and then the human equals the human X and human y so that is going to be a little little array of those two coordinates X and Y right so that means that this now is valid down here which is good so what we want to do next is we want to check if the human has escaped so let's let's type that in there we go so let's just do check if the humans have escaped and we can just say if zombies equals and then and two equals means we're doing a compare a comparison between two things if you did one it would be an assigning of a value so zombies equals equals is is this the same as so let's have in there 0 0 um if the if the human has escaped essentially all the zombies are in Zombie Heaven which is position 0 um so for um underscore in range and then with zombie count whatever that is zombie count U all the zombies have been caught and we can say congratulations you've escaped something to that that effect you've escaped other the zombies congratulations there we go and we can break out so break will break out of this while true Loop it'll end the game so that's the first condition that we've tested for um we can then see if the human is um let's just update that so is the human out of bounds and this is just another simple test to see if the uh the X and the Y um are within the swamp and if we triang go outside that um it'll have a a problem so let's just move that so we can see this line here so if human X is in one grid width or human Y is in one grid um height in basically just checks all these different things so if human X was for example three um is three in one or is it in whatever the width is 20 so we're checking for these extremes here three isn't within those two things so that would be uh false or the human Y is in one and grid height so it's just checking to see um is our position in the very left or very right position or very top or very bottom position of our grid whatever our grid height and width happens to be just want to see why that's unhappy up there that's because did I just need to get that off there and then add it to the end there sorry bit of a typo there okay um so if we are if if we are within the grid we could say you're in the swamp continue so it'll carry on checking to see if there's a anything else so let's do another test so um so that that's the human has escaped that's the human is in the swamp and if the human is in the quicksand is next so let's just uh do a little comment for that is in the quick sand okay so this is just another check um if human X and human y uh is in the quick so let me just find that quick sand which is just our little array of positions if it is then we can just print out you are in the quick sand break because you've died you've you've you've gone to a human Heaven because you've stepped into quick sand and you've uh been swallowed up by that uh now the next one is let's see if we've been caught by a zombie let's do that why do I keep doing that there we go so this one is if the human position the X and the Y is within the zombie array so if we're in the same position that the zombie is in then we are dead so we've been caught by a zombie we can break out there and then if not we can then update the position and redraw the uh where we are on the screen so let's just do human equals human X and human y we can then draw the grid and we just need to pass in the updated variables for drawing the grid and then we can have just a bit of a delay for uh half a second and then we can move the zombies towards the um the human so let's do this bit so for let's do a for Loop for I in sorry I comma because we're we want to pass in a couple of things there so zombie x and zombie y uh and then we're going to enumerate them which basically just means we just want to provide like a one two three four a number for each of these and let me just I think it's trying to guess what the code is there and that's not what we wanted it to do um so if zombie x um equals zero then we can continue we can skip any inactive zombies if the zombie is the call at the end of there the zombie is in zombie uh hell we know both if any of the positions the x or the Y are in zero that means it's in limbo so we could just look at one of the values just for for Speed um so that means it's a we don't need to calculate it position and move it on cuz it's already there uh the next one then we can say uh move the zombie closer to the human so let's do that this is quite clever because this is where it's kind of magical because it looks like they are going toward you so if the human X um is not equal to the zombie x position then the zombie X plus equals the the zombie the human x minus the zombie x and then this ABS here uh this is going to um we're going to divide it by um let me just pull that up and show you what that is there I want I want a better explanation of ABS it's not got it to hand so let's go um python ABS let's have a see what that is so Returns the absolute value of a number so it's essentially just turning a floating Point number into an integer I guess uh so we can do that in Python by doing the double slash so this slash slash if you divide a number by another number normally get a floating Point number so if you divided like three by four you get a floating Point number if you do slash slash you'll get the nearest whole number so absolute number will do the same kind of thing so human x minus um zombie x is just going to bring us that big closer uh we need to do the same thing with the Y um axis as well just get rid of that so if human Y is not equal to zombie y then zombie y plus equals human Yus zombie Y and then divide by the absolute position of human y minus zombie y so that will have the effect of making the zombie walk towards us which is really cool so we need to see if the zombie has fallen into the quicksand so let's just do that just a quick comparison between the zombes position and the um any of the possible positions of the quicksand so let's just do that so if the zombies X and Y is in Quicks sand which is just an array positions then we can say zombies I and then let's do the array there so we're going to put him into the zombie Heaven zombie limbo and then we can press um a zombie got stuck in falls into the quicksand something like that we can continue in our Loop and let's just check then if the zombie has caught um we want to see if the zombie has caught the human so check if zombie catches the human uh and this is another comparison so if zombie x and zombie y equals the human so if we occupy the same space in the grid then the zombie has caught us we break because we've died um and that's the end of the game for us right we then just need to update the positions and draw the Grid at the end of this Loop so let's do that we can get rid of that one I think we've done that one before so let's check um get rid of that so let's update the zombies position redraw red draw the grid so zombies I equals zombie x and zombie Y and then we can just do a draw grid sorry that's yeah this is all within a for Loop for I which is just the position in the the array that we're currently looking at then we're going to we're going to draw the grid human zombies and quick sand and then we'll just do a little delay for half a second and then the that is it so what we need to do next then is just have if name equals main then run main so let's just back that off to the very beginning like so and I think that's it right I'm going to try and run this let's see what happens we might have some issues uh it might run really nicely so this is called Zombies Part One let's just try and run this here and we've got an error there so so this is in the if on line 132 so let's just find that there we go you can also just check if I just remove that you can see there's like a little red indicator there that means that this uh it knows that there's a problem in the code and it's highlighting it so that now looks like everything's green so it should run there we go right so we just scroll up we have dot dot dot zombies and we've got a grid so that's a zombie that's some quick sand here we are so it's not looking great I'm going to try and run across here and duck down here but this is going to be in hot pissu and he can go diagonally as well remember so he's going to be right behind me I think this is not going to end well for me interestingly this zombie over here keep your eye on this one he's right to the left of a piece of quicksand and he's in the same line as me so if I move right which is what I'm going to do he's going to hit that but this he's going to go down and he is going to come I'm saying he they're all he's in this in this universe right so I'm going to hit um the D key to go to go right so let's do D so you can see that one that one died that one came close this one's in Hot Pursuit I'm going to see keep doing D and see if I can outsmart him and then when I get to here I'm going to go C to go down and if I go right he will die if I go down he will follow me down and kill me um he could could actually get me at this position so let's see if we do D let's see if we can get him there and then this is not going to end well cuz if I go up now he's going to be able to go diagonal to get me and then the game's over so let's just do that W to go up uh it looks like we might actually be one yeah we we're just one step ahead of him so I don't know how we can easily out run him no there we go the zombie catches you and we've died and that's the game over so we can now try this game um on a raspber pi Pico so let's go over to thony um I've got the the version of the game I typed out just to to to check the code before I did the live stream so this is the same code that we've just seen typed out there but I've got a raspby pi Pico plugged in uh just got it just here and we're actually going to run this game on a microcontroller and the reason I like this is because we just dropped it down there and it's just decided to go off let's just uh unplug and plug that back in again let's just hit the stop there we go I'm also using the absolutely bleeding edge version of micropython 1.23 which has the USB device uh stuff we're going to definitely do a show about that USB has essentially now hit uh micropython so we can do like make our own mice and keyboards and stuff like that potentially so we'll have a look at that there's not many tutorials out there about this yet so uh I might be one of the first to do that right so let's run this and let's see what happens so we can expand out our terminal so that we can see what's going on a little easier there we go so zombies so we're over here so let's make a be line for this top area over here so I'm just going to hit uh just put my cursor over there W to sort of go up so I'm pressing W and return and let's see if we can hide amongst some of these so so something weirds happened there looks like I've actually wrapped around the top of the uh the screen I didn't know you could do that so oh let's just go left then oh I got caught so I died so we can we can play that again let's just do run one more time there we go um oh grie so there's a zombie right on my right in my back already so I'm just going to go diagonally down I'm going to hit C oops see in the terminal let's go left I like the way when they updates you you you see all the zombies sort of move around there it's just like a a Chase now let's see if I can get ahead of him and then duck down here oh so what happened there it looked like um it l like the P just rebooted there for whatever reason so yeah so each game is completely unique there used to be a game called Rogue back in the day I remember playing this on the PC but I think it even predates PCS it was like a Mainframe game and that was like a generative dungeon and you could find like amulets and food and there was all kinds of U zombies and other creatures that would chase you around and it's very similar how it drew out on the screen uh to this so yeah this is a really fun game doesn't take too long to type in and if you want to grab a copy of this I'll show you where this is so if you go to um gith hor SL kev's robot sorry Kevin Mia SL retrun you'll find um all the code there the original zombie basic there uh as well as the zombies. py the zombies1 is the one that we've just been typing out uh during this live stream so you can grab this code load it onto your own microcontroller it should also work with um the aduino esp32 if you load micropython on there as well cool so let's get back to our Keynotes and uh let's see what we've got left of the show so if you want to get yourself some merch you can get yourself one of these amazing robot maker hats and help support the show at the same time so go over to K robots.com merch to check out all the merchandise that's available and if you want to join on uh Discord we have a Discord server just called to KES robots.com Discord to get a free sign up link for that just ask you for email address and if you want to follow me on social media I'm on all the social medias so you can go to uh uh what's that one threads so I'm at Kevin mle threads. net I'm on Tik Tok Kevin mle 6 I'm on Instagram at Kevin Mia on X at kevm on masteron social kevm do masteron social and I'm also on Blue Sky at kevm mar. B.O as well and you get all kinds of behind the scenes pictures and video clips I was doing a couple today of volara which is just behind me that's now all up and running you press the button and she animates and does all kinds of cool effects and if you want to join as well you can do that a number of different ways you can do a super chat um super thanks if you're watching this live now um you can join the YouTube membership program which really helps out to support the channel you can also buy me a coffee as a one-off if you wanted to do that too go to k robots.com coffee all the links and instructions are on there on how to do that so I want to give a big thanks to all the people who've supported the channel so far so uh John bought me three coffees this week which was very very generous thank you for that John uh somebody else wanted to remain nameless as bought coffee as well and so did Lori and Tom thank you for that guys I really appreciate it and members wise we've got shmy we've got Lee we've got Alvaro we have Marie we have Jeff we have Dean Cy marene Tom and Steve Phillips as well marene actually donated her BBC uh computer I've got that uh in the the in main part of the house that one still works I can switch on I could load this code and run that on that original BBC from back in the day the other thing I just want to note um where was that uh book that we had at the very beginning that I thought was quite funny must be this uh this one here games BBC computers play in in here there's actually a library card and it says St cuthbert's Secondary School Bolton and it's got a date in there the last one was the 28th of February 88 now an interesting fact when I went to high school my brother went to St cets and I went to Mount St Joseph's these were two schools that were being combined into one and St CIT doesn't exist anymore it's now like a housing estate that one um got knocked down and actually my brother went to St augustin's not St CET so I was going to let him off there I was like where's this come from I probably had this um because it they were probably getting rid of laws of old books thank you Matthew for subscribing really appreciate that so yeah it wasn't um my brother went to St Gustin which got also knocked down and turned into a house in estate St curs I think Jenny went to St cuthberts we kind of split it like like the first second years went to that and then they would go to the main Mount St Jon's all Thorley um it's all history of Bolton here but yeah interesting that that was like if that if the library fine was still on that one from 1988 that's quite a long time ago anyway we get distracted so YouTube membership wise we have Alondo we have Paul we have Johnny we have uh Dale from hybrid robotics we got Wayne Sorry Warren we have Steve Steven we've got Jonathan Ox 39 John Paul jolly alist where Cassie how you doing Cassie hope you're um healing good we got tinkering rocks got JDM Johnny bites we have handsome cheer lights Michael and of course we have Tom so if you want to help support the channel you can do that by going to K robots.com credits and get your name in the credits too right I think that is everything for this week's show so it's at this point in the video where YouTube will recommend another video over here somewhere so please click on that watch that if you're watching this on replay and I shall see see you next time and if you're watching this live with me now let me just hit the stream marker button and let me see uh what people have been talking about so yeah wow there's been quite a few comments going on here let me just scroll all the way to the top here oh God people have been telling me what their first computers were I was very interested to know what that was here we go so nearly at the top now it's funny people are saying that they've got that same book right there we go so yeah um just at the beginning of the stream there um Marie was saying um that she is uh having an earthquake where she is so I hope everything's okay there we're going over to San Francisco not NE next week the week after for open source so I wonder if we'll see any or feel any earthquakes while we're there so here we go here here we go so uh yeah should be great for printers let us know how it goes should be a great PR all that's the bamboo you were talking about this is going to be good says Ford hope so it was really fun to uh to do the conversion I remember looking at some of these um these games and thinking God that's horrendous how did you ever understand what was going on behind the scenes and I find python a much simpler language to be able to model in your mind what's going on there a lot clear what things are but maybe it's just because I'm not as familiar with basic because I'm not using that day to-day so what does aski stand for that's the American Standard code information interchange I know the whole 255 characters at well remember like like was it character 13 was like delete or something yep I remember those back in the day it was one of my first um Pascal programs was to create the asy table so um Danny says I remember that book well yeah it's a really good book there are some really fun games in here actually um I'll maybe have to look at some other ones uh for future ones some of them had like really interesting sort of graphics and you thought wow you know I want to play like that game there and then you look on the screen and it's just like a little pyramid of uh you know asterisks there we go but you got to use your imagination it's about learning the code rather than is the amazing Graphics but Danny says love the idea of taking all basic programs and trying to uh make them with python gaming libraries yeah and it wasn't me who came up with this idea originally uh Carri laa did a YouTube video on it quite a while ago like a week or two ago and I remember thinking like that's so cool that has been on my bucket list I've just not got around to doing that and uh I thought why not give that a go uh I think she didn't use um functions in hers and I was thinking yeah maybe we can use a few more you know more modern techniques for for doing this CU these didn't have functions in them and it's like how how did you get by with this spaghetti code of Just Go Subs and go-tos so yeah yeah another one says unicorn regular font would be a good choice for the uh for zultar unicorn regular I should have to check that out so um if I spin this camera around here be able to give you a bit of a a demo of uh what soul tile looks like I got to there we go excuse all the mess in the robot lab so yeah there's a there's a a font up here did this on the Cricut and there's a little crystal ball that actually lights up and she opens a a mouth when when you press the uh the button that's just down there so yeah I'll I'll do a show about that one separately um because there's just so much I want to show you about that Jenny SC skiing yes Jenny that was one of our I think that my first game that I played we had the uh Zex Spectrum Horizons tape which was like a a tape of those of um demo programs there's one on there called Draw and you could draw like vector graphics on there I spent hours on that I like the way that it would remember each thing you told it to draw and then you could get it to refresh and it would sort of um refresh everything uh draw it out one bit at a time time there we go AAL b + 1 / 5 there we go which more language is used UK English I failed the spelling test at school because I spell color the American color yeah it's weird I think it's more of a French spelling of of color is it we have a a very mixed language in the the UK because of all the uh the Vikings and the Normans and the you know everybody that conquered us at various different times yeah so we use REM for comments thank you that I did cover that later on but at the time I was thinking did we have comments they weren't very easy to to sort of spot I think hey Cassi so Bobs how are you all Library needs these types of books too maybe that maybe that's what I should go for this kind of uh um basic games types thing for for micropython I'll have a think about that I've definitely got a book in me this year I think I need to get started on that soon Bob says I remember those days type them into my Apple to yeah awesome awesome times Cass used an amstrad CPC 464 wow hey Nick how is it going let see so Cassie's first computer was a zx81 so I think we had I don't know if we had use of one uh we didn't have our own zx81 but I remember having a play on it and uh it was black and white was the thing I remember and as you typed each key the screen would Flicker and it's because the processor was was trying to either read from the keyboard or update the screen and it couldn't do the same at the same time it was uh very very slow and the Z x82 was actually the ZX spectrum they just called it spectrum because it was it had color that was the main upgrade as well as a slightly faster more RAM I think zx81 had 1K of RAM and the ZX Spectrum had 16k as I remember so yeah the timx Sinclair which is the ZX uh spectrum that was Craig's first computer so interesting they call it Timex maybe they just had a different company kind of sponsor the name over there some where he had the uh Apple 2 e Jeff had the timic Sinclair as his first one as well yeah David's first computer was a comodore 64 which is they seem to be very very popular uh you can get your hands on them as well quite easily nowadays they had really nice keyboards on those the thing with the Sinclair ones they had like the rubber keys or the just the membrane uh and after a while that would really great on you they very hard to type on the BBC had a really nice keyboard it was slow but it was nice and uh nice and clunky so yeah Jenny yours was the BBC Master Jenny's story with the uh the BBC Master is she saw that there was a a program you could like type list you to see like or was it cat to see like a catalog of everything that was on a disc and there was a game on there called squash and she was like oh I'll play Squash it turns out that squash was actually a comp compression program and it would compress all the files on the disc uh so you couldn't actually use them so that was Jenny's most experience with playing with that I remember that well uh so it says my first computer I used was an IBM 360 wow that's impressive that's like a proper iron um main frame isn't it island of Doo thank you Bob thank you that was what I was trying to uh to get at so yeah they clearly uh done a pasti of that so Sparky in the house says zedex Spectrum 48k awesome I think we had the zedex Spectrum 16k and then we had like the pack that went on the back and that gave you the uh the extra Ram uh and then I think later on we we must have got an upgraded motherboard because um we we swapped out the entire thing into the plus one case which had like nicer keys and a reset button remember I remember that being like the rasby pi getting the onoff switch um the reset button was like a big deal for the spectrum because otherwise you had to like pull the power out and get back in and everything was connected to the cassette tape as well so the MBM IBM 360 implemented a lot of what we used today absolutely yeah a really um seminal piece of kit that wasn't it Loris says my first one I owned in graduate school was an IBM 286 clone couldn't afford one before that I had an 286 I remember it really well so my dad used to be um a computer engineer back in the day I think he worked for thorn Emi and uh and various companies before that and um we I had essentially every PC um because they had spare parts we could assemble enough to make a computer work so I had a 286 and a 386 and I think by the 486 I was in uh college so I could buy my own motherboard memory graphics cards and all the rest of it but yeah the 2x6 we had didn't have any graphics cards capabilities it just had um was it Hercules Graphics like this green screen so yeah remember that back in the day and when VGA came out that was a big deal we were on EG and CGA before that sort of color Graphics array when he says uh Apple to was first computer you owned so the IBM 36 implemented multitasking and virtualization so there's a really good book about um IBM I think it's the 360 um by Fred Brooks the mythical man month and I'm a project manager by Trad and this was about um how the very early Beginnings in the 1960s of like proper professional project management for this IBM 360 project um and they they essentially thought if we put more people onto this project we'll get a quicker result because more people means more work more work means that there's like more achieved in that time and they hadn't factored in things like communication so what's the optimal size of a team is it 300 or is it six like in the agile kind of style so yeah there's a there's an awful lot that was learned with the 360 not just in software but also how to manage large projects so yeah this it's really good book worth reading that so uh he died green game over love it so wow IBM 360 I did have a mini computer for a while we had uh a an was it an ICL it had a perq was the name of it P RQ and it had a graphics screen it was like a CRT but it was port not landscape it was very unusual design had a mouse as well and it was absolutely huge so the hard drive in it was about 20 meg but it it was about the size of a dishwasher it was massive Martin says I had a commodor 64 light fantastic pack which came with a light gun it came with some uh games like Batman and pop quiz awesome so Ryan says uh I was I was Commodore 64 but as odd as it sounds I L thrown a Vic 20 and a Specky 48 um I program the BBC micros in school yeah I remember playing very briefly we only had one BBC micro in our school it was like a little troler the had to wheel out uh and because it was only one um you didn't really get much time on it I do remember playing that game with the um the chicken The Fox and the seed and you had of the Grain and you had to get it across the river you it's like a logic puzzle I remember playing that one and figuring it out um as like people were trying it and not been able to get there I just sat there and figured it out and then played it and it was fine so hidden yes in college I had access to Through Chemistry course Fortran ruled at the time via Punch Cards wow Vin says uh we used BBC at school and I had logo and the and a logo robot absolutely so one of the things I've been looking at for Burger bot is implementing like logo on that it shouldn't be very difficult to do so yeah yeah so you can do like PD that was Penn down I remember that one V that would make the uh the pen go down on the robot forward 100 so it go forward 100 units of measurement then it says I encountered logo a bit later on with the amstrad pcw um and then people answering that yes it allows you to insert lines that was one that's asking why do they always end in zero the the line numbers um Bob says allows you to insert line between two lines so you both get you both get it basic uh so Donald says I'm late my first computer was a Sinclair 1000 with 1K of RAM used basic um but had to learn assembler in order to do real programming and then went to commodor 64 so I have on this desk actually this book um my brother I think used he learned machine code for the zedex Spectrum I remember finding like lists of just ones and zeros pages and pages of these and he'd actually made his own compiler so he could write um like assembly code and then his his compiler would compile it into machine code and you could do some really clever like sound he was really into like music you could do some really clever sound like having drums and multiple different instruments all through a speaker buzzer which is just crazy that you could do all that I remember listening to what he created that and just not understanding how those ones and zeros could possibly mean anything to anyone yeah so that's that Bob says I think if python had curly braces I'd like it we don't like any of that nonsense it's just a cruff just gets in the way so Fox tronic says uh just want to thank you for everything you do brother oh appreciate that thank you very much and Donald says huge gr congrats for huge I think I inserted that he said I think it's because I read hudic and I thought that was huge K congratulations for reaching 30,000 subscribers just noticed I really appreciate that Martin says I think the Commodore 64 you could enter a number and it would what's that sort itself um out for line numbering when you typed list cool yeah not played on that one so I don't know but I remember the Spectrum you there was like a reum thing I think maybe after You' inserted it it would do it but yeah of people was that Alex uh so hello how you doing uh so Danny says I'm currently trying combinations of rasby pie with camera modules to see which will work with lip camera be publishing what I find in a table that's cool I like the way Jeff does that as well doesn't he Jeff gearing he has like a table like a mini database of things he's been working on so yeah I've been working on a little camera rig for two cameras um see if I can get this not see everything up I show you there can you see that little little rig there so I've got two cameras uh and it's just lot of resting on top of that uh monitor at the moment more about that later in the week I guess so Pete says home assistant rire with an SSD that's pretty cool yep that'll work very nicely Vince is working on setting up a cricet template for the pade uh artwork so I can print and cut some designs to go on my pade see I've got a pade just there as well they're working on a pade Max aren't they Max Pro whatever massive version so I remember when they were originally working on the uh the pade this uh this display here this Galactic unicorn the idea for that was that that would be uh above the pade so you could have all the artwork scrolling across so it'll be interesting to see when the pade max comes out whatever it's going to be called cuz it's got two joysticks on I believe as as an option so that' be an epic build uh combine that with a Raspberry Pi 5 pretty pretty awesome lots of cool emulation so for says well I just finished project while I was watching this that's awesome a pound of a pan of brownies cool nice uh so Jim says uh is there a basic source code for this on GitHub excuse me so yes um I just go back to here you can grab that oops why did that disappear let me just jump back to there there we go so if you go to github.com Kevin Maier retrorun you'll find um at least my typings out of that it doesn't have the Go Subs in they're in the book but the book is available if you go if you just go to BBC micro.sd there you go so uh JY says absolute makes the posit makes the number positive thank you for that so yeah little trick there isn't he I remember abs and Chi you is it that I think you you can convert like asky characters to n numbers as well um I use those I'm pretty sure it was abs for that so yeah looks like it's getting the sign of that difference I see so yeah so minus one or plus one only cool reminds me of do to in the dials game in basic as well awesome yeah there's loads of things like they take some really cool concept that's what I love about this era of gaming I mean look at the artwork on that the game looks nothing like that the game is just like you know a h for human and a z for a zombie um yeah love it so it makes them go closer if they left and right doesn't matter they get close to the human that's cool it's just so clever how that that one line of code makes the game look like it has like life like they are tracking you down so thanks CS study appreciate that um so greetings from Belgian I grew up making stuff on my Commodore 64 as a 10-year-old wow and CS study is in Ukraine how's it going so Danny says does anybody remember the input magazines wow that does ring a bell yeah we used to get crash around remember that one and there was like a sycl user magazine I think we used to get that as well I'm sure the crash one was like weekly well good Quake very small one good good good to hear yeah car H character 13 is carriage return there we go I know it was something to do with uh making things U move around on the screen and you couldn't see as a character because if you tried printing it weird things would happen as well so if you trying to do like a table and you printed that to the screen it would like go backwards one and mess up your alignment um it really is a robot lab without a mess exactly there's so much mess in here I mean you you've seen this like really cleansed version there's just so much garage everywhere else I'm making an absolute shed ton of these at the moment so these will be for sale very shortly we intended to take a few of them with us to open source to sell uh so I've been printing like an Unholy number of these so you'll be able to get those I promise very soon um so hope to assemble and uh code smart qot Pro due to your videos cool smart Q qot Pro with my students in rooc coding classes that's cool definitely have to send me some pictures put it on the Discord server Dexter says my first one was a zedex spectrum 48k yet another time xus version and Nick says he had a ZX Spectrum plus awesome that had the nicer keyboard didn't it uh Ford says my first computer as well as my earliest I can remember doing was a Windows XP desktop I forgot who made it but parents kept it in the living room cool and then says I went through commodor 64 amga 600 to PC but I also had a zelic spectrum and a um a c16 uh in school I got to play with the BBC micros so was just giving away his age with that as well so yeah probably born in what about 85 then or something I guess somewhere around there and so he was sported by his parents I always wanted to have um an Atari St 500 St or an Amiga that was my I always wanted to have those but I I didn't get the chance to own one of those the Tres I remember those yeah they had like a trolley for like you had one for the TV and and the VHS cassette and the kids would like whenever somebody put a cassette in and it was like terrible some smart kid would always like tracking change the tracking and you did this and it adjusted the head slightly and the picture hopefully get a bit better but they there was like piracy was rif in primary schools amongst teachers like I remember I went to like a Catholic school and um we always had around like Easter time Jesus of nazare Nazareth playing on the uh the TV and like this the sound was totally blown out and that the it was like a 10th Generation pirated copy as well terrible terrible so I remember though we had a room especially for the TV called the Ava room the audio visual room Audio Visual and something room yeah they xylophones in there as well I remember and that's where the the BBC lived so the engineer would come out and fix them list the lid list the lid press the chips down and see that'll fix it I yes yeah the the the chips would pop out the the bbcs I think they're designed to be like upgradeable but um do you ever get spam bots in your comments for videos we do occasionally that's why um we have moderators so I have got some keywords to help protect against that hey Melo laabs how's it going thank you for doing the the live stream chat the other the other week to make a central really enjoyed that speaking to you I didn't realize you could asked to get the the badge to be an ex what's it called a Creator or not just an exhibitor I should have checked on that one uh so another one yet another one says had four binders of input wow I've just got loads of uh macpie magazines and hack space magazines so great meeting you at maker Central 24 likewise yeah was good good show wasn't it I really enjoyed going there so Vince says uh we had a TV um hidden in a Wendy house in the lower school full size adult height and used to watch BBC recordings in there the Magic Pencil I remember that pencil that it lit up at the end didn't it when it used to draw and I was like how are they doing this how is this pencil floating I didn't really understand green screens back then so but yeah that's clearly what that was all about uh let's see just jump there there we go ah so for says this morning I spotted a couple of porn bots in the comment section of uh explaining computer video they pop up like bunnies I mean he's got over a million subscribers now so he's going to draw all kinds of bots on there um I always worried that somebody's going like hack the channel and just like some garbage cryptocurrency thing come on to the channel and just I'll have to like speak to YouTube so I've done all the things like you have to record um all the details I like when your channel is set up and so on just in case you have a need to request to get the channel back but I always liveing dread of that because you put so much effort into this thing and then you know you just behold into security being what it is so at this point I'll say thank you so much for joining me on this uh epic journey to space and zombie swamps in the aisle of Dr Maro uh and yeah I shall say thank you for watching and I shall see you next time bye for now he
Info
Channel: Kevin McAleer
Views: 1,813
Rating: undefined out of 5
Keywords: python, electronics, Raspberry Pi Pico, MicroPython, Retro games, 1980s basic programming, basic programming, python for beginners, python tutorial, retro gaming, python programming, python tutorial for beginners, micropython raspberry pi pico
Id: 82Rb3HbkD_E
Channel Id: undefined
Length: 92min 13sec (5533 seconds)
Published: Mon Jun 03 2024
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.