Jump to content
IGNORED

2018 Contest Chat


Recommended Posts

Given the number of objects in screen at same time, this is done with 16 GRAM predefined.

 

The object is moved one bit to right for 8 times, the extra goes into another card.

 

Then you use an array to select the card for the pixel coordinate AND 7.

 

Essentially infinite objects of same type on screen.

OK, I'm still working on how to do this. but, in my search around the forum I found the paralax scrolling discussion and that led me to an animation from "Inty-B Volume 2". Is this available anywhere? the code for it etc. I can't find it and was wondering if it was ever released.

Link to comment
Share on other sites

OK, I'm still working on how to do this. but, in my search around the forum I found the paralax scrolling discussion and that led me to an animation from "Inty-B Volume 2". Is this available anywhere? the code for it etc. I can't find it and was wondering if it was ever released.

I think Tarzilla is still developing volume 2 and didn't feel like source code was ready.

Link to comment
Share on other sites

OK, I'm still working on how to do this. but, in my search around the forum I found the paralax scrolling discussion and that led me to an animation from "Inty-B Volume 2". Is this available anywhere? the code for it etc. I can't find it and was wondering if it was ever released.

 

fsuinnc, unfortunately there doesn't seem to be any ready-made IntyBASIC code of this technique, but it is quite simple, you should be able to give it a try. Here's the simple algorithm:

 

  • First, decide whether you will be "scrolling" a repeating pattern (like a light marquee) or "moving" an object (like in the meteor example). There is a difference in the implementation because moving the object requires shifting it out of the card and into a new one, which requires more animation cards. In any case, the technique is the same.
  • Draw the pattern or object on an 8x8 picture card. Here's my sample object, just an oval:
........
........
........
..####..
##....##
..####..
........
........
  • Now, repeat the picture as many times as it takes to shift it in and out of the 8x8 card space, one pixel at a time. That will be our animation sequence:
:0       :1       :2       :3       :4       :5       :6       :7       :8       :9       :10      :11      :12      :13      :14      :15
........ ........ ........ ........ ........ ........ ........ ........ ........ ........ ........ ........ ........ ........ ........ ........
........ ........ ........ ........ ........ ........ ........ ........ ........ ........ ........ ........ ........ ........ ........ ........
........ ........ ........ ........ ........ ........ ........ ........ ........ ........ ........ ........ ........ ........ ........ ........
........ ........ .......# ......## .....### ....#### ...####. ..####.. .####... ####.... ###..... ##...... #....... ........ ........ ........
.......# ......## .....##. ....##.. ...##... ..##.... .##....# ##....## #....##. ....##.. ...##... ..##.... .##..... ##...... #....... ........
........ ........ .......# ......## .....### ....#### ...####. ..####.. .####... ####.... ###..... ##...... #....... ........ ........ ........
........ ........ ........ ........ ........ ........ ........ ........ ........ ........ ........ ........ ........ ........ ........ ........
........ ........ ........ ........ ........ ........ ........ ........ ........ ........ ........ ........ ........ ........ ........ ........ 
  • Now, decide where your object starts on the screen. It'll probably be on the edge of the screen so that you can smoothly transition it into the visible field. You set a BACKTAB card the first picture in our sequence, tile #0 above.
  • Decide the direction you are moving. The sequence above moves the object from the right to the left. Animating it in reverse will result in moving the object from left to right.

We're ready to "move" our object by animating it across the BACKTAB. First, since it is a "moving object," we'll want to keep track of some information on it, similar to how we do for a MOB: it's speed, it's position in the play-field (in case there's a "logical" coordinate system), and its actual position in the BACKTAB (which will change as it moves across the screen), and its current animation frame.

 

This last one is important, as you'll see, because it tells us the "offset" within a BACKTAB card in which the object resides. Together, the BACKTAB card number and the animation frame, tells us precisely where in the play-field our object is.

 

One other thing to remember is that, as the object moves across the field, it will occasionally straddle two BACKTAB cards. We'll have to keep track of both (or at least one of them, and derive the other from it).

 

To simplify things, we'll track the "leading edge," that is, the BACKTAB card containing the front of the object.

 

There's also a few things we need to know about our animation sequence. It'll be useful to keep these constants around.

  • First frame for moving left: picture #0.
  • Last frame for moving left: picture #15.
  • First frame for moving right: picture #14.
  • Last frame for moving right: picture #0.
  • First frame shifting out of card for moving left: #8.
  • First frame shifting out of card for moving right: #6.

In the algorithm below, we are going to move from the right edge of the screen to the left. To move in the other direction, just reverse the signs on all maths operations, e.g., turn all additions to subtractions, and vice-versa.

 

Now, Let's animate it!

 

 

  • FIRST_FRAME = 0
  • LAST_FRAME = 15
  • FIRST_SHIFT_FRAME = 8

 

MAIN LOOP:

  1. Increase animation frame number for the LEADING BACKTAB.
  2. Is the frame number less than the FIRST_SHIFT_FRAME?
    1. Yes: The object is still in the same card.
      1. Go to ANIMATE LEAD
      2. Go to ANIMATE TRAIL
    2. No: The object moved into a new card.
      1. Go to ENTER NEW CARD
      2. Go to ANIMATE TRAIL
  3. Go to Step 1.

 

ANIMATE LEAD:

  1. Set LEADING BACKTAB to new frame card.
  2. Return

 

ENTER NEW CARD:

  1. Set animation frame number for TRAILING BACKTAB to current leading animation frame.
  2. Set animation frame number for LEADING BACKTAB to FIRST_FRAME.
  3. Update LEADING BACKTAB to point to new leading frame (FIRST_FRAME).
  4. Return

 

ANIMATE TRAIL:

  1. Is current animation frame for TRAILING BACKTAB equal to LAST_FRAME?
    1. No: Update TRAILING BACKTAB with current animation frame.
    2. Yes: We're done with TRAILING BACKTAB. We can discard its information for the moment.
  2. Return

 

 

By doing the above for multiple objects on the screen, you can simulate "scrolling." The parallax effect comes when you animate multiple objects at different speeds and different starting animation frames -- all the objects at the same speed appear to be on the same "perspective plane."

 

Also, by keeping the animation frames as powers of two, you can shortcut some steps by just using bitwise operations rather than more expensive comparisons and go-tos.

 

I hope the above helps.

 

-dZ.

 

 

EDIT: Re-wrote algorithm for clarity.

EDIT: Added Step 2.1.1 to clarify that the LEADING BACKTAB needs to be updated.

Edited by DZ-Jay
  • Like 1
Link to comment
Share on other sites

(sorry for the delay) Thanks for the detailed help. Pretty amazing. This was all very helpful and I am playing with some ideas. It's amazing how much time and effort you guys put into helping people (me).

Thanks again.

 

No worries. If I were a good programmer (or at least knew IntyBASIC), I would offer code. So I leave that to the experts here. :)

 

