Mountain King Posted January 19, 2015 Share Posted January 19, 2015 (edited) The Gizzle Wap and The Strange Red Tree.IntroductionDeep in the JThainian forest, in the clearing where the Zazzle Fliesplay a Strange Red Tree took root over night. It made an unsettlinghum and gave off a noxious odor poisoning many of the flies.Camy, the strongest of his brood sought help from the defenderof 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 appearanceof the red tree came the Myrmica a race of mindless insects thatfeed upon the inhabitants of the forest. Even worse the Myrmicanever come alone. They serve the Invicta. Unlike the Myrmica, theInvicta are cunning and tenacious. They will not be satisfied untilthey 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 groundare the Pegsi. The Gizzle Wap would attract the Pegsi to the clearingwith cloud fruit and convince them to remove the Red Tree. Oncethe tree has been removed, the Invctas magic will be weakenedand their lair should be revealed. The final step will be to confront theInvicta. Controls:Left and Right to move the Gizzle Wap from screen to screenUp 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 The Gizzle Wap Game Instructions.pdf GIZZLEWAPdpc68beta.bas.bin GIZZLEWAPdpc69final.bas.bin GIZZLEWAPdpc72.bas.bin Edited July 24, 2016 by Mountain King 10 Quote Link to comment Share on other sites More sharing options...
bogax Posted January 19, 2015 Share Posted January 19, 2015 (edited) 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 January 20, 2015 by bogax Quote Link to comment Share on other sites More sharing options...
KevinMos3 Posted January 20, 2015 Share Posted January 20, 2015 That's a really cool start! I love the playfield designs. Very interesting layouts. I hope you keep going with this. Quote Link to comment Share on other sites More sharing options...
Retro Lord Posted January 20, 2015 Share Posted January 20, 2015 Great start. I really like the main character, very well animate and cute! Quote Link to comment Share on other sites More sharing options...
Mountain King Posted January 25, 2015 Author Share Posted January 25, 2015 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. GIZZLEWAPG12.bas.bin GIZZLEWAPG12.bas Quote Link to comment Share on other sites More sharing options...
Mountain King Posted January 31, 2015 Author Share Posted January 31, 2015 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. GIZZLEWAPG16.bas GIZZLEWAPG16.bas.bin Quote Link to comment Share on other sites More sharing options...
Mountain King Posted February 9, 2015 Author Share Posted February 9, 2015 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. GIZZLEWAPdpc4.bas GIZZLEWAPdpc4.bas.bin Quote Link to comment Share on other sites More sharing options...
KevinMos3 Posted February 9, 2015 Share Posted February 9, 2015 WOW, that is gorgeous! Please keep up the good work. I'm really looking forward to seeing where this goes. Quote Link to comment Share on other sites More sharing options...
iesposta Posted February 9, 2015 Share Posted February 9, 2015 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. Quote Link to comment Share on other sites More sharing options...
sodarun Posted February 9, 2015 Share Posted February 9, 2015 Great so far, The little guy reminds me of a hershey kiss Quote Link to comment Share on other sites More sharing options...
Mountain King Posted February 9, 2015 Author Share Posted February 9, 2015 (edited) 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 February 9, 2015 by Mountain King Quote Link to comment Share on other sites More sharing options...
Mountain King Posted February 14, 2015 Author Share Posted February 14, 2015 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 GIZZLEWAPdpc6.bas Quote Link to comment Share on other sites More sharing options...
iesposta Posted February 14, 2015 Share Posted February 14, 2015 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? Quote Link to comment Share on other sites More sharing options...
Mountain King Posted February 14, 2015 Author Share Posted February 14, 2015 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. Quote Link to comment Share on other sites More sharing options...
RiverRaider73 Posted February 14, 2015 Share Posted February 14, 2015 This is quite possibly the most visually beautiful homebrew I've ever seen. Those graphics are stunning 1 Quote Link to comment Share on other sites More sharing options...
Mountain King Posted February 15, 2015 Author Share Posted February 15, 2015 Thank Riverraider. My daughter and I sat there with custom graph paper and mapped out levels and sprites. Quote Link to comment Share on other sites More sharing options...
Mountain King Posted February 21, 2015 Author Share Posted February 21, 2015 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. GIZZLEWAPdpc15.bas GIZZLEWAPdpc15.bas.bin Quote Link to comment Share on other sites More sharing options...
+Random Terrain Posted February 21, 2015 Share Posted February 21, 2015 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 Quote Link to comment Share on other sites More sharing options...
Mountain King Posted February 21, 2015 Author Share Posted February 21, 2015 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. Quote Link to comment Share on other sites More sharing options...
bogax Posted February 21, 2015 Share Posted February 21, 2015 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 Quote Link to comment Share on other sites More sharing options...
Mountain King Posted February 22, 2015 Author Share Posted February 22, 2015 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. Quote Link to comment Share on other sites More sharing options...
bogax Posted February 22, 2015 Share Posted February 22, 2015 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) Quote Link to comment Share on other sites More sharing options...
Mountain King Posted February 27, 2015 Author Share Posted February 27, 2015 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. GIZZLEWAPdpc21.bas.bin Quote Link to comment Share on other sites More sharing options...
ZackAttack Posted February 27, 2015 Share Posted February 27, 2015 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. Quote Link to comment Share on other sites More sharing options...
Mountain King Posted February 27, 2015 Author Share Posted February 27, 2015 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.