PDA

View Full Version : Ripping Megaman tiles?



C-Dawg
05-25-2007, 01:27 PM
I believe Zelda Classic is now sufficently powerful to re-create early Megaman games pretty faithfully. The only complicated hurdle remaining would be getting more than one projectile weapon on the screen at once, and even that could be dealt with using a cumbersome script.

Anyone like Poete have any interest in ripping MM tiles (NES or SNES)? If so, I'll add scripts as I make them for Zodaic, and we can get a whole little Megaman toolbox set up for quest designers.

Gleeok
06-25-2007, 09:51 AM
Well i'm not petoe but is this what you had in mind?

http://www.mediafire.com/imgbnc.php/7227b94e54ab020a9b95b38797356fea4g.jpg

Coming soon: Snake man, Metal man, and Wood man!

C-Dawg
06-25-2007, 11:13 AM
Yea, that's pretty much it. If you want to rip all the tiles from every NES Megaman game (hahahaha), I'll help add some scripts and such to it. Maybe make a default enemy-selection screen and some robot master movement patterns, too. We'll get a whole megaman sandbox made.

Gleeok
06-25-2007, 11:53 AM
Finished Snake and Bubble man. Probably gonna steal *ahem* I mean borrow the enemy set from MMDWR and use that as a starting base. You think some custom Megaman weapon scripts are in order. The quick boomerang is mighty awesome. Is this plausible?

I'll edit this later with more screenshots as my hosting site isn't wanting to cooperate right now.

C-Dawg
06-25-2007, 12:49 PM
Yes. I'm now familiar with custom weapons, scripting some for Zodaic. It will be easy to make whatever sort of weapon you want fly out of the player when they push "B."

The only thing I have left to do is script a useful mock of enemies recieving damage when they come into contact with an FFC. Shouldn't be too difficult... if the enemy is too close, the weapon FFC animates or disappears, the enemy loses health, moves backwards depending on where it was hit, and it's CSET flashes for a moment. It's the flashing and moving back that will be a pain in the ass, because multiple enemies could be damaged at once, and we can't use arrays to keep track of them.

Next on the agenda for Zodiac are scripts for custom weapons that will emulate things like the Leaf Sheild, Metal Gear, and other MM2 style weapons. I'll have them by the time you finish ripping, I wager.

Petoe
06-25-2007, 01:27 PM
Well C, I'd help you if you would spell my name correctly... :P

...ok, just kidding. Your Zodiac quest is awesome and I'd love to help you with this MegaMan pack, but I have too much work to do with the unreleased Lost Isle + other real life issues at the moment... so all I can offer you is the MMDWR Tileset which can bee downloaded from PureZc Database. It has sidescrolling tiles for only 2 areas (A Forest and a Boomer Kuwanger kind of area) but that's better than nothing I hope.

Gleeok
06-25-2007, 01:28 PM
http://www.mediafire.com/imgbnc.php/15730286b42623a0e6fe70b0f54c7c934g.jpg

Well here's one finally. The clouds need minor retouching but everything else is coming along steadily. NES graphics are eaier than I thought to recolor.(when neccesary)

So heres the completed tiles thus far:
Bubble
Gemeni
Metal
Snake
more to come...

I'm thinking about 20 is a good amount, any more and there's too many potential weapons to be able to give to the player.

Metal-arrow as per mm#2
-leaf shield
-bubble ???
-gemini ???
-quick Brang- this is my favorite. Is it possible to fire multiple brangs at one time. How about adjusting the range in the item editor, then adding a global script to it? Sorry, but I know zilch about scripting.
-Crash-some kind of long range bombs maybe???
-Flame or heat
-Flash-some kind of temp clock effect?
-guts: bracelet perhaps.
-elec: wand?
-bomb man
-cut: maybe the lv1 version of quick.

Anyways, you got any suggestions?

C-Dawg
06-25-2007, 01:56 PM
All of the things you mentioned are possible. Quick Brang is quite doable. What you do is make an item script and an FFC script. The item script only "activates" the FFC. In the case of Quick Brang, you'd have six or so FFCs dedicated to the task. You'd keep the last fired Brang in a global variable, then load up the next FFC whenever the player fires. When activated, the FFC would move to the players location, move in a set pattern (out and back) and then go back into storage at -16,-16 or as an invisible FFC.

Like I said, the only trick is to get the enemies to react properly to being hit by the FFC. That's the only piece I'm still working on.

