Jump to content
IGNORED

GoSub for INTV


atari2600land

Recommended Posts

Yeah, I guess it's just what freeweed said. Anyway, I got bored so I decided to make another level. This makes 22. The levels are getting more and more difficult in my opinion, but there's one thing to remember: The top part of your sub (the periscope) CAN touch the seaweed without being hit. This is In my opinion absolutely vital in finishing some levels.

Edited by atari2600land
Link to comment
Share on other sites

The top part of your sub (the periscope) CAN touch the seaweed without being hit. This is In my opinion absolutely vital in finishing some levels.

 

I've only tried GoSub a couple of times but I totally agree. Unforgiving hit detection makes for pretty bad games, but a game like this kinda needs it - to a degree. Allowing the periscope to pass through the borders is just being merciful to the player :)

 

How did you accomplish this, by the way? When I tried it, I thought that the entire sub was just a single MOB? In which case traditional collision detection wouldn't allow this flexibility? What am I missing?

  • Like 1
Link to comment
Share on other sites

Here is level 21. The game is now 12k. I don't know how since I only added 8 lines of new extra code for level 21. It was 11k.

 

Remember, boys and girls, 12 Kilo-Bytes = 6 Kilo-Decles.

 

To put this in perspective, whenever you read about Mattel producing "large" 16K ROM cartridges for later games, they were talking about 16-bit word memory cells, i.e., 32 Kilo-Bytes.

 

In other words... your game is still tiny, don't worry too much about size. You got plenty, even if you want to keep yourself within the constraints of a 1980s game. ;)

  • Like 1
Link to comment
Share on other sites

To put this in perspective, whenever you read about Mattel producing "large" 16K ROM cartridges for later games, they were talking about 16-bit word memory cells, i.e., 32 Kilo-Bytes.

 

 

I just realized how strange this is, given what came afterwards. Sega went on a HUGE marketing campaign with the Master System. "2 Mega game!", "4 Mega game!" etc. Except they were talking MegaBITS.

 

So take a "large" 32KB game. Mattel would have called it 16K, and Sega would have called it 256K. Just a small difference there. :P

  • Like 1
Link to comment
Share on other sites

dZ, do you know off hand which of the later Mattel games were 16KB? I'm just curious as I really don't know.

 

Lots, if the dumps I have are sized correctly. I don't think overdumping was a problem with this system but take what I say with a grain of salt just in case. I haven't done a byte analysis on all 125 :)

 

Most of the later INTV Corp ones were. Body Slam, Chip Shot, Dig Dug, Diner, Pole Position, Slam Dunk, Spiker, Stadium Mud Buggies, Super Pro everything, Triple Challenge... etc, etc. Also some earlier games like He-Man and Bump n Jump.

 

And to be clear, by "16KB" you really mean Mattel's "16K", which is actually 32KB. If you're wondering about 16KB titles (Mattel 8K), that's probably half the system's library.

Link to comment
Share on other sites

 

Lots, if the dumps I have are sized correctly. I don't think overdumping was a problem with this system but take what I say with a grain of salt just in case. I haven't done a byte analysis on all 125 :)

 

There are a couple 6K-word games that I know of that I've seen 8K-word dumps of (AD&D Cloudy Mountain, Lock 'n' Chase).

 

Also, I saw an over-dumped Triple Challenge go by once. One hint that the dump had issues was that it was 45058 bytes. That's just a weird number. That's 44K bytes with two bytes extra. Just weird. The only meaningful ROM data is in the first 32K.

 

Some games were just huge. Hover Force was 24K words (48K bytes), as was WSMLB and Tower of Doom.

 

 

 

I just realized how strange this is, given what came afterwards. Sega went on a HUGE marketing campaign with the Master System. "2 Mega game!", "4 Mega game!" etc. Except they were talking MegaBITS.

 

So take a "large" 32KB game. Mattel would have called it 16K, and Sega would have called it 256K. Just a small difference there. :P

 

