Jump to content

Photo

GoSub for INTV


447 replies to this topic

#1 atari2600land OFFLINE  

atari2600land

    Waffles:

  • 10,773 posts
  • Man's best invention. Ever.
  • Location:Salem, Oregon

Posted Tue Sep 16, 2014 3:02 PM

Here is the thread I'll post in when I have questions regarding INTVBasic and what to do in it while programming the game.

I have a few questions.

#1 - Using game2, I was able to make a 16x10 example room. I was wondering if there was an easy way to make a 19x10 room?
#2 - How do you figure out what values to put in the room data? So how do you draw the room?

#3 - Is there any way to change the background from BLACK to something else? I want BLUE.

Attached Files



#2 nanochess ONLINE  

nanochess

    River Patroller

  • 4,850 posts
  • Coding something good
  • Location:Mexico City

Posted Tue Sep 16, 2014 4:23 PM

If you have a few screens, you can build them using DATA and put in video using SCREEN

 

To check the format of values, check the STIC specification included with jzintv (docs/programming/stic.txt)

 

To draw a background in another color:

FOR C=0 TO 220 STEP 20
PRINT AT C COLOR 7,"AAAAAAAAAAAAAAAAAAAA"
NEXT C

Use full block or other.



#3 atari2600land OFFLINE  

atari2600land

    Waffles:

  • Topic Starter
  • 10,773 posts
  • Man's best invention. Ever.
  • Location:Salem, Oregon

Posted Tue Sep 16, 2014 4:30 PM

What if I want letters in the background also? I was hoping there would be an easy way to make the whole screen blue. Something like this:

iwantthis.png


Edited by atari2600land, Tue Sep 16, 2014 4:54 PM.


#4 catsfolly OFFLINE  

catsfolly

    Dragonstomper

  • 704 posts
  • Location:Japan

Posted Tue Sep 16, 2014 6:10 PM

You need to set the color stack to blue.

 

Add this line at the start of the code:

 

Mode 0,1,1,1,1

 

If you include the standard constants, you can write it as

 

CONST C_BLU  = $1              ' Blue

 

Mode 0,C_BLU,C_BLU,C_BLU,C_BLU

 

Which is more readable...

 

Catsfolly



#5 atari2600land OFFLINE  

atari2600land

    Waffles:

  • Topic Starter
  • 10,773 posts
  • Man's best invention. Ever.
  • Location:Salem, Oregon

Posted Tue Sep 16, 2014 7:10 PM

Thank you! This is exactly what I wanted! So, would putting Mode 0,2,2,2,2 make a orange background, then?

Here is the latest binary to try. I also looked through the STIC documentation, but this is all that was there:

 

 

==============================================================================
 STIC Documentation
==============================================================================