Oh, and as for crash bombs - yes, that's doable. It would be TONS simplier if we could spawn lit bombs. As is, it will require at least 14 FFCs to function properly.

C-Dawg
06-26-2007, 12:27 AM
Quick boomerang is done, basically. Load up this version of Zodiac (b356) and use the magic sword. The script is currently attached to it. The one part of the script that doesn't work quite right is making the enemy's Cset flash... and I should also add some sort of sound effect when it hits the enemy. Other than that, it's pretty much perfect.

http://users.sephiroth.ws/C-Dawg/zodiac.zip

The way it's set up, it's a short-range killer. Each individual boomerang isn't too strong, but the enemy has no period of invulnerability between them. So if you can get the enemy cornered and hammer them, they should be finished pretty quick. Also, it will pierce any enemy invulnerabilities.

Gleeok
06-26-2007, 01:17 AM
Update: finished Crash, flash, wood, and heat tiles. I'll be staying away from MM1 for the time being.

Also I believe I can combine all MM2 & 3 tiles into 6 c-sets. Don't quote me on that though. ;p



As for Zodiac:
-the good: Dude, that's awesome!
-the bad: it's a bit buggy.
-the ugly: you can see the sword sprite's and the sword beam shoots straight if you hold d-pad. Also using the cane?? can trap you inside the block. Also did you know you can double jump in mid-air? It's coming along nicely though. :D

C-Dawg
06-26-2007, 09:32 AM
-the good: Dude, that's awesome!


I know. Best part is, more weapons will be easier now because I can just modify this script instead of redoing from scratch.



-the bad: it's a bit buggy.


The quick boomerang? What problems are you having? The only issue I'm having is getting the FFCs to carry over predictably.



-the ugly: you can see the sword sprite's and the sword beam shoots straight if you hold d-pad.

Its attached to the Master Sword now. I tried to make a custom Sword level 5, but the item wouldn't even show up in my inventory. Not sure if its a bug or if I'm missing something... set it up identically to the other swords...



Also using the cane?? can trap you inside the block.

The Ice Beam you mean? Yea, you can trap yourself, but it melts in a minute anyway. So no big deal.



Also did you know you can double jump in mid-air?

Well, yea. In the version I posted the player starts with the Double-jump item.

Gleeok
06-26-2007, 11:53 AM
Update: Completed bubble, gemini, snake, clash,f lash, wood, shadow, metal, quick, heat, spark, and skull man stages. Megaman now has NES item and weapon sprites, and a few enemies.

Also the sword beam thing doesn't show up anymore but i'm still getting a HUGE amount of slowdown, basically making it unplayable. F1 doesn't seem to work either. Are you seeing this also? If not I might try a different build.

C-Dawg
06-26-2007, 12:00 PM
Are you running the latest beta? I'm not getting any slowdown on b356.

Plus, I havn't changed the upload file, so anything new you're seeing is... not new to the file. The sword beam was probably the Ice Beam script destructively reacting to the Boomerang script. I have no idea why, as they use different FFCs, but occasionally one of the boomerangs will get over-written by the ice block FFC. Very confusing, and I think it has to do with the Carryover flag.

Gleeok
06-26-2007, 12:04 PM
The thing is there is no b356 so i've been using newer ones. Do you mean 346?

C-Dawg
06-26-2007, 12:30 PM
Yea. I have no idea why there would be slowdown, though - they fixed the script slowdown bug a few versions ago, I thought. Works fine on my 2ghz machine.

C-Dawg
07-01-2007, 01:36 PM
More custom weapons here:
http://www.armageddongames.net/forums/showthread.php?t=97366

The wave beam could be used for ... hm... I dont remember any Robot Master with a wave-beam-like weapon. The Saber could be Sword Man, but you didn't rip him (for obvious reasons). I'm sure we can do something with them.

I've got the hang of custom weaponsmithing now. I should be able to crank out simple weapons (those that just involve a different power and path) in a few hours.

DarkFlameWolf
07-01-2007, 01:48 PM
Interesting...

Gleeok
07-04-2007, 02:29 AM
Sword man added to "to do list". Please keep the suggestion train coming. I will back from vacation next week, untill then I am working with dial-up...enough said. Also in the process of a painfull recoloring effort, progress is slow.
Forthcoming tiles:
Complete MM 1-5 2x2 boss tiles
MM 1&2 complete on 2 main pallete c-sets....uugh:shakeno:
Random c-set recoloring, intigration w/ random MMDWR misc.
enemy, item resizing....some more.
workable version pending.

Suggestions?



...oooh, Snake script! :naughty:

