Jump to content
IGNORED

How to make a sprite importable by IntyCOLOR?


Recommended Posts

Ultra Simplistic Answer:

IntyColor technically does several things

 

It takes an image of pixels and converts them to cards data, checking if:

 

you have exceeded 64,

you have more than two colors per 8x8 card

you are exceeding color stack specs

and a bunch of other things added for advanced users like detecting images that can be done if MOBs are also used to add color.

 

 

It produces by default a .bas file that has several parts:

The initialization stub to DEFINE the cards

 

The card data, by default in hex format.

 

screen_bitmaps_0:
DATA $0306,$0001,$0703,$0F07
DATA $FFFF,$FFFF,$DFFF,$3F3F
DATA $DB89,$FFFF,$FFFF,$FFFF

 

The Screen data which is basically the card/foreground/background data used by the SCREEN command.

 

screen_cards:
DATA $1200,$1200,$1200,$1200,$1200,$1200,$1200,$1200,$1200,$1200,$1200,$1200,$1200,$1200,$1200,$1200,$1200,$1200,

The first $1200 is the first card and its colors

 

 

Remembering that MOBs use the same 64 card slots as the background, IntyCOLOR can be used to generate more newbie friendly data using one of the parameters:

intycolor 

gives you the various parameters, tons of them for advanced users, things like creating cards at offset point, not just at zero etc.

 

For newbies, I recommend using the -i parameter, it produces BITMAP statements for the cards

Intycolor -b -i image.bmp image.bas

gets you

screen_bitmaps_0:
BITMAP "01111110"
BITMAP "11010111"
BITMAP "11111111"
BITMAP "01010100"
BITMAP "01010100"
BITMAP "10101100"
BITMAP "10101010"
BITMAP "10101010"


BITMAP "01010100"
BITMAP "01010100"
BITMAP "01010100"
BITMAP "00100100"
BITMAP "00101000"
BITMAP "00011000"
BITMAP "00001100"
BITMAP "00000100"
Understand that the Screen_Cards data is there for doing quick (or not so quick) screens after it DEFINEs the cards but you don't need it. All you need is the BITMAP data DEFINEd into GRAM cards since screen cards and MOB cards are shared.
Create a sprite strip that is a factor of 8 wide by 8 high (32x8, 160,8) or vertical (8x32, 48x8), I just user a standard 160x96 image.
Draw MOBS in the 8x8 spaces (overlay a layer grid with transparency for guidance as some of the forum posts show) draw in white on black or vice versa depending on what you are after.
Run it thru IntyColor with the -i parameter, edit the bas and throw away everything except the BITMAP statements and the DEFINE statements.
Sprite 0,HIT+Visible+PlayerX+ZOOMX2, PlayerY+ZOOMY2, SPR00+SPR_GREEN

 

 

 

 

 

 

 

  • Like 4
Link to comment
Share on other sites

One card is eight rows, eight bytes. The DATA statements above are grouped two by two to form 16-bit words, big endian order I believe. So one card would be four words with this formatting. However if you're using the data for your MOBs, they can be either 8 or 16 lines tall before magnification, so you'll have to take that into count to determine which MOB is which.

  • Like 1
Link to comment
Share on other sites

I saw the sprites.bas example. How do you know / determine when one sprite ends and another begins? Looks like one continuous DATA statement.

 

P.S. Thanks for the clues :)

I wouldn't use sprites.bas as your learning tool, it is isn't newbie friendly since it came with an early version of IntyBASIC. Instead use intro.bas, it shows everything about MOBs in as simple way as possible with comments, copy it, change it, run it to see the changes.

 

If mobs are defined using bitmap statements as I illustrated above, the each row is eight pixels, therefor 8 lines is a card definition. Whether you use it for a mob or a background doesn't matter.

  • Like 2
Link to comment
Share on other sites

I wouldn't use sprites.bas as your learning tool, it is isn't newbie friendly since it came with an early version of IntyBASIC. Instead use intro.bas, it shows everything about MOBs in as simple way as possible with comments, copy it, change it, run it to see the changes.

 

If mobs are defined using bitmap statements as I illustrated above, the each row is eight pixels, therefor 8 lines is a card definition. Whether you use it for a mob or a background doesn't matter.

HOLY HABANERO HOOTENANNY Tarzilla! intro.bas is an amazing example! It shows off the style and functions of IntyBASIC in a fun way. Kind of meta since the compiled program is a educational demonstration in itself!

 

The music and Intellivision graphics made me all sorts of happy. Thanks again!

  • Like 5
Link to comment
Share on other sites

HOLY HABANERO HOOTENANNY Tarzilla! intro.bas is an amazing example! It shows off the style and functions of IntyBASIC in a fun way. Kind of meta since the compiled program is a educational demonstration in itself!

 

The music and Intellivision graphics made me all sorts of happy. Thanks again!

That was the point if it ;)

 

It is worth noting that It much easier to understand due to the work the international gang of misfits nanochess, DZJay, groovybee and catsfolly put into making IntyBASIC more newbie friendly via the SDK and the constants.bas file, without that work it would be a HEX-Fest like sprites.bas ;-)

There is an part 2 coming for Inty-B (Scrolling/Gram manipulation, audio/Intellivoice/ECS functions) it should arrive shortly before someone finishes the Mac SDK installer ;)

  • Like 1
Link to comment
Share on other sites

HOLY HABANERO HOOTENANNY Tarzilla! intro.bas is an amazing example! It shows off the style and functions of IntyBASIC in a fun way. Kind of meta since the compiled program is a educational demonstration in itself!

 

The music and Intellivision graphics made me all sorts of happy. Thanks again!

 

Yeah, that introductory program is chuck-full of nice bits, just like the visual demo shows off most of the graphical features, Tarzilla designed the source code to explain how each part was done. It is fantastic, and it warms my heart to know that it proved useful to someone. :)

 

 

I really should make a pass over my old examples to make them clearer. :grin:!

 

Your examples were great for when IntyBASIC was young and terse, but now it is a lot more expressive and useful even to beginners. Perhaps more than just "cleaning up" the examples to make them clearer, there should be more examples showing how to do hard stuff the easy, IntyBASIC way. :)

 

 

Once you get the hang of it, I'm sure you will be making all kinds of cool games. ;)

 

That doesn't sound like a snide remark. Where's Rev?

 

-dZ.

Link to comment
Share on other sites

There is an part 2 coming for Inty-B (Scrolling/Gram manipulation, audio/Intellivoice/ECS functions) it should arrive shortly before someone finishes the Mac SDK installer ;)

 

Oh, I think many we may even see Rocketeer before someone finishes the Mac SDK installer. :grin: :rolling:

  • Like 2
Link to comment
Share on other sites

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