Jump to content
IGNORED

Metal Max 2 Demo! [Updated:07/21/2013]


Master_Programmer
 Share

Recommended Posts

Okay, here we go, this is Demo #2, with a little under half the game playable.

 

There's 4 stages complete, and a 5th with a boss, and a complete layout, but very sparse enemies and no healing items.

 

 

Switch Select after stage 2, changes your character.

 

If you have collected 3 white gemstones, and you have more than one full life-bar, you can turn into a "Giga" state, with either character, that grants invincibility to most attacks, at the cost of very slowly draining your life down to one bar.

 

To activate, jump, and as you'removing upwards, press the up direction on the joystick.

 

After stage 5, though, the game is essentially over, since there is no real stage-layout for any stages beyond 5.

 

 

Have fun!

 

 

Edit:

 

I fixed the immortal first boss bug. No bosses are immortal.

 

I also added a Full-fledged, but very short, full-screen cutscene, that starts just as you reach the screen for the very first boss.

 

Download the "BugFixed" version, as the previous one has an error in the boss intro to the stage 3 fight, where The "original" max gets stuck in an intro loop, and is unable to be attacked.

Metal Max Returns(Cutscene Demo).bin

Metal Max Returns(Cutscene Demo BugFixed).bin

Edited by Master_Programmer
  • Like 2
Link to comment
Share on other sites

Like loon says, it's hard to say unless we have an idea of what the extra stages/extra screens would mean in context. What would the difference be?

 

Also, when comparing the combat types between Megaman and Sonic, do you mean whether you jump on enemies to kill them versus shooting them? Why not have both?

Link to comment
Share on other sites

Like loon says, it's hard to say unless we have an idea of what the extra stages/extra screens would mean in context. What would the difference be?

 

Also, when comparing the combat types between Megaman and Sonic, do you mean whether you jump on enemies to kill them versus shooting them? Why not have both?

 

Not sure I'll have the cycle-count for both types of combat, but I can try.

 

I'm down to anywhere from 500-700, without enemies((But with this game's version of 'Rings' from sonic, which are green gemstones)), Mostly because I'm using advanced collision detection, which allows the sides of walls to be solid, despite being a platformer.

 

But, I *CAN* try both, if you two would like.

 

Heck, I could make two or three engine types, and let everyone pick out which version they like best. :3

 

 

EDIT:

 

Also, the extra screens for each stage, with less stages, would mean I have less work to do coming up with stage themes and enemies, plus longer and more complex stages. :P

Edited by Master_Programmer
Link to comment
Share on other sites

Sounds good to me.

 

I'm surprised that your collision detection is gobbling up that many cycles, leaving you with just 500 left. Is that the case, or did I misunderstand?

 

When you say "advanced", is it based around collision() statements or pfread()?

Link to comment
Share on other sites

Pfread.

 

The "joy0left" if statement there is crashing everything, and the source-code ONLY compiles when that one line is missing!

 

 

 

main
temp3 = ((player0x-15)/4)+1
temp4 = ((player0x-15)/4)-1
temp6 = ((player0y-1)/8)-1
temp5 = ((player0y-1)/8)-1

ac=0
if yvel<>0 then ac=2:jump=1


if joy0right then xvel=xvel+0.084 : ac=1
if joy0left then xvel=xvel-0.084 : ac=1


if joy0fire && !jump then yvel=-1.5:player0y=player0y-2: ac=2: jump=1
if !joy0fire && yvel>120 then yvel=0
if xvel>3 && xvel<120 then xvel=3
if xvel>120 && xvel<252 then xvel=252

yvel=yvel+0.086
if collision(player0, playfield) && pfread(temp3,temp6) then if xvel<120 then xvel=0
if collision(player0, playfield) && pfread(temp4,temp6) then if xvel>120 then xvel=0
temp3=temp3-1
if collision(player0, playfield) && pfread(temp3,temp5) then if yvel>120 then yvel=0
temp6=temp6+1
if collision(player0, playfield) && pfread(temp3,temp6) then jump=0: if yvel<120 then yvel=0