C-Dawg
07-04-2007, 10:58 AM
Snake script is on my list. A variation of the wall_flower script with an initial upwards arc affected by gravity before it latches on to something.

Sadly, I'll be gone on my honeymoon until a week from this Saturday so I won't get any more work done on that too soon.

Gleeok
07-13-2007, 09:15 PM
Congrats! and have fun ;)

Latest goodies:
Version 0.1 b461 http://www.mediafire.com/?fmybdxle4ae http://www.mediafire.com/?fmybdxle4ae
***-Warning- Subject to change without any reasonably reasonable reason!***

Recoloring mostly done.
Some tiles left out for organization
Working on MM 4-6 (best of) and Wiley tiles atm.

Pages 0-5 Megaman,NPC, Item, weapon, and enemy weapon sprites
Pages 6-39 enemy sprites
Pages 40+ Tiles.

DarkFlameWolf
07-13-2007, 10:24 PM
photobucket is better when hosting images. All I see are mediafire ads.

Also, would this help?
http://www.sprites-inc.co.uk/

C-Dawg
07-14-2007, 12:35 AM
Spread gun (contra) finished. Working on Search Snake style weapon next.

Gleeok
07-14-2007, 12:43 AM
photobucket is better when hosting images. All I see are mediafire ads.

Also, would this help?
http://www.sprites-inc.co.uk/

That's because it's a link to a qst file ;) , and yeah I have that site bookmarked. ;p But thanks anyway.

Also, I came across a bug where the boomerang had no limit of times fired on screen. Metal Saw!!! Anyway to reproduce that where it doesn't return. (Not much of a brang that way, but what the heck)

Did you have a good trip? Mine was great.

Gleeok
07-14-2007, 10:45 AM
Version 0.3 for 461 http://www.mediafire.com/?ftww02zzyix

it's getting there. All tiles for combos use c-set 0-4. enemies, sprites 5-9. Pallete and recoloring work almost complete. Dr Wiley complete tiles added.
Onto the enemies now. I'm in a dilemma as to what enemy the Gleeok should be...hmm...

