I need help making my Mario Level Creator scroll.
This isn't just average 2-directional scrolling that goes left and right. Yes, thats the same goal, but there are 165 tiles (11x15), and this needs to be customizable, so not just any average scroller with all of the screens, being costumes. Currently I know that it is all stamped, so yes, I will need to make it with 165 sprites, because you can't stamp 165 tiles on the screen many times per second in scratch. Also, this is tile based, so this is array based. That means, that Mario senses not with color sensing, or having another sprite set a variable to 1 or 0 if it is touching a wall or not, instead Mario looks at it's x and y positions, uses a formula to calculate a special number, and look in to the the list for what number, and check if there is a wall or not. Generally I have those formulas calculated out, just instead of using the x position, you need to most likely use the scroll x or something.
First of all I have these resources.
- Tile test 19 by archmage. This is generally what I goal for, but with the sensing and style of my game.
- Tile based games tutorial. This may not be as helpful, because this was originally made for flash, but it *might* help.
- A small tutorial by Addzero. A little way through you'll see a long post by him with code, and that should help. But most of that stuff is already solved with my thing. So still not as helpful.
It would be really nice if one of you who know how to do this, you know who you are
, could do this for me. I'm planning to upload a new version, with everything not needed un-connected to the main scripts and such, and with a few tiny glitches fixed.
Thanks,
Chris
Offline
adriangl wrote:
Wow, so you are making your Mario level maker a scroller? That is advanced, and it will be hard because you will need the tiles to be able to stamp on all the different terrains.
For now, it won't be a level creator. Also it won't be stamped on. There will be 165 sprites, one for each tile.
Offline
Lucario621 wrote:
adriangl wrote:
Wow, so you are making your Mario level maker a scroller? That is advanced, and it will be hard because you will need the tiles to be able to stamp on all the different terrains.
For now, it won't be a level creator. Also it won't be stamped on. There will be 165 sprites, one for each tile.
A sprite for each tile! I think that is a little over board. Hopefully someone(not me, I have no idea) can think of an easier way.
Offline
adriangl wrote:
Lucario621 wrote:
adriangl wrote:
Wow, so you are making your Mario level maker a scroller? That is advanced, and it will be hard because you will need the tiles to be able to stamp on all the different terrains.
For now, it won't be a level creator. Also it won't be stamped on. There will be 165 sprites, one for each tile.
A sprite for each tile! I think that is a little over board. Hopefully someone(not me, I have no idea) can think of an easier way.
You expect scratch to calculate for each tile of where to go and which costume to stampe, and go to all 165 locations and stamp them, a couple times per second? I'm afraid you can't do that
. Too much for scratch. I know I'd want something better, but this is only way, as far as I know.
Last edited by Lucario621 (2009-11-13 23:00:55)
Offline
Lucario621 wrote:
adriangl wrote:
Lucario621 wrote:
For now, it won't be a level creator. Also it won't be stamped on. There will be 165 sprites, one for each tile.A sprite for each tile! I think that is a little over board. Hopefully someone(not me, I have no idea) can think of an easier way.
You expect scratch to calculate for each tile of where to go and which costume to stampe, and go to all 165 locations and stamp them, a couple times per second? I'm afraid you can't do that
. Too much for scratch. I know I'd want something better, but this is only way, as far as I know.
Yeah, some things in Scratch just can't be done. But how about splitting them. One sprite for each part of the terrain. That way it will only be near 20-30, much easier than 165.
Offline
adriangl wrote:
Lucario621 wrote:
adriangl wrote:
A sprite for each tile! I think that is a little over board. Hopefully someone(not me, I have no idea) can think of an easier way.You expect scratch to calculate for each tile of where to go and which costume to stampe, and go to all 165 locations and stamp them, a couple times per second? I'm afraid you can't do that
. Too much for scratch. I know I'd want something better, but this is only way, as far as I know.
Yeah, some things in Scratch just can't be done. But how about splitting them. One sprite for each part of the terrain. That way it will only be near 20-30, much easier than 165.
Look at the current mario level creator. Look at it loading, and stamping the screen. Thats the speed it would do it if it was stamped, just slower.
Offline
Lucario621 wrote:
adriangl wrote:
Lucario621 wrote:
You expect scratch to calculate for each tile of where to go and which costume to stampe, and go to all 165 locations and stamp them, a couple times per second? I'm afraid you can't do that. Too much for scratch. I know I'd want something better, but this is only way, as far as I know.
Yeah, some things in Scratch just can't be done. But how about splitting them. One sprite for each part of the terrain. That way it will only be near 20-30, much easier than 165.
Look at the current mario level creator. Look at it loading, and stamping the screen. Thats the speed it would do it if it was stamped, just slower.
Oh, then that is okay.
Offline
I can try to find out once I get scratch downloaded again, but here's my idea. you will need lots of time to script.
Say your block is 30 pixels by 30 pixels. you will need the variable scrollx and xvelocity.
than you will need something like
when green flag clicked
forever
set x to scrollx + 0
and sprite 2 the same only scrollx + 30 (or whatever size your block is)
Offline
16Skittles wrote:
I can try to find out once I get scratch downloaded again, but here's my idea. you will need lots of time to script.
Say your block is 30 pixels by 30 pixels. you will need the variable scrollx and xvelocity.
than you will need something like
when green flag clicked
forever
set x to scrollx + 0
and sprite 2 the same only scrollx + 30 (or whatever size your block is)
Actually yes it is 30 pixels by 30 pixels. Good guess
But its not as simple as that. First of all, this isn't something with 2 terrain sprites, like archmage's method. This would be basically, like 165 terrains. All representing each tile. Also, there also has to be a formula that calculates what costume it should be, based on the scroll x, and the tile it is on the screen generally.
Offline
Lucario621 wrote:
16Skittles wrote:
I can try to find out once I get scratch downloaded again, but here's my idea. you will need lots of time to script.
Say your block is 30 pixels by 30 pixels. you will need the variable scrollx and xvelocity.
than you will need something like
when green flag clicked
forever
set x to scrollx + 0
and sprite 2 the same only scrollx + 30 (or whatever size your block is)Actually yes it is 30 pixels by 30 pixels. Good guess
![]()
But its not as simple as that. First of all, this isn't something with 2 terrain sprites, like archmage's method. This would be basically, like 165 terrains. All representing each tile. Also, there also has to be a formula that calculates what costume it should be, based on the scroll x, and the tile it is on the screen generally.
That's not the exact script. do you really expect my to remember the whole script? but I mean the scrolling type with the method on the scrolling demo default on scratch. then + whatever number. its not the best example, but my rescue at sea game uses a simmilar
scrolling for the stick figures that you rescue. (the ink is in the signature)
P.S. I figured that 10 would be too small and 50 would be too big so I went in the middle.
Last edited by 16Skittles (2009-11-14 18:25:20)
Offline
16Skittles wrote:
I can try to find out once I get scratch downloaded again, but here's my idea. you will need lots of time to script.
Say your block is 30 pixels by 30 pixels. you will need the variable scrollx and xvelocity.
than you will need something like
when green flag clicked
forever
set x to scrollx + 0
and sprite 2 the same only scrollx + 30 (or whatever size your block is)
I don't think you have any concept of what it means to make a scrolling tile based game. It is nowhere near as simple as coding the demo project that comes with scratch (which uses very basic scripts that most people can come up with on their own). In fact, making the actual sprites scroll isn't even really an issue, the issue is getting them to switch to the correct costumes and detecting collisions properly.
Try looking at the coding of the project and applying your methods to make it scroll, then give advice if you found a way to make things work.
Offline
archmage wrote:
16Skittles wrote:
I can try to find out once I get scratch downloaded again, but here's my idea. you will need lots of time to script.
Say your block is 30 pixels by 30 pixels. you will need the variable scrollx and xvelocity.
than you will need something like
when green flag clicked
forever
set x to scrollx + 0
and sprite 2 the same only scrollx + 30 (or whatever size your block is)I don't think you have any concept of what it means to make a scrolling tile based game. It is nowhere near as simple as coding the demo project that comes with scratch (which uses very basic scripts that most people can come up with on their own). In fact, making the actual sprites scroll isn't even really an issue, the issue is getting them to switch to the correct costumes and detecting collisions properly.
Try looking at the coding of the project and applying your methods to make it scroll, then give advice if you found a way to make things work.
what do you mean by switching costumes?
Offline
16Skittles wrote:
archmage wrote:
16Skittles wrote:
I can try to find out once I get scratch downloaded again, but here's my idea. you will need lots of time to script.
Say your block is 30 pixels by 30 pixels. you will need the variable scrollx and xvelocity.
than you will need something like
when green flag clicked
forever
set x to scrollx + 0
and sprite 2 the same only scrollx + 30 (or whatever size your block is)I don't think you have any concept of what it means to make a scrolling tile based game. It is nowhere near as simple as coding the demo project that comes with scratch (which uses very basic scripts that most people can come up with on their own). In fact, making the actual sprites scroll isn't even really an issue, the issue is getting them to switch to the correct costumes and detecting collisions properly.
Try looking at the coding of the project and applying your methods to make it scroll, then give advice if you found a way to make things work.what do you mean by switching costumes?
Nobody uses one sprite for each section of the level. Well some people do, but its stupid. Anyway, it needs to switch costumes, depending if its a question block, a sky block, or a brick block, or anything else. Because its always switching, because it always is helping take up some part of the stage.
Offline
Lucario621 wrote:
16Skittles wrote:
archmage wrote:
I don't think you have any concept of what it means to make a scrolling tile based game. It is nowhere near as simple as coding the demo project that comes with scratch (which uses very basic scripts that most people can come up with on their own). In fact, making the actual sprites scroll isn't even really an issue, the issue is getting them to switch to the correct costumes and detecting collisions properly.
Try looking at the coding of the project and applying your methods to make it scroll, then give advice if you found a way to make things work.what do you mean by switching costumes?
Nobody uses one sprite for each section of the level. Well some people do, but its stupid. Anyway, it needs to switch costumes, depending if its a question block, a sky block, or a brick block, or anything else. Because its always switching, because it always is helping take up some part of the stage.
Oh, that would make the project much smaller. And it is the smart way to do it.
Offline