-dZ.

Link to comment
Share on other sites

Your outline is just about as good as code, maybe better. I'm playing with code myself. Downside is now that I can make one image move I want to move ten. Then timing becomes a problem because I don't quite get that. and on and on. Thankfully, I find the processes very enjoyable even if I never get a game out of it.

Link to comment
Share on other sites

Just in case anybody wants to see (and maybe can make it better). a couple of examples of moving things horizontally accross the screen. At present it goes only left to right.

 

scroll_test.bas (this is the source for the first animation. code is the same for the second just the bitmaps change)

 

post-111-0-44227200-1522194206.gif

 

post-111-0-67673800-1522194221.gif

 

Now, I need to work on better ways to control the timing of things.

Thanks again to DZ-Jay and nanochess for putting up with me.
Edited by fsuinnc
  • Like 6
Link to comment
Share on other sites

 

Just in case anybody wants to see (and maybe can make it better). a couple of examples of moving things horizontally accross the screen. At present it goes only left to right.

 

attachicon.gifscroll_test.bas (this is the source for the first animation. code is the same for the second just the bitmaps change)

 

attachicon.gifScroll1.gif

 

attachicon.gifScroll2.gif

 

Now, I need to work on better ways to control the timing of things.

Thanks again to DZ-Jay and nanochess for putting up with me.

 

 

That's great! I'm glad I was able to help. :)

 

Hipnotic! Nice work. :thumbsup:

 

-dZ.

Link to comment
Share on other sites

2/3 of the contest time remains. I'm sure there will be additional entries. Last time I think about 50% of the entries were submitted in the last month, though it might be different this time depending on how many spend their summer vacation programming video games.

  • Like 1
Link to comment
Share on other sites

I am planning to have an entry. Not sure exactly how far I will get but I am hoping to make something similar to the classic arcade 'Lunar Rescue'. If your not familiar here is a video https://www.youtube.com/watch?v=6oeAsbC2xKA

 

After much looking I felt this game and it's single screen was better suited to my thinking process than the taxi game or most of the other great ideas people shared.

 

(there is a good A2600 homebrew game very similar called "This Planet Sucks").

  • Like 3
Link to comment
Share on other sites

I am planning to have an entry. Not sure exactly how far I will get but I am hoping to make something similar to the classic arcade 'Lunar Rescue'. If your not familiar here is a video https://www.youtube.com/watch?v=6oeAsbC2xKA

 

After much looking I felt this game and it's single screen was better suited to my thinking process than the taxi game or most of the other great ideas people shared.

 

(there is a good A2600 homebrew game very similar called "This Planet Sucks").

 

Oh yeah! I remember that game. I used to play it at a pizza parlor close to my grandparents house when I was a kid. I would imagine that game would be harder to implement than Space Taxi, but if you can pull it off it would be great! :)

 

-dZ.

Link to comment
Share on other sites

It reminds me, is there somewhere an equivalence list of Intellivision games and any arcade games or other formats they've been based upon? While I can find lists with just the titles and even ROMs to download, I haven't really come across any good sites with screenshots, like a Gamebase64, Lemon Amiga, Generation MSX or any other similar site out there. Of course just looking at a screenshot not always is enough to determine how the game plays, but it gives a hint which games are worth studying more carefully if one wants to extend the wheel rather than redo it. But yes, an equivalence list even without screenshots would be a great start, and for those games that don't really have a match on another format just leave it blank.

Link to comment
Share on other sites

  • 2 months 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.

Guest
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.

Loading...
  • Recently Browsing   0 members

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