Some questions about Mappy

BlitzMax Forums/BlitzMax Programming/Some questions about Mappy

WiredWorm(Posted 2010) [#1]
Hi there,

I'm just getting to grips with Mappy and the module which integrates it into BlitzMax. So far i'm pretty impressed with just how easy it is to use - but i've got a more technical question i'm hoping someone can help with.

I'm assuming that the user data parameters on the blocks is intended to be read at runtime and used to allow placement of items such as collectables and enemies.

This being the case i'm also guessing that in some cases you might want to trigger the replacement of one of these 'special' blocks with a game entity which then does a specific action.

My question is to ask if anyone on this forum has code samples showing the dynamic substitution that i'm talking of?

Thanks in advance.

Pete


Dreamora(Posted 2010) [#2]
there is no dynamic substitution.

you check if such data are there and create the object, commonly when you read the corresponding map area


WiredWorm(Posted 2010) [#3]
That's kinda what I meant. The routine i've got identifies which block row is currently at the top of the screen - it then scans each block on the preceding row (which will be the next to be displayed) and if it finds any blocks with user data it changes the block image to 0 - thus removing the special tiles pattern.

I guess that given you know how wide each block is and which block number it is (on the x axis) then it's a simple calculation to work out roughly where the entity needs to be created. Creating it with a negative Y value will mean it is generated just of screen and then it's own logic can move it down the screen so it comes into play......

Sorry, just thinking out loud here - but I assume the above would work....