Gleeok
11-09-2007, 08:44 AM
Well I went ahead and scripted leaf shield(which uses 4 ffc's..not quite done yet), and metal saw from MM2, as well as an optional teleport beam, and Gravity Well. Yep, Gravity well! It sucks in enemies within proximity and damages the shit out of them...and you think Aires Saber is overpowered. :D

Hopefully i'll have a working enemy sprite sheet done in a bit. And now that I know about ffc's and animating large ffc's, there should be plenty of variety.

Now where did I put my spare time at? ...I know it's around here somewhere...


EDIT: Triple post?! ..ouch. If anyone want's to merge them that's fine by me.

C-Dawg
11-09-2007, 09:42 AM
Are you coding these weapons in the same way I am? That is, FFC scripts running on FFCs 29, 30, 31?

We'll want to synthesize all weapons into a single easy-to-use script before we finish the toolbox. To that end, I'm going to be re-scripting my custom weapons to be more modular.

Take a look at my SHMUP enemy script. Notice how I can just keep adding enemies by adding two "if" statements? Thats what I'm going for with weapons. That way, you can add more just by sticking stuff into the code and not changing anything else.

If I have time, I'll set that up this weekend so you can just create code to dump into the weapon script.

Gleeok
11-11-2007, 08:09 AM
Are you coding these weapons in the same way I am? That is, FFC scripts running on FFCs 29, 30, 31?

We'll want to synthesize all weapons into a single easy-to-use script before we finish the toolbox. To that end, I'm going to be re-scripting my custom weapons to be more modular.

Well as a matter of fact, I am. Well ffc 25-29 to be exact, as the global weapon script I was working on ran into a few problems one could say. I still would like to get one scripted for the benefit of people that know squat about scripting, as it was designed to be really easy to use. Some global variables and item[D] variables, and that's really it. No messing with ffc's at all. I haven't given up though because I think the community needs one.

Bact to ffc's: Well I kinda broke the script into 3 sections, didn't change anything though, for example ;


//================================================== ======
// ITEM SCRIPT MAKANITO
// translation: deadly air
// It creates a vacuum that sucks in nearby enemies
// and can kill them instantly.
// At a high level this is probably the most powerful
// attack in the game. exp must be set accordingly.
// D0 - the CSet of the projectile
//================================================== =======


item script Makanito{

void run (int cset){

int deadly_air_combo = 10;
ffc deadly_air = Screen->LoadFFC(29);

if (makanito_level == 1){

Game->PlaySound(11);
makanito_exp++;

if(Link->Dir == 0) {
deadly_air->X = Link->X;
deadly_air->Y = Link->Y - 16;
deadly_air->Vy = -1;
deadly_air->Vx = 0;
deadly_air->Data = deadly_air_combo;
deadly_air->CSet = cset;
}
if(Link->Dir == 1) {
deadly_air->X = Link->X;
deadly_air->Y = Link->Y + 16;
deadly_air->Vy = 1;
deadly_air->Vx = 0;
deadly_air->Data = deadly_air_combo;
deadly_air->CSet = cset;
}
if(Link->Dir == 2) {
deadly_air->X = Link->X - 16;
deadly_air->Y = Link->Y;
deadly_air->Vx = -1;
deadly_air->Vy = 0;
deadly_air->Data = deadly_air_combo;
deadly_air->CSet = cset;
}
if(Link->Dir == 3) {
deadly_air->X = Link->X + 16;
deadly_air->Y = Link->Y;
deadly_air->Vx = 1;
deadly_air->Vy = 0;
deadly_air->Data = deadly_air_combo;
deadly_air->CSet = cset;
}
}
else{

if (makanito_level == 2){

Game->PlaySound(35);
makanito_exp++;

if(Link->Dir == 0) {
deadly_air->X = Link->X;
deadly_air->Y = Link->Y - 16;
deadly_air->Vy = -1;
deadly_air->Vx = 0;
deadly_air->Data = deadly_air_combo+1;
deadly_air->CSet = cset;
}
if(Link->Dir == 1) {
deadly_air->X = Link->X;
deadly_air->Y = Link->Y + 16;
deadly_air->Vy = 1;
deadly_air->Vx = 0;
deadly_air->Data = deadly_air_combo+1;
deadly_air->CSet = cset;
}
if(Link->Dir == 2) {
deadly_air->X = Link->X - 16;
deadly_air->Y = Link->Y;
deadly_air->Vx = -1;
deadly_air->Vy = 0;
deadly_air->Data = deadly_air_combo+1;
deadly_air->CSet = cset;
}
if(Link->Dir == 3) {
deadly_air->X = Link->X + 16;
deadly_air->Y = Link->Y;
deadly_air->Vx = 1;
deadly_air->Vy = 0;
deadly_air->Data = deadly_air_combo+1;
deadly_air->CSet = cset;
}
}
else{

if (makanito_level == 3){

Game->PlaySound(35);
makanito_exp++;

if(Link->Dir == 0) {
deadly_air->X = Link->X;
deadly_air->Y = Link->Y - 16;
deadly_air->Vy = -1;
deadly_air->Vx = 0;
deadly_air->Data = deadly_air_combo+2;
deadly_air->CSet = cset;
}
if(Link->Dir == 1) {
deadly_air->X = Link->X;
deadly_air->Y = Link->Y + 16;
deadly_air->Vy = 1;
deadly_air->Vx = 0;
deadly_air->Data = deadly_air_combo+2;
deadly_air->CSet = cset;
}
if(Link->Dir == 2) {
deadly_air->X = Link->X - 16;
deadly_air->Y = Link->Y;
deadly_air->Vx = -1;
deadly_air->Vy = 0;
deadly_air->Data = deadly_air_combo+2;
deadly_air->CSet = cset;
}
if(Link->Dir == 3) {
deadly_air->X = Link->X + 16;
deadly_air->Y = Link->Y;
deadly_air->Vx = 1;
deadly_air->Vy = 0;
deadly_air->Data = deadly_air_combo+2;
deadly_air->CSet = cset;
}
}
else{

if (makanito_level == 4){

Game->PlaySound(35);
makanito_exp++;

if(Link->Dir == 0) {
deadly_air->X = Link->X;
deadly_air->Y = Link->Y - 16;
deadly_air->Vy = -1;
deadly_air->Vx = 0;
deadly_air->Data = deadly_air_combo+3;
deadly_air->CSet = cset;
}
if(Link->Dir == 1) {
deadly_air->X = Link->X;
deadly_air->Y = Link->Y + 16;
deadly_air->Vy = 1;
deadly_air->Vx = 0;
deadly_air->Data = deadly_air_combo+3;
deadly_air->CSet = cset;
}
if(Link->Dir == 2) {
deadly_air->X = Link->X - 16;
deadly_air->Y = Link->Y;
deadly_air->Vx = -1;
deadly_air->Vy = 0;
deadly_air->Data = deadly_air_combo+3;
deadly_air->CSet = cset;
}
if(Link->Dir == 3) {
deadly_air->X = Link->X + 16;
deadly_air->Y = Link->Y;
deadly_air->Vx = 1;
deadly_air->Vy = 0;
deadly_air->Data = deadly_air_combo+3;
deadly_air->CSet = cset;
}


}}}} //end of else statements
}
}

And the jist of the general weapon part:


// =================================
// MAKANITO MOVEMENT
// =================================

if(this_ffc->Data == beam_animation_makanito){

damage = 1;

if ( (!(this_ffc->Data == beam_animation_makanito))||(this_ffc->X < 10) || (this_ffc->X > 230) || (this_ffc->Y > 150) || (this_ffc->Y < 10)){

this_ffc->Data = 1;
this_ffc->CSet = 0;
wobble = 0;
initialize = 0;
this_ffc->X = 16;
this_ffc->Y = 16;
}

}

else{

With this added inside the while(enemy->IsValid) part:



//================================================== ============================
// *MAKANITO VACUUM EFFECT*

if( ( (this_ffc->Data == beam_animation_makanito) || (this_ffc->Data == beam_animation_makanito+1) ||
(this_ffc->Data == beam_animation_makanito+2) || (this_ffc->Data == beam_animation_makanito+3) )
&& (Screen->ComboS[ComboAt(this_ffc->X+8, this_ffc->Y+8)] == 0) && !(current_enemy->Tile==0) ){


if((this_ffc->X > current_enemy->X) && (this_ffc->X < current_enemy->X+32)
&& (this_ffc->Y > current_enemy->Y-32) && (this_ffc->Y < current_enemy->Y+32)){current_enemy->X++;}

if((this_ffc->X < current_enemy->X) && (this_ffc->X > current_enemy->X-32)
&& (this_ffc->Y > current_enemy->Y-32) && (this_ffc->Y < current_enemy->Y+32)){current_enemy->X--;}

if((this_ffc->Y > current_enemy->Y) && (this_ffc->Y < current_enemy->Y+32)
&& (this_ffc->X > current_enemy->X-32) && (this_ffc->X < current_enemy->X+32)){current_enemy->Y++;}

if((this_ffc->Y < current_enemy->Y) && (this_ffc->Y > current_enemy->Y-32)
&& (this_ffc->X > current_enemy->X-32) && (this_ffc->X < current_enemy->X+32)){current_enemy->Y--;}
}
//================================================== =============================


And some variables, with the experience points handled mainly by the Global Script. As you can see though, they aren't nearly done yet, but I'll have some cool stuff to showcase soon enough. :)

Also, I can't believe no one's done this yet (maybe no ones thought of it...?) but people complain about inputR and inputL as running out of buttons to script stuff to. But what about multiple inputs? for example do you need jump AND slide to be different buttons in a side scroller? ...just an idea.



Take a look at my SHMUP enemy script. Notice how I can just keep adding enemies by adding two "if" statements? Thats what I'm going for with weapons. That way, you can add more just by sticking stuff into the code and not changing anything else.

If I have time, I'll set that up this weekend so you can just create code to dump into the weapon script.


Isn't it set up kinda like that already? :shrug:

I fixed the pallete distopia(finally) enabling me to add enemies at last. Got a bunch of weapons rolling...enough for a demo at some point, more recoloring ect.. It's actually very easy to use now. :) With 3 csets to spare (5, 10, and 11.) 10 and 11 is actually 0 and 1, but with a purple for ripping ease. enough rambling though.

Thoughts? MegaMan_Tileset_ver0.5_b584 (http://www.mediafire.com/?7xqzxkdz2jn)


Edit: Well that versions almost obsolete now, I worked on it a bit more. :) I would like to add a scripting base to it though, something simple, just some weapon stuff. A few to start with, nothing crazy. Maybe megashooter, metal blade, and work from that. The roc's feather will work for the time being. You mentioned a slightly moded version of GW, so I'll wait for that. Also I was thinking to add a [D] variable so the enemy cset flashing and knockback is disabled by default unless specified by the author.

Oh, and started comboing...Wow, it's so easy to make screens for these sidescrollers, a demo and working tileset is not that far off. ...also added weapon/item sprites from gba and snes games, for forwards compat, should anyone want to add updated tiles...right now i'm pleased with the way the NES graphics actually look. Wasn't too sure untill I started actually using them.

C-Dawg
11-26-2007, 09:36 PM
Yep, sidescrolling screens are easier to make because they don't require floor tiles and doodads everywhere. But they require more scripting since you need to account for gravity with most of your entities.

By the way - it's not "mega shooter." It's the arm cannon, or Mega Buster in later games. Arm cannon is exceedingly simple - just use my ship cannon and let it fire in four directions. Should be easy to let the player upgrade to Mega Buster (charged shots, maybe re-work the Cancer Charge to make it more like megaman) or the Bass Buster (eight directions).

I finished the Leo Lazer (stupidly overpowered against bosses that don't simulate flashing invulnerability, since it hits repeatedly for 8 damage a tic across the whole screen). Only five more custom weapons to go before I'm done with the Zodiac weapons. We can then get to work synthesizing my scripts with yours. That should give the designer about, what, 16 or so weapons to assign to robot masters?

We should probably next work on a weapon select system. Arm cannon can be default A weapon, and B weapon should be the custom weapons aquired from bosses. That way the player can use the normal subscreen to select a weapon, but we don't have to worry about two scripts competing for the same FFCs.

A demo is probably a long way off. We'll still need scripts that:

(1) Give each weapon their own ammunition (global variables that get loaded into the magic bar when a particular weapon is fired and before magic is checked, perhaps)

(2) Set up a global or ffc script to handle sidescrolling and L-button jumping

(3) The standard megaman boss selection screen

and MOST importantly

(4) modular robot master scripts that don't require the designer to do any scripting to customize their robot masters.

C-Dawg
11-30-2007, 10:57 AM
Taurus Flame (easily used for Air Cannon) and Virgo Whip (sort of Castlevania-ish) are now complete.

Just two more weapons to do, I think - Sagittarius and Capricorn.

Gleeok
12-02-2007, 02:19 AM
Sweet work with the new weapons btw. Also!, What do you think about 6! ffc weapon scripts active! (!)

-ffc's 31,30,29- for Mega cannon(charge shot ffc 32...hmm, how do you set your's up again?). 28,27,26,25 for all other weapons. Although it would be extremely rare that all 8(7) would be used at any time. This way you could have A + B weapons at once. And the way I'm doing ffc weapons now pretty much eliminates most of the slowdown that you get. ....so long as there is less than 100 enemies on screen at once.....maybe 25 with 7ffc's.....hrm.


And also... Because of the non buggy and awesomely implemented:


int TileWidth
* The number of tile columns composing the FFC.

int TileHeight
* The number of tile rows composing the FFC.

int EffectWidth
* The width of the area of effect of the combo associated with the FFC,
* in pixels.

int EffectHeight
* The height of the area of effect of the combo associated with the FFC,
* in pixels.

A 2x2 charge shot. with other weapons using these, along with bosses, etc.

Large enemies and bosses only need to be 1 ffc. Did you know the Giant crab boss is only 5 ffc's?


Anyhoo, I scripted some turret firing scripts, that fire ffc's directly at link, along with working on utility ffc projectile scripts that allow you to set any kind of effect to projectiles by adding it to the slot the first ffc uses as projectiles. (homing, spread shot, fork shot, wrap-around shot, etc) These activate once the ffc velocity is greater than 0, or if this->Data is greater than 8. Although I STILL need help with the circular shot. (as seen in dr.Wiley fight in mm3.

Here's one of many failed attempts. Yes, I admit, I suck at Geometry. :p


ffc script ffc_wobble2{

void run(){

int wobble = 0;

while(true){


if(this->Y > 168||this->Y < 0||this->X > 248||this->X < 0){
this->X = 0; this->Y = 0; this->Vx = 0; this->Vy = 0;
this->Data = 1;
}
if(this->Vx != 0 || this->Vy != 0){

int x = this->Vx; int y = this->Vy;

this->Vx = x *Sin(wobble);
this->Vy = y *Cos(wobble);

wobble++;
}
Waitframe();
}
}
}

Can you fix it doctor?

C-Dawg
12-02-2007, 02:54 AM
Wily's weapon, if I'm thinking of the right one, is just a set of two or three energy balls that moves in an orbit around the shot point in a steadily increasing radius.

So the fundamental part of the code is just:

this->X = counter * Sin(wobble);
this->Y = counter * Cos(wobble);

counter++;
wobble++;

There's a few things wrong with your code:

1. Adjusting Vx and Vy with Sin and Cos is tricky. You won't necessarily get a circle if you do that; you'll get an osillating shape of some sort. Remember, sin and cos are periodic functions that go back and forth between -1 and 1 as the variable (wobble, here) increases. So if you want a circle, adjust X and Y directly.

2. I don't follow your logic in multiplying Vx by the previous Vx each time. Doesn't that lead to an exponentially increasing speed if Vx is greater than 1, and a exponentially decaying speed if Vx is less than 1?

Gleeok
12-02-2007, 08:38 AM
Well it needs to move along it's original velocity from the point it is shot at while moving in a circular pattern. It's not like I didn't try X before Vx with these. And yeah, this is the one that got a super fast giant circle that would wrap around the screen. heh.
So if I am reading that right, your suggesting an initial "counter" of this->X, and this->Y, before moving on to the sin and cos bit..? ..hmmm..I think that's what you mean, otherwise wouldn't it start from the top left corner?


Something like this?
...Heh, now I gotta go test it.



ffc script ffc_wobble2{

void run(){

int wobble = 0;
bool init = false;

while(true){


if(this->Y > 152||this->Y < 8||this->X > 232||this->X < 8){
this->X = 0; this->Y = 0; this->Vx = 0; this->Vy = 0;
this->Data = 1; init = false;
}
if(this->Vx != 0 || this->Vy != 0){

if(init == false){
int tx = this->X; int ty = this->Y; init = true;
}
else{
this->X = tx *Sin(wobble);
this->Y = ty *Cos(wobble);

wobble++; tx++; ty++;}
}
Waitframe();
}
}
}


Oh, I finished a ffc script that simulates Quick man's boomerang attack, which is oddly named ...auto_fork. :odd:

It lets the projectile go about it's business, stops it for a second, then look out from above.


for example: auto_fork combined with spread_shot would rain down 3x the normal projectiles at steady intervals.

I think you're right about making things more modular. You can use the same scripts to customize them in a shitload of ways.

C-Dawg
12-02-2007, 12:32 PM
Well it needs to move along it's original velocity from the point it is shot at while moving in a circular pattern.


I still don't follow. The projectile comes out of the enemy at, say, x1, y1. It starts moving away from the enemy and clockwise or counterclockwise. In other words, all it is doing is moving in a circle of steadily increasing radius. Perhaps my use of the term "counter" was misleading. The code I provided wasn't just set up code. It should handle the entire movement. Radius keeps increasing with each tic, thats all. If you have multiple projectiles, they each start with their own "wobble" variable at regular intervals around 360 degrees.


I think you're right about making things more modular. You can use the same scripts to customize them in a shitload of ways.

Yea. We need to set it up so that the player doesn't have to do anything but assingn scripts to FFC slots, and the scripts are by and large able to interact intelligently. So the designer doesn't have to script if they dont want.

Gleeok
12-06-2007, 03:20 PM
Okay. hrm, I'm still stumped. I think we're thinking of 2 different things. I'll try to explain better.



------------->

^^projectile being shot at Vx = 1.

Now from here you can add utility scripts with no extra setup to the ffc slot used by the projectile (btw I finished ffc_bounce...[bounces the projectile off walls]) :) -So what im thinking of would be a circular rotation of a set radius that follows the original path of the projectile (in this case Vx = 1) where it moves across the screen in a circle. Kinda like scorpio sting item...that's doable, right?

C-Dawg
12-06-2007, 04:24 PM
Oh, I see what you want. A "rolling" shot like the fire weapon in Contra 1.

Your problem is the equation of a circle.

x = a1 + b1*Cos(c1*t);
y = a2 + b2*Sin(c2*t);

(a1, a2) = the center of the circle
(b1, b2) = the radius of the circle (will be elipse or other shape if b1 does not equal b2)
(c1, c2) = the speed of the object's movement around the circle as t changes (will not trace the same orbit each time around if c1 does not equal c2)

In the code you posted, you're only changing the radius of the circle, not where it is centered. Yours is centered at (0,0) which is probably what is giving you a headache.

Gleeok
12-06-2007, 06:51 PM
So how can you point to exact center of the circle if it is moving at an unknown rate from an unknown point of origin?

Well...i'm stuck on the logic that "a" wound be this->location and would not be good to use that because its always adding + ellipse. which would fuck it up.

Did I mention I hate trig and geometry. :p

C-Dawg
12-07-2007, 09:01 PM
So how can you point to exact center of the circle if it is moving at an unknown rate from an unknown point of origin?

Well...i'm stuck on the logic that "a" wound be this->location and would not be good to use that because its always adding + ellipse. which would fuck it up.

Did I mention I hate trig and geometry. :p

The concept is easy to grasp with two FFCs.

FFC #1 moves according to Vx and Vy in a straight line.
FFC #2 moves in a circle centered around FFC#1. (That is, a1 and a2 are equal to FFC#1->X and FFC#2->Y, respectively).

With me so far?

You can get rid of FFC#1 by making variables that will act just like FFC#1->Vx, Vy, X, and Y. Name them orbit_hub_Vx, orbit_hub_Vy, or whatever.

So each iteration through your weapon's loop (each frame), orbit_hub_X increases (or decreases) with the value in orbit_hub_Vx. Then the orbiting FFC (called FFC#2 above) is set to move in a circle centered on the new orbit_hub_X and Y.

Get it?

Gleeok
12-08-2007, 03:28 PM
Oh, I see now. It's still not perfect due to the fact that there are a billion different combinations of Vx, an Vy. and orbit_hub increasing or decreasing its X, or Y position every 2-5(?) frames would be hard pressed to match Vx and Vy of an actual ffc without some crazy ass complicated math formula.
...Well, I should ask anyway. Is there a simple(haha) routine to crunch numbers?

...ugh, i've got a headache already just thinking about it. ;P

C-Dawg
12-09-2007, 12:13 PM
Oh, I see now. It's still not perfect due to the fact that there are a billion different combinations of Vx, an Vy. and orbit_hub increasing or decreasing its X, or Y position every 2-5(?) frames would be hard pressed to match Vx and Vy of an actual ffc without some crazy ass complicated math formula.
...Well, I should ask anyway. Is there a simple(haha) routine to crunch numbers?

