Shop OBEX P1 Docs P2 Docs Learn Events
HEL engine: 4 tiles per scan line? — Parallax Forums

HEL engine: 4 tiles per scan line?

RedNifreRedNifre Posts: 84
edited 2007-10-13 00:59 in Propeller 1
Hi there!

After all those months of being extremely busy I finally have some time to continue writing my first Hydra game. [noparse]:)[/noparse]
I use the HEL engine and got some weird behaviour so I visit the forum to find out if its because of HEL or if its my fault.

The description says 8 sprites, maximum 4 per scanline. Scanline means horizontal line, right?

In my game you sometimes have the situation where you have an L-shape of sprites like this:

(A)
7
6
5
4
3
2
.1

(B)
7
6
5
4
3
21

Situation A works great, but situation B causes the 16 lines where sprite 1 and 2 are to get messed up.
So my question is: Is "8 sprites, max 4 per scanline" really 100% accurate (which would mean that I made a really strange mistake somewhere) or is it maybe more like "up to 8, but when at least 2 sprites share a scanline you should use only 4 total, even if the other sprites are not sharing scanlines"?
I have different work-arounds for situation B but which one to choose depends on the exact sprite limitations of the HEL engine and I don't want to implement them just to find out that it was the wrong approach. I'm still illiterarte when it comes to assembly so I can't reverse engineer the HEL engine yet.
Please help! :-/

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Hydra in a LEGO NES:
http://forums.parallax.com/showthread.php?p=654788

Comments

  • AndreLAndreL Posts: 1,004
    edited 2007-10-03 03:12
    The driver doesn't know the difference in the bitmaps. So 4 sprites on 1 scanline is accurate. There are a couple demos I made that have all 4 sprites. Try this, over write my art with yours and see if you still get this behavior. It could even be a typo on your part in the data statements or something. But, bottom line always start with something that works to test these things. Since at this point, maybe its a bug in the driver, or a maybe your code, so we need to remove one variable and test. The pacman demo uses 4 sprites I think, so try that with your art and make them all on the same scan lines.

    Let me know what happens.

    Andre'
  • RedNifreRedNifre Posts: 84
    edited 2007-10-11 12:02
    I checked it with a minimally modified pac man demo. It seems that under certain conditions only 2 sprites per scanline work properly. To see what I mean just start this little demo and press DOWN. (You can also select different sprites by using A or B)

    Since the demo contains mainly code that is not allowed to be distributed to people who don't own a hydra I added a password to the zip-file.
    The password is the first word on page 666 of the Hydra book ("first" meaning black font on white background, the password isn't "Game") wink.gif

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Hydra in a LEGO NES:
    http://forums.parallax.com/showthread.php?p=654788

    Post Edited (RedNifre) : 10/11/2007 8:23:26 PM GMT
  • AndreLAndreL Posts: 1,004
    edited 2007-10-11 19:46
    Got it. Please remove the zip now, next time also, just email it to me personally.

    Andre'
  • AndreLAndreL Posts: 1,004
    edited 2007-10-11 20:04
    Looked at it. Right, what's going on here is that there are too many TOTAL sprites. The system does all the work in the HSYNC, so you can either have more sprites, but no crossings on the same scanline or less sprites and more crossing. So looks like you have all 8 on, thus only 2 can survive the sync on the same scanline.

    You can always modify the driver to make the hsync bigger and give yourself some more time!

    Andre'
  • RedNifreRedNifre Posts: 84
    edited 2007-10-11 20:31
    Thanks for the help!
    I also noticed that everything works great if you use only few different sprites (like, having 8 sprites with the same graphics causes no problems).
    Anyway, since I don't want to deal with assembly language yet I just keep it that way for now. Only a few levels have these specific situations and the graphical errors have no impact on gameplay at all.
    Expect my first game somewhen this year. [noparse]:)[/noparse]

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Hydra in a LEGO NES:
    http://forums.parallax.com/showthread.php?p=654788
  • AndreLAndreL Posts: 1,004
    edited 2007-10-13 00:59
    Yes, its all about how much work to get to the data [noparse]:)[/noparse] Put a tile and sprite engine in one cog in the HSYNC was a tight fit [noparse]:)[/noparse] However, I could probably double the sprites and the tiles if I REALLLY wanted to, but that's like stabbing yourself in the eye with a fork, better just to use more COGS [noparse]:)[/noparse]

    ANdre'
Sign In or Register to comment.