if xvel>0 && xvel<120 then xvel=xvel-0.038
if xvel>120 then xvel=xvel+0.038

player0y=player0y+yvel
player0x=player0x+xvel
skipmove
if player0y<10 then player0y=10
if player0y>85 then reboot
if player0x>138 then player0x=15:screen=screen+1: gosub getitem
if player0x<15 then player0x=138:screen=screen-1: gosub getitem
if dir=0 then REFP0=$08

 

 

 

Even stranger, the statement works if I turn the joy0left to a joy0right, or up, or down, or ANYTHING else.

Edited by Master_Programmer
Link to comment
Share on other sites

If someone can tell me what's going wrong, then please, by all means, do.

 

 

Until then, I'm going to delete lines until I come upon the problem, then CTRL+Z all of it back, and tamper with the bad line.

 

 

EDIT:

 

Turns out a variable of mine had a bad name. "ef" was the name of a bit I had, and the compiler hated it.

default3.bas

Edited by Master_Programmer
Link to comment
Share on other sites

Alright! Here's the very first demo of Metal Max 2!

 

Left and right move left and right, fire jumps, and down shoots!

 

The green things are gems, pick them up, they give you health!

 

 

 

instead of lives, I'm using Metroid-style energy tanks, though they won't be called that. Over-filling your health, by grabbing gems, will allow you to fill up a "tank", having the maximum of 3 spare tanks, or 4 life bars total.

 

 

The demo is only one stage, 10 screens total, with 2 different kinds of enemies, a small weak one, and a large strong one.

 

Enjoy~!

Metal Max Returns(Demo 1).bin

  • Like 1
Link to comment
Share on other sites

I have Demo #2 up!

 

It has a solid 3 stages, each with a unique boss!

 

Stage #2's boss, after defeated, needs to be collided with, to activate a tiny cut-scene. That boss, will actually be playable in the full game...She's Max's love-interest, a gal named Tora. ^^

 

Boss #3 is a clone of Max from the first game.

 

The stages in the demo are as follows:

 

Stage 1 - Melody Meadow

Stage 2 - Chaotic Castle

Stage 3 - Poison Paradise

 

 

Each stage, except #3, has a small puzzle, the reward being a White Gemstone.

 

These, in the finished product, will in effect be like the Chaos Emeralds from sonic. Obtaining all of them will allow a temporary powered up form of either character...but for now, all they do, is charge your health up to the max.

Metal Max Returns(Demo 2).bin

Link to comment
Share on other sites

Amazing work! I'm very impressed by the sprites, levels, and your overall use of your limited sprite resources to still make the game feel full and interesting. Superb job!

 

Out of curiosity, how much space do you have remaining after all this?

 

Personally, I couldn't get past the third stage because of the slidy movement + precision platforming. Urk!

 

Also, the first time I played the second boss, he charged over to me on the left side of the screen and knocked me up and out of the top of the screen, where I was stuck.

Link to comment
Share on other sites

Amazing work! I'm very impressed by the sprites, levels, and your overall use of your limited sprite resources to still make the game feel full and interesting. Superb job!

 

Out of curiosity, how much space do you have remaining after all this?


     1737 bytes of ROM space left in bank 1
     630 bytes of ROM space left in bank 2
     627 bytes of ROM space left in bank 3
     426 bytes of ROM space left in bank 4
     4052 bytes of ROM space left in bank 5
     4052 bytes of ROM space left in bank 6
     4052 bytes of ROM space left in bank 7
     2132 bytes of ROM space left in bank 8

 

Really, my big problem isn't space when it comes to this game...it's my staggeringly low cycle count left.

 

I'm trying very hard to optimize my code as much as I can, but I'm starting to get to the point where I'm not sure I have much left I can optimize.

 

 

Personally, I couldn't get past the third stage because of the slidy movement + precision platforming. Urk!

 

Yeah, I'm still working on that...I'm trying to make him a tad bit slidy, but not too much, and that perfect balance is strangely hard to get.

 

Also, the first time I played the second boss, he charged over to me on the left side of the screen and knocked me up and out of the top of the screen, where I was stuck.

 

Really? That was the blue boss you're talking about, right? I'll look into the code there, and see if I can fix that.

Link to comment
Share on other sites

That boss on the second stage is also surprisingly easy to beat after how long it takes to finish off the first boss.

 

What is it that's taking up all those cycles? Is it your collision detection? Is the code going through a bunch of if-then statements for AI? Are you jumping between the banks a number of times per loop?

Edited by Cybearg
Link to comment
Share on other sites

That boss on the second stage is also surprisingly easy to beat after how long it takes to finish off the first boss.

 

She's not supposed to be tough, because she's not actually a villain. She mistakes you for being the recently resurrected villain, the boss from the first stage. She's easy, because Tora has the exact same HP as the player would, if they had only 1 bar of life.

 

 

What is it that's taking up all those cycles? Is it your collision detection? Is the code going through a bunch of if-then statements for AI? Are you jumping between the banks a number of times per loop?

 

I'm going to guess it's both the advanced Collision Detection, and the enemy AI. The bosses are quite complex, code-wise.

Link to comment
Share on other sites

Odd that the collision detection would take that many cycles. I'd recently fiddled with collision detection in a game I'm working on and I got what I thought was a pretty complicated system only drawing 300-400 cycles on a regular basis. Though maybe that's considered a lot, I dunno.

 

I'd definitely suggest skipping most of the AI code unless it's actually being utilized. The cycle count is about the same, around 125-300, regardless of what's on-screen. When it's an empty screen, it should be able to lighten up a fair bit, I'd imagine. Perhaps an on...goto or on...gosub statement that only calls the necessary AI code when there's actually an AI utilizing it in play?

Link to comment
Share on other sites

Odd that the collision detection would take that many cycles. I'd recently fiddled with collision detection in a game I'm working on and I got what I thought was a pretty complicated system only drawing 300-400 cycles on a regular basis. Though maybe that's considered a lot, I dunno.

 

 


  temp3 = ((player0x-15)/4)+1
  temp4 = temp3-2
  temp5 = ((player0y-1)/8)-1
  temp6 = temp5 +1

if collision(player0, playfield) && pfread(temp3,temp5) then if xvel<120 then xvel=0
if collision(player0, playfield) && pfread(temp4,temp5) then if xvel>120 then xvel=0
temp3=temp3-1
if collision(player0, playfield) && pfread(temp3,temp5) then if yvel>120 then yvel=0 
if collision(player0, playfield) && pfread(temp3,temp6) then jump=0: if yvel<120 then yvel=0

 

That's my collision detection. I'm fairly sure that's the main culprit of my cycle-usage.

 

 

 

I'd definitely suggest skipping most of the AI code unless it's actually being utilized. The cycle count is about the same, around 125-300, regardless of what's on-screen. When it's an empty screen, it should be able to lighten up a fair bit, I'd imagine. Perhaps an on...goto or on...gosub statement that only calls the necessary AI code when there's actually an AI utilizing it in play?

 

That's exactly what I'm doing. I actually have each "Object"((Non-player sprite)) as a separate subroutine, called to by a bunch of goto's.

 

 

 

 

bank 4

OBJECTS
if object=7 then goto XAIM
if object=11 then goto OLD_MAX
if object=8 then goto TORA_HIROBA
if object=1 then goto GEM
if object=2 then goto EN0
if object=3 then goto EN1
if object=10 then goto EN2
if object=9 then goto XAIM_2
if object=4 then goto SIGN
if object=5 then goto HGEM
if object=6 then goto SWITCH
if object=12 then goto PLATF_LEFTRIGHT
if object=13 then goto PLATF_UPDOWN
if object=14 then goto DEAD
goto DWI

