News:

Don't forget to visit the main site! There's lots of helpful docs, patches, and more!

Main Menu

[SM] Mixing Spazer and Plasma [997‰ IS done]

Started by JAM, July 14, 2010, 04:43:04 PM

Previous topic - Next topic

JAM

I want to learn. I want to make. At least I want to try...

Quote from Ideas topic.
Quote from: Black Falcon on March 28, 2010, 07:47:03 AM
Here are things I found out while glimpsing through the beam code:
Beams need behaviour, x and y speed, damage pointers, x and y radius, initialisation asm code, running asm code and maybe trails.
In addition to this you'd have to code this stuffz for each of the 8 accelerating directions.
The graphics can be done at the end but they also need pointers to their graphics + new sprite codes to use this gfx + new palette pointers.
Believe me, this still sounds easier than it is actually!
Where is the beam code located? I mean, code for behavior, damage etc.

EDIT: Version 0.997 is permastuck-free. No more awful bugs, just small graphics errors still there. But it as most complete as it can be ATM. Download and apply. You'll need to use SMILE RF or JX to alter vulnerabilities properly.

EDIT 2: Beam Fusion item is added to allow Samus to mix the beams only if collected.

Parabox

YES! YES! THIS IS DELICIOUS!

Finally someone who actually is going to attempt this! Good luck, brave warrior!

JAM

#2
Quote from: DekuKnight on July 14, 2010, 07:18:16 PM
Finally someone who actually is going to attempt this! Good luck, brave warrior!
Thanks, I need it =)

Well, after several days of researching I've nocited that it's not so hard as I thought before... All I need to do is relocate and expand several arrays. I will store my progress here. When the work will be done, I'll post a guide how to do it.

Day 1

Fly, my little babies, fly! (Spazer+Plasma shot, colors are fixed)


Day 2

I've revealed your true form (Spazer+Plasma)


Day 3

Time to charge (Charged Wave+Spazer+Plasma)


Day 4

I have a really long... beam (playing with size)

squishy_ichigo

Good job there Jam! Always nice to see people messing with the code.

It reminds me I have stuff I need to code... v.v;

Black Falcon

I have to say I'm impressed :yay: .
Of course I also tried to do this but I had no luck, so I stopped working on this.
The sprite setups are easy to edit and to repoint, but I think (and am quite certain) that there's a physical and a graphical beam size as you may have already noticed.
I said beams would need initialisation and running ASM code, but I'm not sure about this anymore.
I know enemy projectiles have the mentioned asm, that's why I thought beams could have that, too.
It seems that I made things more complicated than they actually were...



Smiley

Haha, Spasma or Plazer beam. Maybe Plazmer? :lol:
I hope you finish this. Good luck.

Lunaria

I must say that I'm looking forward to being able to use this in my future hacks... let's hope jathys adds this hack as well as SMILE support for the new beam in future versions of SMILE.

Regardless, good job with this, now we can mix all beams! >:3

Borderjumper67


JAM

#8
Quote from: squishy_ichigo on July 21, 2010, 10:48:21 AM
Good job there Jam! Always nice to see people messing with the code.
Thanks =) Although, I guess, Kej and Jathys made this a long ago in their hacks.

Quote from: Crys on July 21, 2010, 11:09:31 AM
I must say that I'm looking forward to being able to use this in my future hacks... let's hope jathys adds this hack as well as SMILE support for the new beam in future versions of SMILE.

Regardless, good job with this, now we can mix all beams! >:3
I hope, that there'll be a future versions. Jathys wasn't came here a long time ago.

Anyway, I'll try to do my best.

Quote from: Black Falcon on July 21, 2010, 11:02:59 AM
The sprite setups are easy to edit and to repoint, but I think (and am quite certain) that there's a physical and a graphical beam size as you may have already noticed.
Yup, that's true. Psysical beam X and Y radius can be altered easily. It's just a numbers. Changing how the beam looks like is more difficult. Sprite code (not ASM one) should be altered but the format is the same as title screen logo has:
(length),
(bunch of bytes*5*length)


Quote from: Black Falcon on July 21, 2010, 11:02:59 AM
I said beams would need initialisation and running ASM code
Yes, but the codes are very similar. Spazer+Wave and Plasma+Wave are using the same code (fly and change width), as well as Wave and Ice+Wave (fly using wave pattern). All beams without wave (including charged) are using the third one (just fly in shot direction).

And there is an ASM pointer array, the root of all evil, which causing the game to crash when you shot Spazer+Plasma. Just exapanding it allows to shot Spazer+Plasma in wrong graphics, wrong colors, with wrong sounds etc.

Quote from: Black Falcon on July 21, 2010, 11:02:59 AM
It seems that I made things more complicated than they actually were...
There is a code of shooting (how beam should fly off the cannon), but it's a sprite code, not an ASM code. And because of that it's not so hard, it's just... long. 85% of bank $93 or so is a sprite code...

When the beam is shot, draw instruction is called.

For plasma beam:
draw 1 tile of beam, set actual X and Y radius, (something else), delay,
draw 2 tiles of beam, set actual X and Y radius (increase), (something else), delay,
draw 3 tiles of beam, set actual X and Y radius (increase), (something else), delay,
fly: draw 4 tiles of beam, set actual X and Y radius (full beam), (something else), delay, call another instruction, jump at mark "fly".



Quote from: SMILEuser96 on July 21, 2010, 11:05:46 AM
Haha, Spasma or Plazer beam. Maybe Plazmer? :lol:
I hope you finish this. Good luck.
How about a "Beam Fusion" upgrade? ;-)
When on, Spazer + Plasma fusion is available, when off, disabled by default. Not hard to do, when a coding will be done.











Something I've found a long ago. Collect beam with value 0010. Enable Plasma, fire up and you'll get...

A laser beam. Don't sure what is it. It's kinda buggy. Only vertical shots looks good, and any others -- segmented.

This beam hasn't practical use, just idea to create red laser beam.


If select wave and fire:

Double Beam
Wave Beam is acting like charged Wave Beam.




Research is continued:


Advanced Hyper Beam.

Sprite coding takes about 1.5 hours. Only available flight direction is right. Charged Plasma beam affected. It's only flying state. To make a firing state I'll need days and about 10000 free bytes.

Well, there are a lot of space to draw graphics, so in future it way looks like in one piece if I somehow decide how to use second bank for sprite coding.

Alright, what is left:
•trails for iced shots
•sound effects
•sprite coding (not hard, but long)
•maybe something else...

begrimed

These edits excite me. Especially the 'double beam.'

Can't wait for you to lay everything open, JAM. Been wanting to tinker with beams for awhile.

JAM

[spoiler=Bad news everyone.]

Now I understand why these beams wasn't mixed. Not because they were lazy (that's not true). Not because of coming release date. It's happened due to the lack of free space in bank $94. There isn't enough space to encode every move of mixed Wave + Spazer + Plasma beam.
[/spoiler]

[spoiler=Good news everyone.]
I know a little trick of how to compress data a bit. It helps to finish the job.
[/spoiler]

And the progress is going.

Finished Spazer + Plasma shot. Only in vertical direction for now.

wickedclown

@JAM - Are you still working on this? I would love to see it done. It would be a great addition to Super Metroid. I really hope you finish this. If so or if not can you let us know. Thanks JAM love your work!

JAM

I will not abandon this patch, I just working on multiple patches at the same time. I will release this one right after it will be done, soon or later.


Recent news:
I spent 2 weeks trying to fix the graphic offset bug (you know, if you shoot one beam, quickly press start and change beam combination, it cause already fired beams to change their graphics to the current beam combination), but unsuccessful.


Should be Charged Plasma...

What I got by now:

Unused beam found. Was in beta. It may be Charged Wave + Plasma shot or regular one.


Changing beam graphics. Instead or Ice + Wave + Spazer I've got multipled frozen power shots.


Beta value for charging beams is used by cheat codes.


Now I'm returning to the sprite coding.


Progress

Actual sprite coding:
non-charged beams   100%
charged beams      13%

Size and position coding:
non-chagred beams   0..100%*
charged beams      0%

*
if I can use Charged Spazer for uncharged Spazer + Plasma, I'll do it. Still trying...


What is left for new beam combinations except sprite coding:
•program staring speed
•make trails when needed

wickedclown

Awesome glade to hear your still working on it. Can't wait to see it done. Great job JAM take your time and keep up the great work.

JAM

#14
Current progress

Actual sprite coding:
non-charged beams   100%
charged beams      50%

Size and position coding:
non-chagred beams   100%
charged beams      0%

Trails: 0%

And I've accidently done this:


Also, another bug was discovered and fixed. If you select Power Bomb and charge any combination with Spazer and Plasma, the game will crash. No longer for now.



UPDATE 20.09.2010

Current progress

Actual sprite coding:
non-charged beams   100%
charged beams      75%

Size and position coding:
non-chagred beams   100%
charged beams      0%

Trails: 0%
Fixing assymetry: 0%
Fixing indirect addressing (for saving space): 0%

Starting speed fix: 0%



And this is how this baby will looks like:

Have you noticed assymetry? This need to be fixed too

wickedclown

That look beautiful! Keep on going with the hard work. Every Update just looks better and better. Great Job JAM!

JAM

wickedclown
Thanks for support! Sorry, I have nothing to show right now, but the progress is going. I have done several data shifts. After coding of new beam combo I had $80 free bytes in one place and $13 free bytes in another place, but I need ~$90 bytes. So, I had to shift about $400 bytes due to the lack of free space. Several times.


Current progress

Actual sprite coding:
non-charged beams   100%
charged beams      90%

Size and position coding:
non-chagred beams   100%
charged beams      0%

Trails: 0%
Fixing assymetry: 50%
Fixing indirect addressing (for saving space): 66.(6)%

Starting speed fix: 0%


Shifting data #1: 100%
Shifting data #2: 100%
Undo of shifting data #2: 100%
Shifting data #3: 100%
Undo of shifting data #3: 100%
Shifting data #4: 100%
Shifting data #5: 0%

wickedclown

Have not look at this site in a littel while. Been on the AM2R Forums. But anyway I checked to see if you had any updates on this. So how is this going? I just can't help but wonder I just can't wait for this to be done. Any kind of update be nice even if you have no pics.

JAM

Alright. This is what has been changed since last update:

Actual sprite coding:
charged beams      100%
shooting part      60%

Fixing asymmetry: 75%
Fixing indirect addressing (for saving space): 100%

Shifting data #5: 100%

Repointing new data: 0%

In words, fixing asymmetry for diagonally fired beams is much harder than for horizonal or vertical directions, so it takes more strength and time.

Also, I wanted to use Plasma + Wave pattern in shooting sequence of Spazer + Plasma only, but now I think I can free up enough space to make Spazer + Plasma shot (charged and not) spread with constant speed until max width is reached. After that, fired shot will fly with maximum width and will not change it like normal Spazer shot. As for Wave + Spazer + Plasma shot, it's width will be changed constantly, like Wave + Spazer shot.

Again, unused parts of sprite codes have been found and can be used to do what I want for Spazer + Plasma without Wave

wickedclown

Glade to here things are coming along Keep up the great work!

JAM

#20
I've got a new problem.

Direct sprite coding instead of indirect one causes this bug in any room with liquid and this bug stays until reloading the game from save point.

Shit, everytime when I'm saying that everything will be fine and I've just done task A and task B and need to do tasks C and D, I'm getting new unexpecting difficulties and I have to undo task A and do task E instead. They say, if you want to make God laugh, tell him about your plans. So, I'll better shut up and lock this topic until 99% will be done.

Don't worry, I will not abandon this project and will go to it. If I can't do it at all, I will write about it. If this topic is locked it means WIP.

JAM

#21
Bump! It takes forever and ever and ever ... and one day. Thank God! And it's not even completly done!

Here are the news:
03.08.2011   Version 0.980 is done. Finally.

Changes since 0.970:


Data repointing #6100%
Data repointing #7100%
Data repointing #8100%
Data repointing #9100%
Data repointing #10100%
Data repointing #11100%
Data repointing #12100%
Data repointing #13100%
Data repointing #14 (you just have no idea...)100%
Data compressing #1 (dwarf star type)100%
Data compressing #2 (neutron star type)100%
Unused sprite code removing100%
Unused ASM code removing100%
Width of Spazer beam fixing100%
Assymetry of Plasma beam fixing100%
Assymetry of diagonal Spazer beams fixing100%
Diagonal Plasma shots tiling errors fixing100%
Diagonal uncharged Spazer tile centered100%
Vertical uncharged Plasma tile centered100%
Tilemaps for Spazer and Plasma mix100%
Damage for new combinations definition100%
Repointing arrays in bank $90  90%
Size and position coding    0%

07.08.2011   Version 0.990 is done.
Changes since 0.980:

Repointing arrays in bank $90100%
Size and position coding for new combinations100%
Spazer and Plasma mixing allowing in the menu100%
Spazer and Plasma mixing allowing when collecting beams100%

Coming in version 1.0:
Size and position fixing for all beams
Vulnerabilities array extension
Trails support

Useless statistics:

Built timeover 300 hours
Project time1 year
Rewritten data sizeover $3000 bytes

Dedicated to the anniversity of Metroid!
Release date: 08.08.2011

Public release of version 0.990. Well, I tried to finish the patch completly before August 6th. When I've noticed that I'm late with this, I was thinking of sending a patch to a few testers. But later I've realised that I'm late with this too. So here is the deal. Let everyone be testers!

This version is special. Although, there are few arrays of data repointed and extended, there wasn't ASM using at all (well, almost. If not count adding NOPs to 2 subroutines)! Just few address were changes and hex and data was manually shifted. I count this as hex tweaking rather than coding. I did it to prove that it isn't nessesary to be an ASM wizard to make wonders. As for the beams itself, it's a sprite coding and can be easily done in hex. Although, it was done specially to reduce patch file size as great as possible.

Anyway, free space used:
87EC0..87FFF
9F61D..9F8B7

Damage array for the beams:

...
Ice + Wave + Plasma  300
Spazer + Plasma  350
Ice + Spazer + Plasma  400
Wave + Spazer + Plasma  450
Ice + Wave + Spazer + Plasma  500
...
Charge + Ice + Wave + Plasma  900
Charge + Spazer + Plasma1050
Charge + Ice + Spazer + Plasma1200
Charge + Wave + Spazer + Plasma1350
Charge + Ice + Wave + Spazer + Plasma   1500
Hyper Beam2000

A few screenies. More will be later.





P.S. It was tested over and over, but if you find any bugs, please let me know.

P.P.S. Please give credit.

X-tradyte

I have found glitch/bug, I beat Kraid, in one shot(charged) and then when I walked into him, it froze the game. Fixable?

Crashtour99

Damn, this thing is like screw attack in beam form!  Very powerful.
Kraid took 2 charged shots for me, Crocomire 1, Phantoon 2, Botwoon 3.
It's interesting too how it kills enemies that normally only super missiles could kill (like Hand or Ripper).
Seems like it doesn't like bosses too much though.
This happened after beating Draygon (only took about 4 charged shots).
[spoiler][/spoiler]
It returns to normal once you leave his room though.
My guess is that it has something to do with the special background sprite layering used by certain bosses, since it works perfectly normal the rest of the time.

personitis

#24
Cool patch. Then I ran across a rather interesting glitch that brings you to a "Keep playing?" screen (or something of the like). I'll update this post with more information when I have the time in like an hour or two. So I'm not going anywhere any time soon it appears.

Video of the effects

Basically, what happened was I did something, or at least I suppose, then pressed start soon after. That brought me to a "Keep playing?" screen in which my options were "No" and "Continue." I hit continue and you can see the immediate after-effects of it. Also on the "Keep playing" screen, the HUD changed. My Missiles and Supers changed to a redish-orangish background color and were slanted. That was the most notable. I also ended up somehow triggering the glitch a second time but without all the background mess and only with the enemy deaths. Traveled down to Brinstar on the second happening and the enemy death gfx stayed messed up.

I'll update as I find things. This isn't really big, but if someone runs across it, there could be some graphical problems to ensue.