...ugh, i've got a headache already just thinking about it. ;P

What? Why? Vx and Vy do nothing but change X and Y each frame. Very simple to simulate. What's the problem?

Gleeok
12-09-2007, 02:25 PM
Wait, so ffc X and Y can return decimal places!? ...If that's true then should be easy to do. I hope it does anyway. ...lets see

....



ffc script ffc_wobble2{

void run(int radiusX, int radiusY, int speed){

if(radiusX == 0){radiusX = 16;}
if(radiusY == 0){radiusY = 16;}

if(speed == 0){speed = 4;}

int wobble = 0;
bool init = false;
int tx; int ty;
int tvx; int tvy;

while(true){


if(this->Y > 168||this->Y < 0||this->X > 248||this->X < 0){
this->X = 0; this->Y = 0; this->Vx = 0; this->Vy = 0;
this->Data = 1; init = false;
}
if(this->Vx != 0 || this->Vy != 0){

if(init == false){
tx = this->X; ty = this->Y;
tvx = this->Vx; tvy = this->Vy;
init = true;
}
else{

this->X = tx + radiusX*Cos(speed*wobble);
this->Y = ty + radiusY*Sin(speed*wobble);

wobble++; tx += tvx; ty += tvy;
}
}
Waitframe();
}
}
}


