+atari2600land Posted April 21, 2019 Share Posted April 21, 2019 How do I make a sprite's shape random? What I'm looking for is an effect like the qotile shield in Yars' Revenge. I tried various things and nothing did anything. I want to make Sprite 1 fire coming out of a rocket, but I can't. Any help? Quote Link to comment Share on other sites More sharing options...
artrag Posted April 21, 2019 Share Posted April 21, 2019 Intybasic allows you to point to a ram array while using Define Just fill that ram array with random data, use the random function that is updated at each call, not the one updated once per frame If it is too slow, just pre-compute in ROM the frames of random noise and plot them as a normal animation Quote Link to comment Share on other sites More sharing options...
mr_me Posted April 21, 2019 Share Posted April 21, 2019 Scroll through grom 213 to 255. Quote Link to comment Share on other sites More sharing options...
fsuinnc Posted April 21, 2019 Share Posted April 21, 2019 These are all good. Another thing that might help is to us the X flip and Y flip bits in the Sprite command. Varying the X and Y flip along with the random sprites can be a bit jumpy, which sometimes works for what you're doing, but gives you more frames from a limited number of grom or gram elements. Quote Link to comment Share on other sites More sharing options...
carlsson Posted April 21, 2019 Share Posted April 21, 2019 (edited) Here is a suggestion for a random sprite, using the VARPTR syntax like Artrag mentioned. Enable the sequence if you want the random junk to move like exhausts, or follow the other path to generate entirely random patterns. And yes, I love magic numbers so I didn't use constants this time. Edit: Of course you don't need a delay if you have rest of the program taking up time, but for this simple example the graphic will flush extremely fast without the delay. REM Random sprite DIM #ss(3) counter=0:delay=4:sequence=1 MODE 1:SPRITE 0,100 + $200,50 + $100,256*8 + 7:WAIT loop: IF counter=0 THEN IF sequence=1 THEN #ss(0)=#ss(1):#ss(1)=#ss(2):#ss(2)=#ss(3) #ss(3)=RANDOM(256)*256 + RANDOM(256) ELSE #ss(0)=RANDOM(256)*256 + RANDOM(256) #ss(1)=RANDOM(256)*256 + RANDOM(256) #ss(2)=RANDOM(256)*256 + RANDOM(256) #ss(3)=RANDOM(256)*256 + RANDOM(256) END IF DEFINE 0,1,VARPTR #ss END IF WAIT counter=counter+1 IF counter>delay THEN counter=0 END IF GOTO loop random_sprite.bas Edited April 21, 2019 by carlsson Quote Link to comment Share on other sites More sharing options...
+atari2600land Posted April 21, 2019 Author Share Posted April 21, 2019 Thanks for the help. I'm making a new game called "MidSpace", based on my Game Boy game I made, then tried to make for the Odyssey 2, and then I failed on it, so now I'm attempting to make it for the Intellivision. Things are going along way better than when I was trying to make the game on the Odyssey 2 due to INTVBasic. I made the title screen, now I'm working on the game itself. I want to have a DEMO mode where it plays itself, but I don't know if I will do that or not. So you can press a fire button and start the game. You can move the rocket right or left and make it face up or down by pressing up or down on the joystick. Firing is done using buttons. The UFO's lasers are not deadly yet. Anyway, let me know what you think so far. midspace2.zip 1 Quote Link to comment Share on other sites More sharing options...
+atari2600land Posted April 22, 2019 Author Share Posted April 22, 2019 The UFOs are deadly. And I have a giant mouth as a boss now. It's deadly too. I'll leave it up to you to figure out how to defeat the mouth. midspace4intvgameonly.zip Quote Link to comment Share on other sites More sharing options...
+cmadruga Posted May 18, 2019 Share Posted May 18, 2019 I found a way to defeat the mouth, but I'm not telling anyone! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.