![]() ![]() Using a 2 nested loops we then looped through each row and each column of this array to retrieve the value of each pixel in order to create the cubes needed to create a 3D model of a space invader. In our code (see below) we have declared a 2D array called pixels to store the value of each pixel used to represent one of the space invaders. In Python, 2D arrays are implemented using a list of lists. In programming we can use a 2D array data structure to represent a graphic. A 2D graphic can be described as a grid of pixels of different colours. At Codeclub we learn a language called Python that lets us code apps, but you can make an app with little coding experience.In this blog post we will use Glowscript to create a 3D animation of a space invader.ĢD Graphics used in retro arcade games consist of pixels. There are lots of tools out there to help you make your own app for phones and computers. This website will teach you about coding and debugging – Make Your Own App Why not try changing the code to change the game? You could increase the time on each level? You could add another costume to each sprite so they still have my code but they look different – how about a balloon instead of a fox? Could you work out how to add another level, with new sprites? What about adding a Big Boss level? It looks pretty complicated because I built it up a layer at a time, like making a house out of Lego. ![]() If you click on the SEE INSIDE button you can see all my code. The link below takes you to one of my games, which you may like to play. ![]() We have been making our own computer games in Code Club. I like this project where someone has coded the crossy road game in scratch: Crossroads Why don’t you find one you like and have a look? Do the instructions make sense? If you were the computer would you know what to do? Lots of people create animations and games and put them up on the SCRATCH website and the best thing is that you can see what code they have used by clicking the SEE INSIDE button. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |