Jump to content

Photo

The Gizzle Wap and The Strange Red Tree (Final Version)

homebrew gizzle wap 2600

126 replies to this topic

#1 Mountain King OFFLINE  

Mountain King

    Dragonstomper

  • 619 posts
  • Location:Philadelphia, PA

Posted Sun Jan 18, 2015 11:36 PM

The Gizzle Wap and The Strange Red Tree.
Introduction
Deep in the JThainian forest, in the clearing where the Zazzle Flies
play a Strange Red Tree took root over night. It made an unsettling
hum and gave off a noxious odor poisoning many of the flies.
Camy, the strongest of his brood sought help from the defender
of the woods, a small bouncing creature known as the Gizzle Wap.
He would know what to do. 
 
The Gizzle Wap's solution was simple: Remove the Strange Red Tree.
But there was another problem. Coinciding with the appearance
of the red tree came the Myrmica a race of mindless insects that
feed upon the inhabitants of the forest.  Even worse the Myrmica
never come alone.  They serve the Invicta. Unlike the Myrmica, the
Invicta are cunning and tenacious. They will not be satisfied until
they control the entire forest or see its destruction.
The tree is most certainly their machination.
 
The plan to remove the tree and defeat the Invicta was not as simple. 
The only creatures strong enough to pull the tree out of the ground
are the Pegsi. The Gizzle Wap would attract the Pegsi to the clearing
with cloud fruit and convince them to remove the Red Tree.  Once
the tree has been removed, the Invctas magic will be weakened
and their lair should be revealed. The final step will be to confront the
Invicta.
 
Controls:
Left and Right to move the Gizzle Wap from screen to screen
Up makes the Gizzle Wap jump.
Hold the Fire Button in to use the Zazzle Fly as a shield in front of you.
Hold the Fire Button and Jump to make the Zazzle Fly fly into the air.
Jump Then hold the fire Button in and pull down to position the Zazzle Fly below you to attack enemies near the ground.
Down without pressing the fire button during the fight will eat a Cloud Fruit and heal you.

 

Left difficulty switch 

 A- You may carry 2 cloud fruit

 B- You may carry 4 cloud fruit

Right difficulty switch

 A- The Red Tree Will slowly poison you over time, The Zazzle Fly flies diagonally

 B- You are immune to the Tree's Poison, The Zazzle Fly flies vertically

 

Attached Thumbnails

  • GIZZLEWAPdpc53.bas.png
  • 1618089957-main.png
  • GIZZLEWAPdpc60.bas.png
  • Gizzle Wap End Label.jpg

Attached Files


Edited by Mountain King, Sun Jul 24, 2016 11:16 AM.


#2 bogax OFFLINE  

bogax

    Dragonstomper

  • 718 posts

Posted Mon Jan 19, 2015 1:10 PM

I have never done any real programming in my life. But I went through a lot of tutorials in the last couple of days and came up with the beginnings of a game based on a little bouncing creature my daughter and I made up.  Controls are left, right and up to jump. Also is there a way to progress the colors of the playfield over time? I can do it if the playfield is a single color, but i'm not sure how to do it with a multi colored playfield.