Timing for CPU Controlled mode:

 -- SR1 signals start of vertical retrace, and occurs every 16.6ms.  It's
    tied to the CPU's interrupt request line.

 -- There is a ~4ms window after the falling edge of SR1 during which
    the CPU can access STIC registers, GRAM and GROM.  If the program
    desires display, it must write to $0020 during this window.

 -- 4.1ms after the falling edge of SR1, the STIC issues a BUSRQ to the
    CPU so that it may begin fetching cards from System RAM.  The CPU must
    respond with a BUSAK fairly quickly (I'm guessing within ~20 cycles).
    The first BUSRQ/BUSAK period lasts 0.05 ms and is followed by 15
    additional BUSRQ/BUSAK cycles that are issued at 1ms intervals,
    with each lasting 0.11ms apiece.  The time from the initial BUSRQ
    cycle to the 13 that follow it depend on the setting of the vertical
    delay register.

A picture of SR1/BUSAK signals, measured from SKIING while sitting at
title screen and options screen is in sr1_busak.png / sr1_busak.fig.

 

 

Not very useful to me.

Attached Files



#6 catsfolly OFFLINE  

catsfolly

    Dragonstomper

  • 704 posts
  • Location:Japan

Posted Tue Sep 16, 2014 7:24 PM

Try this page for STIC information:

 

http://wiki.intelliv....php?title=STIC



#7 atari2600land OFFLINE  

atari2600land

    Waffles:

  • Topic Starter
  • 10,773 posts
  • Man's best invention. Ever.
  • Location:Salem, Oregon

Posted Tue Sep 16, 2014 9:24 PM

New version. Fully working with one level. Complete it and go back to the title screen.

 

Attached Files



#8 DZ-Jay OFFLINE  

DZ-Jay

    Quadrunner

  • 9,859 posts
  • Triple-Stripe Mo' Bro
  • Location:NC, USA

Posted Wed Sep 17, 2014 3:16 AM

Thank you! This is exactly what I wanted! So, would putting Mode 0,2,2,2,2 make a orange background, then?

 

It will make it Red.  Keep in mind that the Color Stack is a 4-color circular array, so setting all four elements to the same color means that your background will be exactly one color, all the time.

 

For more information on the color modes, how they work, and their limitations, check out the file "doc/programming/stic.txt" that comes with the jzIntv/SDK-1600 documentation.

 

     -dZ.



#9 atari2600land OFFLINE  

atari2600land

    Waffles:

  • Topic Starter
  • 10,773 posts
  • Man's best invention. Ever.
  • Location:Salem, Oregon

Posted Wed Sep 17, 2014 4:33 PM

I figured out how to make mazes! There are two new mazes in this build. I'm not sure how many mazes I can fit in here, it's already at 3.5k and growing. How big will IntyBasic let me make a binary file? Anyway, new binary, and I sped the sub up so it is harder now.


Edited by atari2600land, Sat May 30, 2015 11:44 AM.


#10 catsfolly OFFLINE  

catsfolly

    Dragonstomper

  • 704 posts
  • Location:Japan

Posted Wed Sep 17, 2014 5:17 PM

I figured out how to make mazes! There are two new mazes in this build. I'm not sure how many mazes I can fit in here, it's already at 3.5k and growing. How big will IntyBasic let me make a binary file? Anyway, new binary, and I sped the sub up so it is harder now.

Pretty Cool!

 

shot0019.gif

 

It was tough to play at first because the sub is always moving. But I got the hang of it... ;-)

 

I often would die twice in a row. The sub would reset back to the beginning, and then immediately crash into a wall.

 

I would recommend that after you reset the sub, you reject all inputs for a second or two.

Maybe you could flash the sub color during this time...

 

Other than that, it looks good.

 

You can easily make binary files up to 16k. So you have room for a lot more mazes...

 

Catsfolly



#11 atari2600land OFFLINE  

atari2600land

    Waffles:

  • Topic Starter
  • 10,773 posts
  • Man's best invention. Ever.
  • Location:Salem, Oregon

Posted Wed Sep 17, 2014 5:50 PM

Thanks for the feedback. I put in a thing you requested about not letting the sub move after you die, even though I wasn't experiencing the same problem. The sub direction was set to 0 before you were able to begin again. I also added a third level. That's cool about the mazes. I'll try to put at least 20 in. So I'm just wondering if there's anything special I would need to do with a 16k cart in case someone wanted to sell it. I know Atari 2600 16k carts need another bigger chip, but I know next to nothing about INTV.

Attached Files



#12 nanochess ONLINE  

nanochess

    River Patroller

  • 4,850 posts
  • Coding something good
  • Location:Mexico City

Posted Wed Sep 17, 2014 6:30 PM

Thanks for the feedback. I put in a thing you requested about not letting the sub move after you die, even though I wasn't experiencing the same problem. The sub direction was set to 0 before you were able to begin again. I also added a third level. That's cool about the mazes. I'll try to put at least 20 in. So I'm just wondering if there's anything special I would need to do with a 16k cart in case someone wanted to sell it. I know Atari 2600 16k carts need another bigger chip, but I know next to nothing about INTV.

 

Don't worry, your game can go up to 16 kilobytes (that's 8K words)

 

Once you reach that limit you can use other zones using statements ASM ORG $D000 and ASM ORG $F000 to allow access to another 16 kilobytes.



#13 catsfolly OFFLINE  

catsfolly

    Dragonstomper

  • 704 posts
  • Location:Japan

Posted Wed Sep 17, 2014 8:52 PM

Thanks for the feedback. I put in a thing you requested about not letting the sub move after you die, even though I wasn't experiencing the same problem. The sub direction was set to 0 before you were able to begin again. I also added a third level. That's cool about the mazes. I'll try to put at least 20 in. So I'm just wondering if there's anything special I would need to do with a 16k cart in case someone wanted to sell it. I know Atari 2600 16k carts need another bigger chip, but I know next to nothing about INTV.