Actually, if it's using GI ROMs, it'd be a 16Kx10 game, so that'd be 160K bits, not 256K bits. And ironically, GI's data sheets talk about their ROMs more like how Sega talked about their games. Have a look! http://spatula-city.org/~im14u2c/chips/ro39504.pdf

 

 

"20K Cartridge ROM" sounds like a lot, but it's the smallest one they offer: 2K x 10 bits.

Link to comment
Share on other sites

Here's a trick for your level titles - it might save you some typing (and space...)

print_level: PROCEDURE
	print at level_title_pos(room) COLOR 6, "level "
	test = room + 1
	if test > 29) then print "thirty " : test = test - 30
	if test > 19) then print "twenty " : test = test - 20

	if (test=1) then print "one"
	if (test=2) then print "two"
	if (test=3) then print "three"
	if (test=4) then print "four"
	if (test=5) then print "five"

	if (test=6) then print "six"
	if (test=7) then print "seven"
	if (test= then print "eight"
	if (test=9) then print "nine"
	if (test=10) then print "ten"

	if (test=11) then print "eleven"
	if (test=12) then print "twelve"
	if (test=13) then print "thirteen"
	if (test=14) then print "fourteen"
	if (test=15) then print "fifteen"

	if (test=16) then print "sixteen"
	if (test=17) then print "seventeen"
	if (test=18) then print "eighteen"
	if (test=19) then print "nineteen"
	
	RETURN
	END

Catsfolly

  • Like 2
Link to comment
Share on other sites

Hey gang. I put in a secret level select code. Well, I guess it's not secret any more. On controller 2, type in the two-digit level number you want to start at and press fire on controller 1. For example, if you wanted to start on level 7, you'd type in 0, then 7 for 07. Note that levels 22-30 are broken because I haven't worked on them yet. I plan to put in a secret ending for those who start on level 1 and make it to level 30. If you start on any level above 1 and make it to 30, you'd get a screen that would say "try starting on level 1."

Edited by atari2600land
  • Like 5
Link to comment
Share on other sites

Hey gang. I put in a secret level select code. Well, I guess it's not secret any more. On controller 2, type in the two-digit level number you want to start at and press fire on controller 1. For example, if you wanted to start on level 7, you'd type in 0, then 7 for 07. Note that levels 22-30 are broken because I haven't worked on them yet. I plan to put in a secret ending for those who start on level 1 and make it to level 30. If you start on any level above 1 and make it to 30, you'd get a screen that would say "try starting on level 1."

 

PM atari2600land: No worries, your secret's safe with me. I won't tell anyone!

 

Oh wait... :lol:

 

Seriously, the warping feature is a nice addition. You can choose to play the game through, like the programmer intended, or you can jump to your favourite level! Nice. :)

Link to comment
Share on other sites

Here is level 21. The game is now 12k. I don't know how since I only added 8 lines of new extra code for level 21. It was 11k.

I looked into this a bit. The new version actually is 1k bigger.

 

These 8 lines of code made the game 312 words (or 624 bytes) bigger:

> 	if room=20 and keyhave=0 then print at 102 color 5,"\315"
> 	if room=20 and keyhave=0 then print at 122 color 5,"\315"
> 	if room=20 and keyhave=0 then print at 177 color 5," "
> 	if room=20 and keyhave=0 then print at 197 color 5," "
> 
> 	if room=20 and keyhave=1 then print at 177 color 5,"\315"
> 	if room=20 and keyhave=1 then print at 197 color 5,"\315"
> 	if room=20 and keyhave=1 then print at 102 color 5," "
> 	if room=20 and keyhave=1 then print at 122 color 5," "

So I experimented a bit with ways to optimize them.

 

First, since the lines are making the same checks over and over again (for the room and keyhave) , I factored out these checks:

	if (room<>20) then goto not_rm20

	if (keyhave=1) then goto rm20_havekey

		print at 102 color 5,"\315"
		print at 122 color 5,"\315"
		print at 177 color 5," "
		print at 197 color 5," "
		goto not_rm20