GEM
player1:
%00011000
%00111100
%01011010
%01100110
%01100110
%01011010
%00111100
%00011000
end
COLUP1=$CE
if count=0 then object=0:player1x=230:player1y=230
if count=1 then NUSIZ1=$20
if count=2 then NUSIZ1=$21
if count=3 then NUSIZ1=$23
if count=4 then NUSIZ1=$25
if collision(player0, player1) && tmr=0 && pfscore2>=255 && pfscore1<%00010101 then count=count-1:tmr=32: pfscore2 = %10000000:pfscore1 = pfscore1*4|1
if collision(player0, player1) && tmr=0 && pfscore2<255 then count=count-1:tmr=32: pfscore2 = pfscore2*2|1:AUDV1=5:AUDC1=4:AUDF1=18: cdur1=10
if tmr>0 then tmr=tmr-1
goto DWI

EN0
if eram3=0 then eram0=2:eram3=1
if eram1=0 then player1:
%00111100
%00111100
%00010100
%00111100
%00000000
%00011000
%00000111
%00000000
end
if eram1=5 then player1:
%00111100
%00000100
%00111100
%00010100
%00111000
%00011000
%11100000
%00000000
end
eram1=eram1+1
if eram1>=10 then eram1=0
COLUP1=$CE
if count=0 then object=0:player1x=230:player1y=230
if count=1 then NUSIZ1=$20
if collision(player0, player1) && tmr=0 then tmr=32:AUDV1=8:AUDC1=8:AUDF1=3:cdur1=10:pfscore2 = pfscore2/2
if tmr>0 then tmr=tmr-1
if collision(missile0, player1) then missile0y=230:eram0=eram0-1:AUDV1=8:AUDC1=8:AUDF1=3:cdur1=10
if eram0=0 then eram3=0:count=0
if enemyf then player1x=player1x-1
if !enemyf then player1x=player1x+1: REFP1=$08
if eram2>0 then eram2=eram2-1
if collision(player1, playfield) && eram2=0 then enemyf=!enemyf: eram2=4
if player1x=140 then enemyf=1
if player1x=15 then enemyf=0

goto DWI

EN1
if eram3=0 then eram0=24:eram3=1
if eram1=0 then player1:
%11000011
%01100011
%01100110
%10000001
%10111101
%00111101
%00111011
%00000011
%00111100
%00000100
%00111100
%00000100
end
if eram1=20 then player1:
%00110011
%00011000
%00001100
%00000000
%00011100
%00100110
%00111011
%00000011
%00111100
%00000100
%00111100
%00000100
end
if player0x>player1x then REFP1=$08
if eram1=20 && player0x<player1x then player1x=player1x-4
if eram1=20 && player0x>player1x then player1x=player1x+4
if eram1=00 && player0x<player1x then player1x=player1x-4
if eram1=00 && player0x>player1x then player1x=player1x+4
eram1=eram1+1
if eram1>=40 then eram1=0
COLUP1=$56
if count=0 then object=0:player1x=230:player1y=230
if count=1 then NUSIZ1=$25
if collision(player0, player1) && tmr=0 && player0x<player1x then tmr=32:xvel=-4:AUDV1=8:AUDC1=8:AUDF1=3:cdur1=10:pfscore2 = pfscore2/4
if collision(player0, player1) && tmr=0 && player0x>player1x then tmr=32:xvel=4:AUDV1=8:AUDC1=8:AUDF1=3:cdur1=10:pfscore2 = pfscore2/4
if tmr>0 then tmr=tmr-1
if collision(missile0, player1) then missile0y=230:eram0=eram0-1:AUDV1=8:AUDC1=8:AUDF1=4:cdur1=10
if eram0=0 then eram3=0:count=0
if collision(player1, playfield) && player0x>player1x then player1x=player1x-4
if collision(player1, playfield) && player0x<player1x then player1x=player1x+4
goto DWI