I am hereby putting you in charge of the orbiting weapons division at Wily corp.

-also finished setting up more tile animation and combo cycling, and more large ffc's.
-updated the item sprites(there should now be plenty for any kind of weapon)
-added more enemies
-and random coloring and tile fixes.
-other random stuff

C-Dawg
12-09-2007, 02:42 PM
To the best of my knowledge, yes, FFC->X and FFC->Y can return decimal values. How else could an FFC move at rates like Vx = 0.5 each tic?

I'll change the Taurus Flame weapon to move at an upward angle but also in tight little circles. You'll see the code there.

Gleeok
12-31-2007, 01:08 AM
So I've recruted someone to help with the set. Joe123 has the file right now, and the next thing i'll probably do later on is finally add the ffc->Data and some scripts. Also I figured, hey, why not make a megaman game as the stuff gets added to it. Seems reasonable to me.

Gleeok
04-18-2008, 07:37 PM
MegaMan_Tileset_ver5.4.zip (http://www.geocities.com/arpeggiodragon9/MegaMan_Tileset_ver5.4.zip) -Right click, save as. Don't worry, no more Mediafire, It's become really shitty lately so I stopped using it.

Now for the question on palettes:

Joe thinks the level palettes suck balls. I only half agree here, because all the colors fit in to cset 2,3,4 making it really quick and easy to make screens. If these were to be completely redone how should the end result look? If I do in fact redo all the tiles they will most likely be in a 8-bit level palette so as to be of the same structure as SNES MM tiles. (snes tiles not added yet)

What does anyone think needs to be fixed with csets 2,3,4?