Looks good. Now I don't die twice in a row!

 

I think 16k is the smallest size Intellivision game that anyone makes nowadays.

LTO carts can go up to 128k I think.

 

 

As far as the game play goes...

 

I think in the best video games the player is faced with some sort of conflict - there are contradictory things that the player wants and they have to decide what to go for.

 

For example, in Space Invaders, the player wants to stay safe (under the bunkers or away from the invaders), but they also want to shoot the invaders, which means they have to go under the invaders and risk being shot themselves. The player constantly has to decide when to play it safe, and when to stick their neck out and take a shot.

 

In PacMan, the player wants to get the dots, but they also want to avoid the ghosts. If a bonus item appears, they want to get the item, but they also want to stay alive.

If they get a power pill, they want to chase the ghosts, but when the power pill wears off they want to be far away from the ghosts.

 

Wrestling with this type of conflict is what makes these games fun, IMHO.

 

Currrently, Gosub has conflict at the start of the maze - at that point, the player can do nothing, and be safe, or start moving and risk death.

(Doing nothing is boring so it isn't much of a conflict.)

 

Once the player starts moving, there is no more conflict - they are just accomplishing a task on the TV screen.

 

I think it would be cool if there were some kind of conflict in the game.

 

The simplest way to do this (that I can think of off the top of my head) would be to add some nonessential objects (like coins) to the maze. The player can get the coins if they want, or just ignore them and go for the treasure.

 

Just a thought. It's your game....

 

 

Catsfolly



#14 atari2600land OFFLINE  

atari2600land

    Waffles:

  • Topic Starter
  • 10,773 posts
  • Man's best invention. Ever.
  • Location:Salem, Oregon

Posted Wed Sep 17, 2014 8:55 PM

Perhaps an enemy that chases you around?



#15 atari2600land OFFLINE  

atari2600land

    Waffles:

  • Topic Starter
  • 10,773 posts
  • Man's best invention. Ever.
  • Location:Salem, Oregon

Posted Wed Sep 17, 2014 9:31 PM

In this version, I added an octopus that follows you. I also slowed down the sub. Not only do you have to get the chest, you also have to move non-linear to move the octopus away from where you want to go.

Attached Files



#16 DZ-Jay OFFLINE  

DZ-Jay

    Quadrunner

  • 9,859 posts
  • Triple-Stripe Mo' Bro
  • Location:NC, USA

Posted Thu Sep 18, 2014 4:42 AM

I just played it and find it a fun little game.  I do have a couple of comments:

  • It reminds me of a game that is almost identical on the Atari VCS or the Odyssey2 (even down to the octopus).
  • The collision detection is unforgivable! If the little periscope happens to even lightly touch a stray seaweed strand, it kills me.
  • The input control is a bit sluggish, especially for the kind of precision necessary to navigate in a maze with titanium-alloy-razor-sharp seaweed.  May I suggest making the maze just impassable, but not deadly, and let the octopus be the antagonist?
  • The collision with the octopus is also equally unforgivable.  Perhaps you should try a "bounding box" collision detection rather than pixel-perfect detection.  In real life, barely touching the tentacle of an octopus with your periscope does not tend to destroy your sub. ;)
  • It feels slow.  As I'm moving the little sub around, I can sense that I am going to run into the Octopus, and then I die a thousand deaths as I watch them ever so slowly collide.  It can get frustrating after a while.
  • When I die my last life, the screen goes immediately to the title screen again.  I loose the information of which was my last level.  Perhaps you should add a "Game Over" message and wait for key input.
  • During the title screen, I recommend starting the first "ping" beep earlier.  The first time I saw it, it surprised me that it started beeping after a few seconds, and it felt out of place.  After a couple of beeps, I realized what it was.

 

I don't really agree with the putting "coins" in the maze; that would just make it too cliche.  That said, I do agree with Catsfolly that the game could use some additional urgency.

 

Here's an idea, make it less of a maze, with more open spaces (like the sea!) and make the walls impassable but not deadly.  Then add "depth charges" sprinkled about the area.  If you get too close to a bomb, it starts ticking to detonation, so you have to keep moving.  All the while, that darn octopus is on your tail!

 

 