SIGN
player1:
%00011000
%00011000
%11111111
%11010111
%10000011
%10101011
%11000111
%11111111
end
COLUP1=$F2
NUSIZ1=$25
goto DWI

HGEM
player1:
%00011000
%00111100
%01011010
%01100110
%01100110
%01011010
%00111100
%00011000
end
if specialtoggle then player1y=70
COLUP1=$0E
if count=0 then object=0:player1x=230:player1y=230
if collision(player0, player1) && tmr=0 then count=count-1:tmr=32: gem1=1:pfscore1 = %00010101:pfscore2=255
if tmr>0 then tmr=tmr-1
goto DWI

SWITCH
player1:
%01111110
%00111100
%00000000
%00000100
%00000110
%00000010
%00000000
%00000000
end

if specialtoggle then REFP1=$08
COLUP1=$06
if collision(player0, player1) && !specialtoggle then specialtoggle=1
if tmr>0 then tmr=tmr-1
goto DWI



XAIM
if eram1>99 then goto SKIPINTRO
if eram3=0 then eram0=64:eram3=1:eram1=0:eram2=0
if eram1=20 then player1:
%00000100
%00001100
%00000010
%00000000
%00000000
%00000000
%00000000
%00000000
end
if eram1=40 then player1:
%00011100
%00000000
%00000000
%00000000
%00000000
%00000000
%00000000
%00000000
end
if eram1=60 then player1:
%00101100
%01000000
%01111111
%00111110
%00011111
%00000000
%00000000
%00000000
end
if eram1=80 then player1:
%01001010
%01101000
%00000000
%00100101
%01000110
%01111111
%00111100
%00011110
end 
eram2=eram2+1
SKIPINTRO
if eram1=100 then control=1: player1:
%01000010
%00100100
%00011010
%11011000
%00111100
%10111110
%11111100
%01111110
end
if eram1=101 then player1:
%00001001
%00011010
%00001100
%01011001
%00111100
%10111110
%11111100
%01111110
end
if eram1=102 then player1:
%10101110
%00011000
%01001100
%10001110
%11101010
%01111000
%00111100
%00000000
end
COLUP1=$04

if count=0 then object=0:player1x=230:player1y=230
if eram1>=100 then goto skipcut
if eram2<5 then goto DWI
eram2=0
if eram1<100 then control=0:eram1=eram1+1: goto DWI
skipcut

if player0x>player1x then REFP1=$08
if eram3>80 || eram3<7 then goto NOT_THIRD_AI
eram3=eram3+1:eram1=102
if eram3=80 then eram3=1
NOT_THIRD_AI

if eram3>6 || eram3<4 then goto NOT_SECOND_AI

if player1x<120 then player1x=player1x+2
if player1y>2 && eram3=4 then player1y=player1y-1:eram1=101
if player1y<70 && eram3=5 then player1y=player1y+5:eram1=102
if player1y>=70 && eram3=5 then player1y=72:eram3=7
if player1y=2 then eram3=5
NOT_SECOND_AI


if eram3>3 then goto NOT_FIRST_AI
if eram3=3 then eram3=4
if eram3=1 && player0x<player1x then eram1=101:eram3=2: enemyf=0
if eram3=1 && player0x>player1x then eram1=101:eram3=2: enemyf=1
if enemyf then player1x=player1x+4
if !enemyf then player1x=player1x-4
if collision(player1, playfield) && eram3=2 then eram3=3:eram1=100
if collision(player0, player1) && tmr=0 && player0x<player1x then tmr=32:xvel=-4:AUDV1=8:AUDC1=8:AUDF1=4:cdur1=10:pfscore2 = pfscore2/4
if collision(player0, player1) && tmr=0 && player0x>player1x then tmr=32:xvel=4:AUDV1=8:AUDC1=8:AUDF1=4:cdur1=10:pfscore2 = pfscore2/4
NOT_FIRST_AI

