Spellbound Dizzy Remake - DizzyAGE Community Project

Post information about your own Dizzy creations.
SnTrooper
Hard Boiled Egg
Posts: 737
Joined: Thu May 10, 2012 5:55 pm
Location: New Hampshire

Post by SnTrooper » Fri Nov 08, 2013 11:25 pm

If you end up not being able to get the password, the versions of Magicland and Prince of the Yolkfolk I have are unlocked.

Pogie
Hard Boiled Egg
Posts: 142
Joined: Thu Aug 06, 2009 9:39 am

Post by Pogie » Sat Nov 16, 2013 3:10 pm

Thanks Noggin and SnTrooper, what you sent to me is going to be useful and I appreciate it! :say_yes:


Now, I've got a bit of a problem with the boulders in the mineshaft. I know how to code them, I know how to make them look like they did in the original but I'm relying on video walkthroughs to show me precisely what is what with this game but none of them seem to trigger the rocks as they play it so I don't know how they are meant to look as they fall! I just can't find a video of them falling. Can anybody point me in the direction of a video if one exists, or maybe take a few screenshots from an emulated version so I can see the sequence and number of rocks? I'd do it myself but I don't know much about emulators! As usual, any help is greatly appreciated my fellow Yolkfolkers!

User avatar
Adz.M
Team Yolkfolk
Team Yolkfolk
Posts: 3071
Joined: Tue Jan 16, 2007 7:43 am
Location: Cornwall, UK
Contact:

Post by Adz.M » Sat Dec 14, 2013 9:35 pm

Pogie wrote:Now, I've got a bit of a problem with the boulders in the mineshaft. I know how to code them, I know how to make them look like they did in the original but I'm relying on video walkthroughs to show me precisely what is what with this game but none of them seem to trigger the rocks as they play it so I don't know how they are meant to look as they fall! I just can't find a video of them falling. Can anybody point me in the direction of a video if one exists, or maybe take a few screenshots from an emulated version so I can see the sequence and number of rocks? I'd do it myself but I don't know much about emulators! As usual, any help is greatly appreciated my fellow Yolkfolkers!
Image

That's about it really, the rocks don't animate, they just rain down as you walk into the tunnel. :)
Image

User avatar
Rindex
Hard Boiled Egg
Posts: 434
Joined: Thu Apr 16, 2009 10:48 am
Location: Khimki, Moscow Regions, Russia

Post by Rindex » Sun Dec 15, 2013 12:37 am

Pogie wrote:Now, I've got a bit of a problem with the boulders in the mineshaft. I know how to code them, I know how to make them look like they did in the original but I'm relying on video walkthroughs to show me precisely what is what with this game but none of them seem to trigger the rocks as they play it so I don't know how they are meant to look as they fall! I just can't find a video of them falling. Can anybody point me in the direction of a video if one exists, or maybe take a few screenshots from an emulated version so I can see the sequence and number of rocks? I'd do it myself but I don't know much about emulators! As usual, any help is greatly appreciated my fellow Yolkfolkers!
I made video.

[video=youtube;Asb7SQQa0fM]http://www.youtube.com/watch?v=Asb7SQQa0fM[/video]

Pogie
Hard Boiled Egg
Posts: 142
Joined: Thu Aug 06, 2009 9:39 am

Post by Pogie » Fri Dec 20, 2013 8:00 pm

Thanks guys! Those rocks have caused me some real headaches. As it stands I've got an animated tiles which I've coded to appear and disappear if the player hits a collider. It looks acceptable enough and is close to how the original rocks fall. But a while back Grandad gave me a bit of code that Delta had written which would have been better but I just couldn't get it working. I think I was missing some defines or something somewhere. But after looking closely at the original rockfalls and the rain Peter has already coded I can say that they are totally identical. But once again my puny Flufflebrain has let me down and I'm unable to duplicate Peter's rain code to successfully make my rocks fall. If any of you more intelligent sorts have a little time over the holidays maybe you could have a look into it? Like I said, I've done it and it's acceptable but it's not up to the standards of accuracy that Peter has set!


