Jump to content

MidSpace for Intv (was: "A random sprite?")

Recommended Posts

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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)
  MODE 1:SPRITE 0,100 + $200,50 + $100,256*8 + 7:WAIT
  IF counter=0 THEN
    IF sequence=1 THEN
      #ss(3)=RANDOM(256)*256 + RANDOM(256)
      #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
  IF counter>delay THEN
  GOTO loop


Edited by carlsson
Link to comment
Share on other sites

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.


  • Like 1
Link to comment
Share on other sites

  • 4 weeks later...

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.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...