That's all I have for now.  Very good game, it has great potential. :)

 

 

     -dZ.



#17 catsfolly OFFLINE  

catsfolly

    Dragonstomper

  • 704 posts
  • Location:Japan

Posted Thu Sep 18, 2014 9:27 AM

I like the Octopus. It adds a lot of challenge to the game.

I got to level 4 once (the wall collisions are pretty brutal).

How many levels are there now?



#18 catsfolly OFFLINE  

catsfolly

    Dragonstomper

  • 704 posts
  • Location:Japan

Posted Thu Sep 18, 2014 9:35 AM

dZ said:

That said, I do agree with Catsfolly that the game could use some additional urgency.

 

I said that before the octopus was put in!!!

 

Catsfolly

 



#19 atari2600land OFFLINE  

atari2600land

    Waffles:

  • Topic Starter
  • 10,773 posts
  • Man's best invention. Ever.
  • Location:Salem, Oregon

Posted Thu Sep 18, 2014 10:13 AM

The reason the game reminds you of an Atari 2600 or Odyssey 2 game is because GoSub was on both those consoles! I'll work on this game some more.



#20 atari2600land OFFLINE  

atari2600land

    Waffles:

  • Topic Starter
  • 10,773 posts
  • Man's best invention. Ever.
  • Location:Salem, Oregon

Posted Thu Sep 18, 2014 5:20 PM

I looked through all of DZ-Jay's suggestions, and the only one I can actually implement is the game over screen. I tried making the sub bounce the other direction if you hit a wall, but I just couldn't do it. I had it successful unless you pressed a direction while you were touching the seaweed and then it went all haywire, so I can't do that. I did change level 3 so it's a little easier and more what I had in mind. The game is 4.5 KB now. I will add some more pings to the title screen, though.

Attached Files



#21 atari2600land OFFLINE  

atari2600land

    Waffles:

  • Topic Starter
  • 10,773 posts
  • Man's best invention. Ever.
  • Location:Salem, Oregon

Posted Thu Sep 18, 2014 8:03 PM

I just thought of an idea. In some levels you will have to get a key to open the treasure. Otherwise if you touch the treasure without the key, you'll die! Level 5 is an example. You start on it in this build. Tell me what you think.

Attached Files



#22 catsfolly OFFLINE  

catsfolly

    Dragonstomper

  • 704 posts
  • Location:Japan

Posted Fri Sep 19, 2014 8:57 AM

I just thought of an idea. In some levels you will have to get a key to open the treasure. Otherwise if you touch the treasure without the key, you'll die! Level 5 is an example. You start on it in this build. Tell me what you think.

Well, it definitely adds to the challenge, but

 

"I don't want to die!"

 

It seems pretty harsh to die just because you forgot your key! Maybe the keyless player could just bounce off the treasure, and this would cause the key to flash?

 

Then the player has to go back and get the key...



#23 atari2600land OFFLINE  

atari2600land

    Waffles:

  • Topic Starter
  • 10,773 posts
  • Man's best invention. Ever.
  • Location:Salem, Oregon

Posted Fri Sep 19, 2014 9:38 AM

OK, but what is the value for collision with walls? 011e seems to be everything.



#24 atari2600land OFFLINE  

atari2600land

    Waffles:

  • Topic Starter
  • 10,773 posts
  • Man's best invention. Ever.
  • Location:Salem, Oregon

Posted Fri Sep 19, 2014 3:33 PM

OK, in this build if you don't get the key you just keep moving over the chest and don't open it.

I'm a little worried because I only have 10 kb left and the game controls take up most of the 5k I have. I don't know how many mazes I can put in here.


Edited by atari2600land, Sat May 30, 2015 11:45 AM.


#25 atari2600land OFFLINE  

atari2600land

    Waffles:

  • Topic Starter
  • 10,773 posts
  • Man's best invention. Ever.
  • Location:Salem, Oregon

Posted Fri Sep 19, 2014 9:46 PM

I'm interested in how hard level 8 is. I want it to be hard enough, but not impossible. If you do find it impossible, keep in mind that I beat it. If it's too hard, I'll save it for a later level.

Attached Thumbnails

  • gosublevel8.png

Edited by atari2600land, Sat May 30, 2015 11:45 AM.





0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users