if eram0=0 && eram3<81 then eram3=81: control=0
if eram3>80 then eram1=102:player1y=72:eram3=eram3+1

if tmr>0 then tmr=tmr-1
if collision(missile0, player1) && eram0>0 then missile0y=230:eram0=eram0-1:AUDV1=8:AUDC1=8:AUDF1=4:cdur1=10
if eram0=0 && eram3>200 then count=0:control=1: goto STAGEBEGIN bank1
goto DWI




OLD_MAX
if eram3=0 then eram0=32:eram3=1:eram1=0:eram2=0:missile1y=230: missile1height=0


if eram1=10 then player1:
%01000100
%00100100
%00011000
%01011010
%00110100
%01110100
%00011110
%00000000
end
if eram1=20 || eram3=1 then player1:
%00010000
%00001000
%00011000
%01011010
%00110100
%01110100
%00011110
%00000000
end
COLUP1=$42
eram1=eram1+1
if eram1>20 then eram1=0
if eram3=1 then control=0 : goto skipmove_ORIGINAL_MAX
if count=0 then object=0:player1x=230:player1y=230
if missile1x<10 || missile1x>140 then missile1y=230
if missile1y<230 && eram2=0 then missile1x=missile1x+4
if missile1y<230 && eram2=1 then missile1x=missile1x-4
if collision(missile1, playfield) then missile1y=230
NUSIZ1=$20
if enemyf then player1x=player1x-1: REFP1=$08
if !enemyf then player1x=player1x+1
if player1x<18 then enemyf=0
if player1x>132 then enemyf=1

if collision(player0, missile1) && player0x<missile1x then xvel=-0.5:AUDV0=8:AUDC1=8:AUDF1=4:cdur1=10:pfscore2 = pfscore2/4:missile1y=230
if collision(player0, missile1) && player0x>missile1x then xvel=0.5:AUDV0=8:AUDC1=8:AUDF1=4:cdur1=10:pfscore2 = pfscore2/4:missile1y=230

if missile1y>=230 then missile1x=player1x:missile1y=player1y-4:eram2{0}=enemyf


if collision(missile0, player1) && eram0>0 then missile0y=230:eram0=eram0-1:AUDV1=8:AUDC1=8:AUDF1=4:cdur1=10
if eram0=0 then count=0:control=1: goto STAGEBEGIN bank1
goto DWI
skipmove_ORIGINAL_MAX
if eram3=1 then player1y=player1y+1
if player1y=72 then eram3=2:control=1

goto DWI



TORA_HIROBA
if eram3=0 then eram0=8:eram3=1:eram1=0:eram2=0
if eram3>149 then eram1=0
if eram1<201 then control=0
if eram1>=201 then control=1
if eram1=0 then player1:
%01000010
%00100100
%00011010
%01111000
%00110101
%00110110
%00011110
%00000000
end
if eram1=100 then player1:
%01000010
%00100100
%00011010
%01111000
%00101101
%00101110
%00011110
%00000000
end
if eram1=201 then player1:
%00000000
%00000110
%01111000
%00011110
%10101100
%01110100
%01111001
%10000000
end
if eram1=210 then player1:
%00010000
%00111000
%00011110
%10101100
%01110100
%01111001
%10000000
%00000000
end
if eram3>=81 && eram3<150 then player1:
%10111101
%00010011
%00011101
%00001111
%00000000
%00000000
%00000000
%00000000
end
if eram3>=82 && eram3<150 then player0:
%01110101
%00011000
%00110100
%01110110
%01011110
%00011110
%00111100
%00000000
end
COLUP1=$88

eram1=eram1+1
if eram1>=220 then eram1=201
if count=0 then object=0:player1x=230:player1y=230

if eram3=81 && collision(player1, player0) then eram3=82: control=0
if eram0=0 && eram3<81 then eram3=81
if eram3=82 then eram1=102:player1y=72:eram3=eram3+1
if eram3>81 then eram1=202:eram3=eram3+1

