Mega-man-ish style blocks (simple) 4.1.5 platformer

mouse spirit

Well-known member
I worked really hard at this so i hope you enjoy it.
I made 2 Tiles that work together with a monster to create those blocks that disappear and reappear in mega man games.
So far it only works for one brick per screen as they would all conflict with eachother and the variable unless you wanted all bricks to disappear and reappear at the same time,until i figure more out. It would be possible to use all 4 monsters but the tiles code may be 4 times the size and would use 4 variables and (ha)8 tiles. I will look into a more efficient way.
Possibly by not using a variable and just using tile_solidity?

I will say that this is all a workaround and probly how nobody did it back in the day.

The first gif shows the reality of it. The 2nd gif shows how it looks when using a transparent animation on Action steps 2 and 3 for the monster in this tutorial.

solid22222.gif
solid monster tiles.gif
As you can see above, i got stuck in the block. I did try to use onewayblock instead of solid but i dont know why it didnt work(my onewaytile is tile 09 and i tried it but who knows.Just dont put it near the ground to avoid that.


4 brick example with this tutorial simply using 4 monsters that are the same and apply the collision data to the screen appropriately.
4 bricks 1 screen.gif

Heres using 1 monster, graphically not correct though.
solid 44.gif


1. Create a user variable, mine was solidcheckblock in project settings.Give it a value of 0.

2.So like i said its 2 tiles.

Tile1asm
Code:
LDA solidcheckblock,x
STA tile_solidity
BNE backtonormal

LDA Object_type,x
CMP #$33 ;;mine is 33, your monsters id goes here
BNE backtonormal
LDA #$01;;solid
STA solidcheckblock

backtonormal:

LDA solidcheckblock,x
STA tile_solidity

Tile2asm
Code:
LDA Object_type,x
CMP #$33 ;;mine is 33, your monsters id goes here
BNE +
LDA #$00;; not solid
STA solidcheckblock
+

3.Now create a monster.Mine is actually a monster weapon.
We will make it 4 bricks in area(2 width by 2 height)
Make a block graphic for it.

4.Make sure no player collision,no hurt recoil, ignore gravity, and ignore solid collisions flags are checked in the monsters actions.

We will use 3 of the monsters actions.
Action 1 we set to stop movement,timer 15, endaction Advance.
adfbhabfda.png
Action 2 move left,timer 5, endaction Advance.

Action 3 move right,timer 5, endaction Go To First.

In details set the speed to 20, but most important set the acceleration to 255(so with the timers we set, the block will move consistently. And we keep the speed kinda slow because even though the timers are the same, its not consistent in nesmaker?).
asdfasfgasf.png
Set its bounding box,i made a tiny one in the middle of the monster.

5.Now we use tile 1 wear we want the solid block to appear. We place the monster on top of that tile.
Now we put tile 2 on the left side of tile1 and the monster.
redgerg.png
I also put them above and below and to the right because i was trying different things. My tiles are set up as the 05 and 06 tiles.

6.Now when the monster is on tile 1,it will be solid. When the monster hits tile2 when it moves, that middle tile becomes unsolid. And then the process starts again.


Thats it. I hope. Please give me feedback if you try this out as this tutorial may have mistakes.
Feel free to correct me and or explain why where i have #$01 its working but i cant put #$09 for my onewaytile.

The reason mine is a monster weapon is because i had trouble using a monster with immune to weapon and a sound would persist and break the game and i dint want to be able to hit the block. So maybe make it a monster weapon instead of a monster.

So heres what else i did. Used 2 tiles and 1 monster.I did not use an extra variable.. Its not consistent but could be tweaked, as it is switching abunch when the monster goes by, but going faster is not a good option. Imagine getting creative here like with a room of bricks and a monster that flies 8 ways constantly!
I will share the codes for this im just working on them right now,tryin to make it better.

This one is pretty much like a breakable block code
tile1asm
Code:
LDA Object_flags,x
CMP #% 00001000;;monster type;;00010000 for monster weapon
BNE+
ChangeTileAtCollision #$06, #$04;;my tile 6 and my graphic 4
LDA #TILE_SOLID
STA tile_solidity
+

tile2asm

Code:
LDA #TILE_SOLID
STA tile_solidity
LDA Object_flags,x
CMP #% 00001000;;monster type;;00010000 for monster weapon
BNE+
ChangeTileAtCollision #$05, #$00;;my tile 5 and my graphic 0

+

Basically set up a monster / monster weapon and thats it!

dshgsdfrhs.gif


dfghadfhas.gif
 

mouse spirit

Well-known member
Thanks yan. Im trying to do change tile stuff with it so you only need one monster for how ever many blocks you want!as long as they change at the same time.
but so far only a little progress.Problem is it constantly changes tiles,i need it to only happen at 2 specific instances.
When tile turns solid,when tile turns null.
Something like this within the tiles code....
Code:
ChangeAllTiles #$05,#$05,#$0A,#$00
	ChangeAllTiles #$05,#$05,#$0A,#$01
I understand this changes 05 to 05.I meant for that.
I see this lags things up.I've just wanted an animated tile for a while,like just based on a short repetitive timer.
 

mouse spirit

Well-known member
Thanks! I editted the post to have the new tiles codes also. Down towards the bottom gifs if anyone wants them.
 

mouse spirit

Well-known member
Ok so heres my new idea. It involves 4 monsters.
1 can change tile 1,
1 can change tile 2,
A priest,
And 2 donkeys.
And they will slowly follow eachother.
Also this way we can use 4 monsters to do 2 rows of blocks atleast.
That way it wont be inconsistent...i will upload a gif when/if i get it.
 
Top Bottom