(edit: The code Grandad posted is in this thread http://www.yolkfolk.com/bb/showthread.p ... ling-rocks)

delta
Hard Boiled Egg
Posts: 3965
Joined: Fri Feb 09, 2007 7:08 pm
Location: North West
Contact:

Post by delta » Sat Dec 21, 2013 6:10 pm

Grandad wrote:Pogie, this is the 'proper' way to code continually falling rocks. The rate of fall can be altered for each rock by either changing the 'delay' property in each rock, or the 'speed of the fall' in the actual function. It also takes into account a rock going 'past' the lower activation axis point so you don't have to worry about ensuring the axis co-ordinates are precisely divisable. You can 'set' the rocks on the map at any point in the 'cycle' as the roomupdate will move the rock down and the 'abot' co-ordinate is where the rock gets moved back up to the top position. It's also best to have the 'ledges' between the rocks as a higher layer than the rocks, so that they only show as falling from the ceiling and disappearing into the floor. Don't forget to set the 'death' property and respawn Dizzy outside the rockfall. Hope this helps. Thank Jamie for the original coding.

Code: Select all

func Rock1 (id,atop,abot) //set the 'numbers' in the room update
{
	idx = ObjFind(id);
	if (!IsUpdate(ObjGet(idx, O_DELAY))) return; //don't move rock on delay update

	y = (ObjGet(idx, O_Y); // y co-ordinate of rock at starting point on map
	y+=2; // sets speed of falling rock
	ObjSet(idx, O_Y, y); // sets new position of rock
	ObjPresent(idx); // only needed if rocks falling over two or more rooms

	if (y>=abot) // y co-ordinate of rock at lowest point
	{
		ObjSet(idx, O_Y, atop); // set rock back to highest position
	}
}
then set the room update for each rock

Code: Select all

func UpdateRoom_12_12() //or whatever the room positon is
{
	Rock1(248,1106,1197); // the id of the rock, the top and bottom y co-ordinates you're using
}
That code looks fine to me. It's pretty basic, but assuming the rocks aren't disabled then it'll be fine.

Generally for an on/off drop like you're wanting, you'd put a check in the UpdateRoom_12_12 function saying something like 'if Dizzy's X position is greater than [whatever] then make the rocks visible'. At the moment that code isn't checking the position of the player, so it'll just run through the code wherever the player is in the room. That's ok, but if the rocks are disabled, then you won't ever see them, because there's nothing turning them 'on'.

I'm sure one of my games will have had similar coding in it, but I can't think of which ones off the top of my head (the longer I go between coding, the harder it is to remember examples from my games).
Image

Image

"Quotes from the internet may not be genuine" - Abraham Lincoln

delta
Hard Boiled Egg
Posts: 3965
Joined: Fri Feb 09, 2007 7:08 pm
Location: North West
Contact:

Post by delta » Sat Dec 21, 2013 6:18 pm

I remembered one. It's a fairly simple one too: In Mystic Forest Dizzy, if you get too close to a Will-o'-the-Wisp, it disappears. This is done as described above, checking the player position, then if he's near it, changing the DRAW property.

I used the DRAW property because that kept the DISABLE property free for use when it was daytime - there's no Will-o'-the-Wisps during the day! For what you're wanting though, I'd probably the DISABLE property instead, but either should work fine.

Here's the code for one of them:

Code: Select all

func UpdateRoom_2_5()
{
	px = PlayerGet(P_ X) ;
	if(px>536&&px<624) { ObjSet(ObjFind(3006),O_DRAW,0); }
	else  { ObjSet(ObjFind(3006),O_DRAW,3); }

	Update_Wisp(3006);
Image

Image

"Quotes from the internet may not be genuine" - Abraham Lincoln

Pogie
Hard Boiled Egg
Posts: 142
Joined: Thu Aug 06, 2009 9:39 am

Post by Pogie » Mon Dec 23, 2013 11:35 am

I've put a rock on the map at y coordinates 1433. It's set as a dynamic object and its id is 9950. The rock is not disabled. The map is saved.

I've got the code from above in game.gs copied and pasted and completely unaltered. I've altered the update room function to this:

func UpdateRoom_20_10()
{
Rock1(9950,1433,1492);
}


I run the game and I get a parse error on line 1618, which is this part of the code:

y = (ObjGet(idx, O_Y); // y co-ordinate of rock at starting point on map


I'm stumped and I have no hair left. Somebody help me! :v2_dizzy_confused3:

User avatar
Noggin the Nog
Hard Boiled Egg
Posts: 453
Joined: Sun Jul 01, 2012 12:04 am

Post by Noggin the Nog » Mon Dec 23, 2013 2:00 pm

Er Pogie...

the parse error's because you've got an extra open bracket there.

You've got: y = (ObjGet(idx, O_Y);

When it should be: y = ObjGet(idx, O_Y);



Fluffle, kick thyself.

Pogie
Hard Boiled Egg
Posts: 142
Joined: Thu Aug 06, 2009 9:39 am

Post by Pogie » Mon Dec 23, 2013 2:22 pm

Noggin the Nog wrote:Er Pogie...

the parse error's because you've got an extra open bracket there.

You've got: y = (ObjGet(idx, O_Y);

When it should be: y = ObjGet(idx, O_Y);



Fluffle, kick thyself.

THANK YOU NOGGIN!!!! Oh how did I not notice that? I think it's down to me looking at it for so long! The code works great now and I can make those pesky rocks look 100% like the original ones did. :v2_dizzy_clapping:

Locked