13.07.2015 Views

Download - Commodore Free

Download - Commodore Free

Download - Commodore Free

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Already we have used the print statement to make animatedgraphics. We used the poke command in the last instalment tomake a more complicated animation. Both of those weretechnically animation, but nothing like the games you have seenor I talked about earlier, we used only one little character fromthe 256 that exist in the computer. OK clarify that, from thestock ones that exist. Remember that you can create your owncharacters.Well you saw that moving those little graphics symbols aroundtook some typing work. Also it took a bit of knowledge that atpresent we just don't have in our memory. By that I meanknowing things like the value to variables and how to structurethe lines. OK a big action game would be pretty muchimpossible to create in the way we have done. Simply put, wewon't always be limited to just a character from the characterset. You would like a larger thing on the screen for the gameright?That is where the idea of a sprite comes into play . What then is a sprite? A small somewhat evil creature inan AD&D game. No wait, sorry mind was in the wrong place.In the Beginning 10\Lord Ronin from Q-Link\www.commodorefree.comsprite and your shot hits, and because it hits in the right place,you make a collision with the bad guy. Simple idea and it tookme months to understand what was being said.On screen it was easier to see the idea of moving in front ofsomething or behind it. There is a book that I want to get thathas a demo disk of the things that are covered in the book.Sprites are one of them, I remember that the book showed a carthat drove by a garage, the car came back again and entered intothe garage. Now this garage had a simple window in it, and youcould see the car, or part of it through the window. That is whatclicked in my mind for putting a sprite in front of another one,or even behind it, and making it look good.Some bad examples are some games that I have played. One thatcomes to my mind is an aeroplane game. Simple sprites, with acouple of planes that are controlled by the joystick, youbasically Blast unlimited bullets at each other. Its a rather funsimple, little thinking, game. Sprite collisions here are thebullets hitting the planes. Now it would have been real nice ifthe clouds where something you could go behind, but no theyare as hard as granite. Hit a cloud and you don't go behind or infront of it, you crash and burn."A Sprite is a high-resolution programmable object that can bemade into just about any shape – through BASIC commands.The object can be easily moved around the screen by simplytelling the computer the position the sprite should be moved to.The computer takes care of the rest." 4th paragraph page 68 inthe user's manual.Strange words huh man? The book goes on to say that the spritehas "more power than just that". Colours can be changed.Collision detection, move in front or behind each other, changein size and more.Right that takes care of the two paragraphs quoted andinformation and you are more confused than I was the first timeI read the passages. Now then before you need to take a nitrotab, I'll try to explain all this weird talk.To the best of my knowledge all the 8 bit games played withsprites. Asteroids, defender, pacman and the like. OK maybethat isn't the correct word to use. I'm a lamer as you remember.Still the point is that these games I mentioned above, at least onthe C= use sprites. That can give you an idea of what a spritecan become in your future work.Yes you can change the colour of a sprite, you can also changethe size of a sprite. Three things that I quoted above come intomy explanation of a sprite. Moving in front or behind andcollisions. Sprite collisions are a strange concept and term, theguy that got me to understand it, to some degree was watchingme try to play a flying game. Sorry don't really remember thegame, may have been Zennon, anyway as I kept shooting theother space ships. He would just whisper out "Collision". WhenI crashed the space ship, he would shout out "Collision".Wanted to deck him at times., but he did show me theconnection of what I was doing to the sprite collision thing. I'lladmit that he also showed me a cartridge that plugged into theC=64 and then pointed out an option called something like,collision killer. Yeah that is what it did, I could smash up andnot be killed off in the game. I tell you that I then bought thatcart for my collection.Basically what I am saying is that you can make a shoot 'em upgame, blast at the bad guy, your shot is a sprite, the bad guy is aExamples out of the way, here we are only going to make somesimple sprites. There are books and programs to create sprites.Some of the little programs I have used make the processsimpler than what we will be doing next. For those that have a128. There is a sprite maker in the 40c mode.The book tells us that making a sprite isn't as difficult as they orI make it out to be. Well it is something that you will need to domore than once to get the full feel of making a sprite by scratch.We have a separate picture maker in the C=64 for sprites. "Thispicture maker handles the video display." So says the book. Geeman that sounds so friendly! We are told that the computerhandles the tasks of keeping track of the characters and graphicsand the colour and of moving the object around. Wait for it, getsconfusing real soon.Time for that real soon part then. There are 46 different"ON/OFF" locations "which act like internal memory locations,each of these locations breaks down into a series of 8 blocks.And each block can be either 'on' or 'off'."A lot of members just tossed the book to the side at that point.The book stopped being friendly and got complicated. Beforeyou blank out . Take that stuff and put it off to the side for agood amount of time. What we are going to do is poke thingsinto these areas to make stuff happen. On screen again I repeatthat there are programs that take a lot of this work out of the taskof making sprites.Eight memory locations are used. Tell you now that you haveonly 8 sprites at a time "ACTIVE" on the screen. You can havemore waiting to be used though.You may want to make a grid chart here to help you draw outyour sprites. A sprite is 24 dots wide and 21 dots (or pixels) tall."Sprites are displayed in a special independent 320 dot wide by200 dot high area. However you can use your sprite with anymode high-resolution, low resolution, text, etc." And I knowthat makes very little, or no sense at this moment.What is going to happen is that we are going to make a ballooncharacter, and have it float across the screen. We will also beIssue 24 November 2008 Page 18

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!