if eram3>80 then goto skipmovex
if player0x<player1x && eram1>=201 then player1x=player1x-1
if player0x>player1x && eram1>=201 then player1x=player1x+1:REFP1=$08
if collision(player0, player1) && tmr=0 && player0x<player1x then tmr=32:AUDV0=8:AUDC1=8:AUDF1=4:cdur1=10:pfscore2 = pfscore2/4
if collision(player0, player1) && tmr=0 && player0x>player1x then tmr=32:AUDV0=8:AUDC1=8:AUDF1=4:cdur1=10:pfscore2 = pfscore2/4
skipmovex

if tmr>0 then tmr=tmr-1
if collision(missile0, player1) && eram0>0 then missile0y=230:eram0=eram0-1:AUDV1=8:AUDC1=8:AUDF1=4:cdur0=10
if eram0=0 && eram3>250 then count=0:control=1: goto STAGEBEGIN bank1
goto DWI


XAIM_2
if cutsc then goto skipscene0
control=0
if eram3=0 then eram0=255:eram3=1:eram1=0:eram2=0

if eram1=0 then control=1: player1:
%01000010
%00100100
%00011010
%11011000
%00111100
%10111110
%11111100
%01111110
end
if eram1=150 then player1:
%00001001
%00011010
%00001100
%01011001
%00111100
%10111110
%11111100
%01111110
end

if eram1>=100 then REFP1=$08
COLUP1=$04

if count=0 then object=0:player1x=230:player1y=230

if eram1<150 then eram1=eram1+1: goto DWI
if player1x<135 then player1x=player1x+3
if player1x>=135 then player1:
0
end
eram1=eram1+1
if eram1>=200 then eram0=0
if tmr>0 then tmr=tmr-1
if collision(missile0, player1) && eram0>0 then missile0y=230:eram0=eram0-1:AUDV0=8:AUDC0=8:AUDF0=4:cdur0=10
skipscene0
if eram0=0 then count=0:control=1: cutsc=1

goto DWI

EN2
if eram3=0 then eram0=2:eram3=1
if eram1=0 then player1:
%00111100
%00111100
%00010100
%00111100
%00000000
%00011000
%00000111
%00000000
end
if eram1=5 then player1:
%00111100
%00000100
%00111100
%00010100
%00111000
%00011000
%11100000
%00000000
end
eram1=eram1+1
if eram1>=10 then eram1=0
COLUP1=$1E
if count=0 then object=0:player1x=230:player1y=230
if count=1 then NUSIZ1=$20
if collision(player0, player1) && tmr=0 then tmr=32:AUDV0=8:AUDC0=8:AUDF0=3:cdur1=10:pfscore2 = pfscore2/2
if tmr>0 then tmr=tmr-1
if collision(missile0, player1) then missile0y=230:eram0=eram0-1:AUDV1=8:AUDC1=8:AUDF1=3:cdur1=10
if eram0=0 then eram3=0:count=0

if player0x=player1x then eram3=2
if eram3=2 then goto divebomb_0
if enemyf then player1x=player1x-1
if !enemyf then player1x=player1x+1: REFP1=$08
if eram2>0 then eram2=eram2-1
if collision(player1, playfield) && eram2=0 then enemyf=!enemyf: eram2=4
goto skip_divebomb_0
divebomb_0
player1y=player1y+5
if collision(player1, playfield) then AUDV1=8:AUDC1=8:AUDF1=30:cdur1=10:eram0=0
skip_divebomb_0

if player1x=140 then enemyf=1
if player1x=15 then enemyf=0

goto DWI

