Posted By
|
Message
|
shadowlink
Registered 05/01/2009
Points 237
|
1st November, 2010 at 01:14:56 -
Hey guys
I've been working on my own Zelda engine and begun on the pushing aspect.
The basics work well, I'm just not too sure on how to implement the ForEach extension so that Link only moves one block at a time. If someone could explain how and give me an example, that would be great.
Also a bug which I can't seem to figure out is when a block is perfectly flush with another block, and Link goes to push them into each other, the block moves an extra pixel in when it shouldn't move at all. Probably done something stupid in the fastloops :S Anyone know how to fix?
I have posted the mfa file here which should help you understand my problems:
http://www.megaupload.com/?d=T3LMRG8D
n/a
|
Sketchy Cornwall UK
Registered 06/11/2004
Points 1971
|
1st November, 2010 at 14:33:01 -
"The file you are trying to access is temporarily unavailable"
There's no way you need the ForEach extension or fastloops for something this simple.
Easiest way is to just put a detector in front of Link (to detect if there's a block to push), and then another detector in front of the block (to detect if there's something blocking it from moving).
n/a
|
shadowlink
Registered 05/01/2009
Points 237
|
2nd November, 2010 at 06:55:19 -
Thanks for the reply.
But what about in relation to only moving only one block at a time and making a block act independent of the other? That's why I mentioned the ForEach extension because I heard that can be used instead of spread values.
Also the link still works for me. The megaupload servers must of had a hiccup or something.
n/a
|
Sketchy Cornwall UK
Registered 06/11/2004
Points 1971
|
4th November, 2010 at 19:26:32 -
Is the block pushing in Zelda grid-based? I can't remember.
If it is, you can probably find a sokoban engine somewhere (I can probably find one I made if you want).
If not, it becomes a lot more difficult. I had a go, but you're right - you do need to use fastloops or ForEach or something. I'm afraid I didn't get far...
btw: The file you uploaded is still unavailable.
Try windows live skydrive or something instead.
n/a
|
GamesterXIII
Registered 04/12/2008
Points 1110
|
4th November, 2010 at 21:50:28 -
Originally Posted by shadowlink Thanks for the reply.
But what about in relation to only moving only one block at a time and making a block act independent of the other? That's why I mentioned the ForEach extension because I heard that can be used instead of spread values.
Also the link still works for me. The megaupload servers must of had a hiccup or something.
When you say make the blocks act independently of each other . . . do you mean if they are directly side by side?
IIRC in Zelda the edges of tiles push your character around. If you are centered below two blocks and trying to push them up they wont move, but if you are far enough over on one of them then you will be able to push it.
I know this is feasible without extensions, but I don't have time to mess with it right now. I might try to get an engine working on my downtime because I'm curious now.
n/a
|
Jon Lambert Administrator
Vaporware Master
Registered 19/12/2004
Points 8235
|
4th November, 2010 at 21:57:17 -
Originally Posted by GamesterXIII
Originally Posted by shadowlink Thanks for the reply.
But what about in relation to only moving only one block at a time and making a block act independent of the other? That's why I mentioned the ForEach extension because I heard that can be used instead of spread values.
Also the link still works for me. The megaupload servers must of had a hiccup or something.
When you say make the blocks act independently of each other . . . do you mean if they are directly side by side?
IIRC in Zelda the edges of tiles push your character around. If you are centered below two blocks and trying to push them up they wont move, but if you are far enough over on one of them then you will be able to push it.
I know this is feasible without extensions, but I don't have time to mess with it right now. I might try to get an engine working on my downtime because I'm curious now. He means he's having trouble pushing only one block at a time. When he has his character push a block that is adjacent to another block, both blocks move because both boxes fit whatever condition he has for object selection.
Sandwich Time!Whoo!
JoyCheck & KeyCheck Widgets
For easy implementation of customizable joystick and keyboard controls.
http://www.create-games.com/download.asp?id=8364
|
shadowlink
Registered 05/01/2009
Points 237
|
5th November, 2010 at 06:09:19 -
Originally Posted by Jon Lambert
Originally Posted by GamesterXIII
Originally Posted by shadowlink Thanks for the reply.
But what about in relation to only moving only one block at a time and making a block act independent of the other? That's why I mentioned the ForEach extension because I heard that can be used instead of spread values.
Also the link still works for me. The megaupload servers must of had a hiccup or something.
When you say make the blocks act independently of each other . . . do you mean if they are directly side by side?
IIRC in Zelda the edges of tiles push your character around. If you are centered below two blocks and trying to push them up they wont move, but if you are far enough over on one of them then you will be able to push it.
I know this is feasible without extensions, but I don't have time to mess with it right now. I might try to get an engine working on my downtime because I'm curious now.
He means he's having trouble pushing only one block at a time. When he has his character push a block that is adjacent to another block, both blocks move because both boxes fit whatever condition he has for object selection.
Yes Jon that's exactly what happens. However Gamester, I think you are talking about Link being pushed out to the sides when he's on the edge of the block? I attempted something similar when I was working on my mario engine. When mario goes to jump and hit a block but is on the edge he gets pushed out to the side as well. It had a couple of bugs but the basics worked well. I'll probably try and implement that into my zelda engine too. Just thought I'd share that lol.
But still, can anyone show me how to solve my original problem?
n/a
|
Don Luciano Heavy combat pancake
Registered 25/10/2006
Points 380
|
5th November, 2010 at 11:15:55 -
You can make another detector for charachter that is only 1 pixel height and in front of charachter so it's immposibble to overlap two blocks.
Code me a sausage!
|
shadowlink
Registered 05/01/2009
Points 237
|
5th November, 2010 at 11:41:59 -
Originally Posted by Don Luciano You can make another detector for charachter that is only 1 pixel height and in front of charachter so it's immposibble to overlap two blocks.
I suppose I will have to go with that for now. I did want to avoid adding another set of collision detectors for Link but it will get the job done
Thanks everyone for their input.
Edited by shadowlink
n/a
|
GamesterXIII
Registered 04/12/2008
Points 1110
|
5th November, 2010 at 20:20:44 -
@ Jon
I know thats what he means. The corner pushing can play a major part in the creationg of the block engine.
n/a
|
shadowlink
Registered 05/01/2009
Points 237
|
5th November, 2010 at 23:19:25 -
@ Don
I was thinking and the one pixel sensors shouldn't be used. Because you can have two blocks together, Link is in the middle of the two and goes to push. He shouldn't be able to push at all because he is in the middle of the two but one pixel detectors would still push a block. I'll just work around with the sensors. Small ones on each block's edge in the middle, and on link (obviously). If Link's sensor overlaps the block/blocks in the middle or the corner but not the block sensors, that will determine whether Link is positioned on the edge or middle of the two blocks, thus won't be able to push.
n/a
|
|
|