rm20_havekey:
		print at 177 color 5,"\315"
		print at 197 color 5,"\315"
		print at 102 color 5," "
		print at 122 color 5," "
	
not_rm20:

This code generated 154 words in the game (308 bytes).

 

Second, I noticed that having "color 5" in each print statement was generating code to set the color each time, so I put one color setting call at the start of the room 20 code:

	
	if (room<>20) then goto not_rm20

            print color 5

	   if (keyhave=1) then goto rm20_havekey

		print at 102,"\315"
		print at 122,"\315"
		print at 177," "
		print at 197," "
		goto not_rm20

rm20_havekey:
		print at 177,"\315"
		print at 197,"\315"
		print at 102," "
		print at 122," "
	
not_rm20:

This version generates 126 words in the game ( 252 bytes).

 

Lastly, I changed the Print statements to pokes, since they are being used to write single words of backtab anyway...

	CONST BACKTAB		= $0200
	CONST CS_GRAM		= $0800				' get picture from gram
	CONST SEAWEED		= (CS_GRAM + (59 *  + 5)


  if (room<>20) then goto not_rm20

	if (keyhave=1) then goto rm20_havekey

		poke BACKTAB + 102, SEAWEED ' print at 102 color 5,"\315"
		poke BACKTAB + 122, SEAWEED ' print at 122 color 5,"\315"
		poke BACKTAB + 177, 0       ' print at 177 color 5," "
		poke BACKTAB + 197, 0       ' print at 197 color 5," "
		goto not_rm20

rm20_havekey:
		poke BACKTAB + 177, SEAWEED ' print at 177 color 5,"\315"
		poke BACKTAB + 197, SEAWEED ' print at 197 color 5,"\315"
		poke BACKTAB + 102, 0       ' print at 102 color 5," "
		poke BACKTAB + 122, 0       ' print at 122 color 5," "
	
not_rm20:

This version generates 70 words in the game ( 140 bytes).

 

Catsfolly

  • Like 1
Link to comment
Share on other sites

BTW, maybe isn't clear enough in manual, but same as standard BASIC, IntyBASIC allows to use the colon character for putting several statements in same line:

 

Original:

 

 

>     if room=20 and keyhave=0 then print at 102 color 5,"\315"
>     if room=20 and keyhave=0 then print at 122 color 5,"\315"
>     if room=20 and keyhave=0 then print at 177 color 5," "
>     if room=20 and keyhave=0 then print at 197 color 5," "

 

Optimized (not so much as catsfolly version ;) ) :

 

 

>     if room=20 and keyhave=0 then print at 102 color 5,"\315":print at 122,"\315":print at 177," ":print at 197," "
  • Like 2
Link to comment
Share on other sites

Made level 23. To access it right away, use the level select code. By the way, how many variables are available? I read the manual part about variables but it didn't mention anything.

 

I need to check where to locate this paragraph, currently it's in the DIM statement:

 

 

Remember the space available in Intellivision RAM is limited

(around 216 8-bit spaces and 32 16-bits spaces) and each variable

also uses a space. IntyBASIC will warn you if you exceed this

limit.

Link to comment
Share on other sites

 

I need to check where to locate this paragraph, currently it's in the DIM statement:

 

 

It's actually at the very top (and logically, I think explaining DIM should be right after variables). And one is incorrect:

 

 

Variables can be 8-bit (around 200 available) or 16-bits size (around 16 available),

by default variables are 8-bit, to use 16-bits size use # as start character in name.

 

 

I haven't actually tested yet, but I'd love to know if it's 16 or 32 16-bit vars. I use them a lot for fancy MOB manipulation and I'm probably pushing 16 on every basic game I do. :)

 

Question for you - it's the same memory space, no? Couldn't you just have X bytes for all variables, and let the developer choose how many of each they need? Or is there an architectural reason why you limit each by size? Or is it just easier for the compiler (and warnings)?

Edited by freeweed
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...