PLATF_LEFTRIGHT
if eram3=0 then eram0=1:eram3=1
if eram1=0 then player1:
%00100100
%00011000
%00000000
%00111100
%11111111
%00000000
%00000000
%00000000
end
if eram1=5 then player1:
%00000000
%00000000
%00000000
%00111100
%11111111
%00000000
%00000000
%00000000
end
eram1=eram1+1
if eram1>=10 then eram1=0
COLUP1=$0E
NUSIZ1=$05
if !collision(player1,player0) && enemyf then player1x=player1x-1
if !collision(player1,player0) && !enemyf then player1x=player1x+1
if collision(player1,player0) && enemyf then player1x=player1x-1:player0x=player0x-1:yvel=-0.1
if collision(player1,player0) && !enemyf then player1x=player1x+1:player0x=player0x+1:yvel=-0.1

if eram2>0 then eram2=eram2-1
if collision(player1, playfield) && eram2=0 then enemyf=!enemyf: eram2=4

if player1x=140 then enemyf=1
if player1x=15 then enemyf=0

goto DWI

PLATF_UPDOWN
if eram3=0 then eram0=1:eram3=1
if eram1=0 then player1:
%00100100
%00011000
%00000000
%00111100
%11111111
%00000000
%00000000
%00000000
end
if eram1=5 then player1:
%00000000
%00000000
%00000000
%00111100
%11111111
%00000000
%00000000
%00000000
end
eram1=eram1+1
if eram1>=10 then eram1=0
COLUP1=$0E
NUSIZ1=$05
if !collision(player1,player0) && enemyf then player1y=player1y-1
if !collision(player1,player0) && !enemyf then player1y=player1y+1
if collision(player1,player0) && enemyf then player1y=player1y-1:player0y=player0y-1:yvel=-0.1
if collision(player1,player0) && !enemyf then player1y=player1y+1:player0y=player0y+1:yvel=-0.1

if eram2>0 then eram2=eram2-1
if collision(player1, playfield) && eram2=0 then enemyf=!enemyf: eram2=4

if player1y>=72 then enemyf=1
if player1y<=15 then enemyf=0

goto DWI


DEAD
pfscore1=0
pfscore2=0
control=0
goto DWI

DWI
goto RFO bank1

 

 

 

 

That's all of my enemy/object AI so far. The very last one, the "Dead" there, is to kill the player upon reaching the end of demo screen, to make 100% sure they don't find a way to the next of the ((Unfinished and missing)) stages.

Link to comment
Share on other sites

Awesome! Grats!

 

By the way, why aren't you using an on...goto statement instead of all those if/then statements? It'd save you a ton of space.

 

If the issue is the bB space limit for single-line commands, I'd recommend you use a bit of Assembly there to do it instead.

Link to comment
Share on other sites

Awesome! Grats!

 

By the way, why aren't you using an on...goto statement instead of all those if/then statements? It'd save you a ton of space.

 

If the issue is the bB space limit for single-line commands, I'd recommend you use a bit of Assembly there to do it instead.

 

 


1737 bytes of ROM space left in bank 1
630 bytes of ROM space left in bank 2
627 bytes of ROM space left in bank 3
426 bytes of ROM space left in bank 4
4052 bytes of ROM space left in bank 5
4052 bytes of ROM space left in bank 6
4052 bytes of ROM space left in bank 7
2132 bytes of ROM space left in bank 8

 

Really, my big problem isn't space when it comes to this game...it's my staggeringly low cycle count left.

I'm trying very hard to optimize my code as much as I can, but I'm starting to get to the point where I'm not sure I have much left I can optimize.

 

 

I said it before, space isn't an issue. I've got an entire 3 banks completely unused.

Edited by Master_Programmer
Link to comment
Share on other sites

Okay, new demo peeps!

 

In this, I fixed the sliding issue with Max...his movements are *much* more precise and controlled.

 

 

AND!!

 

After you beat the blue boss, boss #2, AkA Tora, you can play as her. Press the Select Switch to alternate between the two!

 

Tora Accelerates much faster, and jumps higher, but slides a bit, so be careful!

default3.bas.bin

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.

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

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...