Let me know what you think.

 

 

 caveat: I'm not really familiar with the use
  of this kernel

 First I think you maybe need to clean up your code
 a little, it wouldn't compile for me (I'm guessing
 it thinks the first pfcolors statement is 11 lines,
 I don't know but it compiles with 12)

 The pfcolors are in tables in ROM so the simplest thing
 would be to just define a bunch of tables and select
 among them if that gives you enough variety

 Of course that will take a lot of space.
 the pfcolor statements as they are now are rather
 redundant (there's basically three color schemes
 repeated among nine tables so you could save some space
 there (but maybe those are just place holders not the
 intended final colors)

 You could probably combine tables into one or several
 bigger tables and manipulate the pointers (basically,
 write your own version of the pfcolors statement in
 bB so you'ld have one instance of your pfcolors routine
 that deals with the tables your way instead of a bunch
 of different instances of the standard pfcolors statement)

 Since the first and last colors in the tables are the same
 you could overlap tables and save some space.

 If tables in ROM won't do, you might be able to put
 the table in RAM and manipulate it there but you'ld have
 to give over [about] half your variables to the color table. 

 


Edited by bogax, Mon Jan 19, 2015 6:45 PM.


#3 KevinMos3 OFFLINE  

KevinMos3

    Stargunner

  • 1,483 posts
  • Founder of the Timothy Dalton as Bond fan club
  • Location:Behind YOU!

Posted Mon Jan 19, 2015 6:38 PM

That's a really cool start!   I love the playfield designs.  Very interesting layouts.  I hope you keep going with this.



#4 Retro Lord OFFLINE  

Retro Lord

    Moonsweeper

  • 363 posts
  • Location:Sweden

Posted Mon Jan 19, 2015 7:05 PM

Great start. I really like the main character, very well animate and cute!



#5 Mountain King OFFLINE  

Mountain King

    Dragonstomper

  • Topic Starter
  • 619 posts
  • Location:Philadelphia, PA

Posted Sun Jan 25, 2015 8:48 AM

Thanks for the tips. I am absolute noob when it comes to programming so I'm going to apologize for the sloppiness of my code a head of time. I am open to any advice or suggestions. The latest version includes a sidekick for the Gizzle Wap who follows him around. If you press the fire button it will making him fly into the trees. I've added the sound of the Gizzle Wap bouncing, but nothing too obnoxious. I've added collision detection of the player and the playfield. I've messed around with the playfield colors and added the beginnings of an enemy sprite and a ball object.   The ball object is defunct at the moment.

Attached Files



#6 Mountain King OFFLINE  

Mountain King

    Dragonstomper

  • Topic Starter
  • 619 posts
  • Location:Philadelphia, PA

Posted Sat Jan 31, 2015 8:34 AM

Added some AI and some creatures to fight.

Find the ball on the screen and a monster may appear that you will have to fight. Send your side kick to attack the monster.

I still want to add a player death routine, more sound, playfield organization, and more danger.

Attached Thumbnails

  • GIZZLEWAPG16.bas_1.png

Attached Files



#7 Mountain King OFFLINE  

Mountain King

    Dragonstomper

  • Topic Starter
  • 619 posts
  • Location:Philadelphia, PA

Posted Sun Feb 8, 2015 8:36 PM

I found that I have run out of space rather quickly and I still haven't done everything I wanted to do. So I switched over to DPC+. I'm still getting used to it. But here's what I have so far.

Attached Thumbnails

  • GIZZLEWAPdpc4.bas_8.png

Attached Files



#8 KevinMos3 OFFLINE  

KevinMos3

    Stargunner

  • 1,483 posts
  • Founder of the Timothy Dalton as Bond fan club
  • Location:Behind YOU!

Posted Sun Feb 8, 2015 9:04 PM

WOW, that is gorgeous!  Please keep up the good work.  I'm really looking forward to seeing where this goes.



#9 iesposta OFFLINE  

iesposta

    River Patroller

  • 3,402 posts
  • Retro-gaming w/my VCS
  • Location:Pennsylvania

Posted Sun Feb 8, 2015 10:05 PM

Your code looks good!

Only thing I see is if you are not going to use more than one background color, black or otherwise, DF6FRACINC can = 0 or 1, but it seems to work Ok in your game, but with =255 you can have 88 colored background lines in

 

I've never been able to program a game, but batari Basic made it happen for me.

I like how you have experimented with all the things on screen at once.

Where you make _player1 a tree with three copies, I wish the hardware allowed 3 copies double-wide.



#10 sodarun OFFLINE  

sodarun

    Star Raider

  • 57 posts

Posted Mon Feb 9, 2015 6:20 AM

Great so far, The little guy reminds me of a  hershey kiss :)



#11 Mountain King OFFLINE  

Mountain King

    Dragonstomper

  • Topic Starter
  • 619 posts
  • Location:Philadelphia, PA

Posted Mon Feb 9, 2015 6:23 AM

For the back round I was considering changing it over time as the game progresses. I was thinking of making it slowly turn daylight. I haven't played with it yet, that's why it's DFFRANINC is 255. One thing I don't like is that the back round extends bast the playfield. I'm not sure if there is a way around that.  I'm not really thrilled with the sprites being controlled by the DPC NUSIZ_ registers. I found you can control the number wide and reflect, but not both at the same time.  I'm guessing the same is true with having double wide sprites.  Thank you for the support. I am having a lot of with programming.


Edited by Mountain King, Mon Feb 9, 2015 6:25 AM.


#12 Mountain King OFFLINE  

Mountain King

    Dragonstomper

  • Topic Starter
  • 619 posts
  • Location:Philadelphia, PA

Posted Sat Feb 14, 2015 12:16 AM

Hello I'm at a road block. Anyone know who to handle collisions with multiple sprites since you can only register player1 sprites and not player2-9

 

__mon1
 
 player2x=player2x+h/8:player2y=player2y+a/16
  if collision(player1,missile0) && joy0fire then gosub __dead:COLUP1=rand
 
 
 return
 
__mon2
 player5x=100:player5y=125
 
 if collision(player1,missile0) && joy0fire then gosub __dead:COLUP1=rand
 
return
 
__dead
 
 for f = 1 to 254 
 player9x=player2x:player9y=player2y:o=10
  if o=10 && f=75 then player9:m{1}=1
 %1111111
 %0001001
 %0000001
end
 if o=10 && f=200 then player9:
 
 %1111111
 %0000000
 %0001001
 %0000001
end
 if o=10 then player9color:
 $40
 $40
 $40
end
 
  
 next

Attached Files



#13 iesposta OFFLINE  

iesposta

    River Patroller

  • 3,402 posts
  • Retro-gaming w/my VCS
  • Location:Pennsylvania

Posted Sat Feb 14, 2015 6:52 AM

collision(player1,
will check all virtual players one thru nine

collision(_player1,
will check virtual player1

collision(player2,
will check virtual player2
etc.

You need the underscore for virtual player1 because "player1" is an actual register like "player0"

Maybe this helps?

#14 Mountain King OFFLINE  

Mountain King

    Dragonstomper

  • Topic Starter
  • 619 posts
  • Location:Philadelphia, PA

Posted Sat Feb 14, 2015 7:47 AM

collision(player1,
will check all virtual players one thru nine

collision(_player1,
will check virtual player1

collision(player2,
will check virtual player2
etc.

You need the underscore for virtual player1 because "player1" is an actual register like "player0"

Maybe this helps?

I tried that. Anything other than "collision(player1,..."crashes. 



#15 RiverRaider73 OFFLINE  

RiverRaider73

    Combat Commando

  • 9 posts

Posted Sat Feb 14, 2015 3:29 PM

This is quite possibly the most visually beautiful homebrew I've ever seen. Those graphics are stunning

#16 Mountain King OFFLINE  

Mountain King

    Dragonstomper

  • Topic Starter
  • 619 posts
  • Location:Philadelphia, PA

Posted Sat Feb 14, 2015 9:58 PM

Thank Riverraider. My daughter and I sat there with custom graph paper and mapped out levels and sprites.



#17 Mountain King OFFLINE  

Mountain King

    Dragonstomper

  • Topic Starter
  • 619 posts
  • Location:Philadelphia, PA

Posted Sat Feb 21, 2015 8:13 AM

I made some progress and almost have a playable game. But ran into a roadblock I could use some help with.

Move the Gizzle wap through the woods and collect "blocks" that will help remove the strange red tree. A monster may appear which you will have to defeat to move to the next screen. Press the fire button to send the lightning moth into the air. Press up to jump.  While in the air you can press fire and press down at the same time to position the lightning moth below the Gizzle wap. Good for fighting monsters that attack from below.

 

My problem, is that I have exceeded my cycle count so when I play the game on my Harmony cart the screen jitters. I'm not really sure how to fix the problem. Would adding another Drawscreen and slow down the game be the solution?  Or do I just need to majorly clean up my code. Any help would be appreciated.

Attached Thumbnails

  • GIZZLEWAPdpc15.bas.png

Attached Files



#18 Random Terrain OFFLINE  

Random Terrain

    Visual batari Basic User

  • 28,245 posts
  • Controlled Randomness
    Replay Value
    Nonlinear
  • Location:North Carolina (USA)

Posted Sat Feb 21, 2015 10:14 AM

One thing is to try not to jump to other banks when you don't have to. You can edit the code so you'll have to jump only when absolutely necessary.

 

You also have an error:

_

   if o=10  && h=3 then player9 : m{1}=1

_

Notice the player9.

 

 

If you absolutely have to gosub to another bank, remember to use return otherbank:

 

randomterrain.com/atari-2600-memories-batari-basic-commands.html#return

 

It looks like there is at least once instance where you are gosubbing to a spot in your program from only one place (instead of multiple places), so you could use goto instead, then jump back to a label. That would save cycles since goto doesn't waste as many cycles as gosub. GOSUB/RETURN is only needed if that chunk of code is going to be jumped to from more than one spot in a program.

 

Compare:

 

goto with bankswitch   =   49 cycles

 

gosub with bankswitch + return   =   122 cycles

gosub with bankswitch + return otherbank   =   110 cycles



#19 Mountain King OFFLINE  

Mountain King

    Dragonstomper

  • Topic Starter
  • 619 posts
  • Location:Philadelphia, PA

Posted Sat Feb 21, 2015 11:38 AM

Thanks Random. Changing to Goto helped a little, but I'm still over on my cycle count. I might have to rework the code some more.



#20 bogax OFFLINE  

bogax

    Dragonstomper

  • 718 posts

Posted Sat Feb 21, 2015 11:58 AM

 none of this is tested


 get rid of the redundant stuff

 if x<18 && _monster=1 then x=18
 if x>135 && _monster=1 then x=135
 if x<18 && _monster=2 then x=18
 if x>135 && _monster=2 then x=135
 if x<18 && _monster=3 then x=18
 if x>135 && _monster=3 then x=135
 if x<18 && _monster=4 then x=18
 if x>135 && _monster=4 then x=135
 if x<18 && _monster=5 then x=18
 if x>135 && _monster=5 then x=135

 could be rewritten as

 if monster < 1 || monster > 5 then skip

 if x < 18 then x = 18
 if x > 135 then x = 135
 
skip


 here you'd average ~4 if statements if monster is
 random and you jumped out when you found your monster
 but somtimes you'll run one if statement
 sometimes eight if statements (as it is you
 always run all eight)

__mongen
 _monster=(rand&7)

 rem *_monster=4
 missile1height=10:COLUM1=rand
 missile1x=200:missile1y=200
 if _monster=0 then _monster=10
 if _monster=7 then _monster=10
 if _monster=6 then _monster=10
 if _monster=5 then player8x=80:player8y=80
 if _monster=4 then player7y=140
 if _monster=3 then player6y=1 else player6y=200
 if _monster=2 then player5x=1
 if _monster=1 then player2y=(rand&7)+20:player2x=(rand&7)+50

 return

 on goto and on gosub take about as much time as
 four if statements but they use less code and
 they take a consistent amount of time

__mongen
 _monster=(rand&7)

 rem *_monster=4
 missile1height = 10 : COLUM1 = rand
 missile1x = 200 : missile1y = 200 : player6y = 200

 on _monster goto m0 m1 m2 m3 m4 m5 m6 m7

m0
m7
m6 _monster = 10 : return thisbank
m5 player8x = 80 : player8y = 80 : return thisbank
m4 player7y = 140 : return thisbank
m3 player6y = 1 : return thisbank
m2 player5x = 1 : return thisbank
m1 player2y = (rand & 7) + 20 : player2x = (rand & 7) + 50 : return thisbank


 think about what you're doing
 here you'll sometimes be wasting time needlessly setting
 pfscore2 several times before it gets to what you want

 if r=0 then pfscore2 = %11111111
 if r>30 then pfscore2 = %01111111
 if r>60 then pfscore2 = %00111111
 if r>90 then pfscore2 = %00011111
 if r>120 then pfscore2 = %00001111
 if r>150 then pfscore2 = %00000111
 if r>180 then pfscore2 = %00000011
 if r>210 then pfscore2 = %00000001
 if r>240 then pfscore2 = %00000000
 if r>242 then goto __gizdead bank4

 at the least you should reorder the code and then jump
 out when you get where you want

 if r > 240 then pfscore2 = %00000000 : goto skip
 if r > 210 then pfscore2 = %00000001 : goto skip_the_rest
 if r > 180 then pfscore2 = %00000011 : goto skip_the_rest
 if r > 150 then pfscore2 = %00000111 : goto skip_the_rest
 if r > 120 then pfscore2 = %00001111 : goto skip_the_rest
 if r > 90 then pfscore2 = %00011111 : goto skip_the_rest
 if r > 60 then pfscore2 = %00111111 : goto skip_the_rest
 if r > 30 then pfscore2 = %01111111 : goto skip_the_rest
 if r = 0 then pfscore2 = %11111111
 goto skip_the_rest

skip
 if r > 242 then goto __gizdead bank4

skip_the_rest

 personally I'd do something more like this
 again uses less code takes about the same amount of
 time and the timing is more consistent


  if r > 0 && r < 31 then skip 

  rem temp1 = r / 30
  temp1 = r / 2 : temp1 = ((temp1 / 16) + 1 + temp1) / 16

  pfscore2 = tbl[temp1]

  data tbl
  %11111111, %01111111, %00111111, %00011111, %00001111, %00000011, %00000001, %00000000
end 

 if r > 242 then goto __gizdead bank4

skip

 

#21 Mountain King OFFLINE  

Mountain King

    Dragonstomper

  • Topic Starter
  • 619 posts
  • Location:Philadelphia, PA

Posted Sat Feb 21, 2015 9:44 PM

Hey thank a lot bogax. I'm not a programmer so I don't think like one.  But these little tips really help. I hadn't even thought of approaching these problem like this.



#22 bogax OFFLINE  

bogax

    Dragonstomper

  • 718 posts

Posted Sun Feb 22, 2015 12:55 PM

 heh I didn't really look at your code before

 if collision(player0,player1) && !p=6:then r=r+3
 if collision(player0,missile1) && !p=6:then r=r+3
 

 if r=0 then pfscore2 = %11111111
 if r>30 then pfscore2 = %01111111
 if r>60 then pfscore2 = %00111111
 if r>90 then pfscore2 = %00011111
 if r>120 then pfscore2 = %00001111
 if r>150 then pfscore2 = %00000111
 if r>180 then pfscore2 = %00000011
 if r>210 then pfscore2 = %00000001
 if r>240 then pfscore2 = %00000000
 if r>242 then goto __gizdead bank4

 I don't know what you think

 -- !p=6:then --

 should do but what ever it is, I'm pretty sure it's
 not doing what you think.

 presumably you meant

 -- !(p = 6) then --

 but in bB it would be

 -- p<>6 then --

 (that's not real code. I substituted
 -- for the rest of the if statement
 to highlight the bit I was talking about)


 anyway I don't see why you need to use

 r = r + 3

 or what you need r for except to know
 to adjust pfscore2 every tenth hit

 that being the case you could do something
 like this

 if p = 6 then skip
 if collision(player0,player1) then gosub inc_r 
 if collision(player0,missile1) then gosub inc_r
 
 if !pfscore2 then goto __gizdead bank4

skip

 .
 .

inc_r
 r = r + 1

 rem the if statement adjusts the lower four bits
 rem of r so that the lower four bits count in BCD
 rem (but only counting up) and adjusts pfscore2
 rem if you've reached (a multiple of) 10

 temp1 = r & %00001111
 if temp1 > 9 then r = r + 6 : pfscore2 = pfscore2 / 2
 return

 the subroutine would have to go someplace out of
 the way of course
 (the if statement could just reset r to 0 when it
 reaches 10 but I didn't know if you had some other
 use for r and for keeping a higher count than 9
 of course it counts kind of funny and that would
 have to be taken into account if so)

 

#23 Mountain King OFFLINE  

Mountain King

    Dragonstomper

  • Topic Starter
  • 619 posts
  • Location:Philadelphia, PA

Posted Fri Feb 27, 2015 6:50 AM

Here is the latest version of Gizzle Wap. Tentatively called The Gizzle Wap and the Strange Red Tree. I still need to streamline my code, but its actually playable now. Added a life bar, fruit count , tree scene, and boss fight.

Attached Thumbnails

  • GIZZLEWAPdpc21.bas_3.png

Attached Files



#24 ZackAttack OFFLINE  

ZackAttack

    Moonsweeper

  • 493 posts
  • Location:Orlando, FL US

Posted Fri Feb 27, 2015 7:33 AM

Great job. The graphics look awesome. Have you noticed that the random fruit drops sometimes get placed off the side of the level in the PF0 region? Bitwise ANDing with $7F (127 decimal) and ADDing $10 (16 decimal) should allow you to quickly put your random X coordinate in the desired range of 16-143. Hope that helps.



#25 Mountain King OFFLINE  

Mountain King

    Dragonstomper

  • Topic Starter
  • 619 posts
  • Location:Philadelphia, PA

Posted Fri Feb 27, 2015 11:40 AM

Thanks ZackAttack. Yeah, I have to fix that. It was working before and then I added another used for the ball object and it broke the random position generator. You know how that goes. By the way were you able to get to the boss? Did you find the game too easy or too difficult? I let m daughter play it and she would cry because she couldn't beat the ant.







Also tagged with one or more of these keywords: homebrew, gizzle wap, 2600

0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users