The Daily Click ::. Forums ::. Klik Coding Help ::. TGF2 Scrolling Issue
 

Post Reply  Post Oekaki 
 

Posted By Message

Roach



Registered
  29/01/2009
Points
  52

Has Donated, Thank You!360 Owner
4th August, 2013 at 04/08/2013 03:00:52 -

I dont know what the hell im doing wrong. I have a huge area (20000x20000) that Im doing a Metroid/Castlevania style platformer. I have the coding to Always Center Screen on my character, 0,0 on hot spot (which is dead center of my sprite) and it for the love of god just will not work. I want my hero to always be in the center of the screen. I dont want to have everything moving past him because that will just take forever. Whenever I try to test my character, it wont scroll... at all. Is this a bug or something? If i jump down off a platform into a pit, it doesnt follow him down the play area or anything. Please help...

 
Yesh.. pleaseh shave ush... from all ze money...

lembi2001



Registered
  01/04/2005
Points
  608

VIP MemberIt's-a me, Mario!Wii OwnerI like Aliens!Has Donated, Thank You!PS3 OwnerI am an April Fool
4th August, 2013 at 04/08/2013 03:09:10 -

What window size do you have?
Are you 100% sure that you have selected you player sprite as the focus point? Double check, delete the event and recreate it.

Failing that upload your mfa for someone else to look at

 
n/a

Roach



Registered
  29/01/2009
Points
  52

Has Donated, Thank You!360 Owner
4th August, 2013 at 04/08/2013 03:20:48 -

Yes, line is "Always > Storyboard Controls > Center Display at (0,0) (COHEN 1) which is my sprite. My window size is 1600 x 1200, although I'd like it to be much smaller, as the game will play like you are looking at a CCTV and you're scores and powerups are shown on the panel (if you can imagine that). So with this, I want to give the player the feeling as if they are looking through the eyes of the person watching the television but playing AS the person on the television. Therefore, I;d like to have the hero always dead center of the screen. I even though ahead and made margins along the edges of the screen so if you hit the furthest wall of the map, the player can still be dead center. I got somewhat of a scrolling when i turned off "resize screen at start of frame" but everything is so microscopic it wont work.

 
Yesh.. pleaseh shave ush... from all ze money...

lembi2001



Registered
  01/04/2005
Points
  608

VIP MemberIt's-a me, Mario!Wii OwnerI like Aliens!Has Donated, Thank You!PS3 OwnerI am an April Fool
4th August, 2013 at 04/08/2013 03:24:26 -

hmmmm..... strange, no particular reason why it wouldn't be working (that i can think of). Are you able to share your file??

 
n/a

Roach



Registered
  29/01/2009
Points
  52

Has Donated, Thank You!360 Owner
4th August, 2013 at 04/08/2013 03:28:22 -

https://fbcdn-sphotos-b-a.akamaihd.net/hphotos-ak-prn1/p480x480/46922_4647735246308_2040302517_n.jpg

Here is a link to a picture showing you what the overlay will look like. As for posting an example, where exactly can I host the file? Can upload it to this site or do I have remote host it and post the link?

 
Yesh.. pleaseh shave ush... from all ze money...

lembi2001



Registered
  01/04/2005
Points
  608

VIP MemberIt's-a me, Mario!Wii OwnerI like Aliens!Has Donated, Thank You!PS3 OwnerI am an April Fool
4th August, 2013 at 04/08/2013 03:29:23 -

Yeah just upload it to an external site and provide the link

 
n/a

Roach



Registered
  29/01/2009
Points
  52

Has Donated, Thank You!360 Owner
4th August, 2013 at 04/08/2013 03:32:16 -

http://www.mediafire.com/?268zi2yze3lqrv3

Here yah go. I feel so dumb. I can make some amazing things with this program, but I'm having such an issue with the most basic stuff.

 
Yesh.. pleaseh shave ush... from all ze money...

lembi2001



Registered
  01/04/2005
Points
  608

VIP MemberIt's-a me, Mario!Wii OwnerI like Aliens!Has Donated, Thank You!PS3 OwnerI am an April Fool
4th August, 2013 at 04/08/2013 03:50:40 -

That first frame appears to be broken.

You have accidentally crippled your level size by editing the Virtual frame size. Resetting this back to what it should be (20000 x 20000) does not resolve the problem.

Try recreating the level without editing the virtual size and you will see what i mean.

 
n/a

Roach



Registered
  29/01/2009
Points
  52

Has Donated, Thank You!360 Owner
4th August, 2013 at 04/08/2013 03:59:27 -

Im lost. I created a new frame, that by default went to 2000x20000 in both frame size and virtual frame, copy and pasted the testing sprite and platform and got the same issue.

 
Yesh.. pleaseh shave ush... from all ze money...

monkeytherat

Hero of Time Jr

Registered
  07/11/2010
Points
  1293

VIP MemberI donated an open source project
4th August, 2013 at 04/08/2013 04:08:37 -

Did you set the scrolling event in the new frame?

 
If you put a million monkeys at a million keyboards, one of them will eventually write a Java program.
The rest of them will write Perl programs.

Roach



Registered
  29/01/2009
Points
  52

Has Donated, Thank You!360 Owner
4th August, 2013 at 04/08/2013 04:09:55 -

Of course I did sillygoose. haha

 
Yesh.. pleaseh shave ush... from all ze money...

Roach



Registered
  29/01/2009
Points
  52

Has Donated, Thank You!360 Owner
4th August, 2013 at 04/08/2013 04:09:58 -

Of course I did sillygoose. haha

 
Yesh.. pleaseh shave ush... from all ze money...

monkeytherat

Hero of Time Jr

Registered
  07/11/2010
Points
  1293

VIP MemberI donated an open source project
4th August, 2013 at 04/08/2013 04:11:01 -

Just checking everything, since lembi's solution worked for me.

 
If you put a million monkeys at a million keyboards, one of them will eventually write a Java program.
The rest of them will write Perl programs.

Roach



Registered
  29/01/2009
Points
  52

Has Donated, Thank You!360 Owner
4th August, 2013 at 04/08/2013 04:18:16 -

Once I hit the resize screen option, I get nothing... Its not making sense to me. I sort of got it to work when I resized the virtual to 10000 x 10000 but now my guy just falls through the platform.... ughhhhhhhhh

 
Yesh.. pleaseh shave ush... from all ze money...

Roach



Registered
  29/01/2009
Points
  52

Has Donated, Thank You!360 Owner
4th August, 2013 at 04/08/2013 04:20:45 -

Ok I shutoff "Handle Background Collisions even out of window" and were golden at this setting, but Im afraid having this option off wont let me code something happening in a room that Im not currently in ie hit a switch and a door on the other side of the map opens. Thoughts?

 
Yesh.. pleaseh shave ush... from all ze money...

Roach



Registered
  29/01/2009
Points
  52

Has Donated, Thank You!360 Owner
4th August, 2013 at 04/08/2013 04:22:40 -

Also Virtual is 19000 x 19000 too btw. This works considering that 1000 extra pixels around the border of the map wont cause scrolling issues down the line.

Edited by Roach

 
Yesh.. pleaseh shave ush... from all ze money...

monkeytherat

Hero of Time Jr

Registered
  07/11/2010
Points
  1293

VIP MemberI donated an open source project
4th August, 2013 at 04/08/2013 04:40:35 -

Rule number 1: Never resize anything in MMF2
Rule number 2: Never handle off-screen collisions in MMF2

Also, your scenario has nothing to do with handling collisions out of the window, since the hitting of the switch happens on-screen. Setting flags should not present a problem.

It may be worthwhile to mention that the world in Metroid and super Metroid is not all in one frame, there are loading areas whenever you go through a door.

 
If you put a million monkeys at a million keyboards, one of them will eventually write a Java program.
The rest of them will write Perl programs.

Roach



Registered
  29/01/2009
Points
  52

Has Donated, Thank You!360 Owner
4th August, 2013 at 04/08/2013 04:52:17 -

I had considered that, however, the overlay would present a problem if I had to make multiple frames.

 
Yesh.. pleaseh shave ush... from all ze money...

lembi2001



Registered
  01/04/2005
Points
  608

VIP MemberIt's-a me, Mario!Wii OwnerI like Aliens!Has Donated, Thank You!PS3 OwnerI am an April Fool
4th August, 2013 at 04/08/2013 14:23:15 -

Why would the overlay be a problem?? You could still use the overlay and multiple frames

 
n/a

monkeytherat

Hero of Time Jr

Registered
  07/11/2010
Points
  1293

VIP MemberI donated an open source project
4th August, 2013 at 04/08/2013 18:57:29 -

I think he means the transitions, which only look tricky and are actually very easy to do. Just have a frame dedicated to transitions and have two global values to tell which way the character is moving and where the destination is.

 
If you put a million monkeys at a million keyboards, one of them will eventually write a Java program.
The rest of them will write Perl programs.

Roach



Registered
  29/01/2009
Points
  52

Has Donated, Thank You!360 Owner
4th August, 2013 at 04/08/2013 20:46:56 -

I have to fiddle with it when i get to that point... there will just be so many things that could change in one frame, that when you have to do back tracking, that frame would have to entirely different than when you first got there... having it all on one frame would make things so much easier... Everything is still in its infancy as of now...

 
Yesh.. pleaseh shave ush... from all ze money...

Roach



Registered
  29/01/2009
Points
  52

Has Donated, Thank You!360 Owner
4th August, 2013 at 04/08/2013 21:10:47 -

I have to fiddle with it when i get to that point... there will just be so many things that could change in one frame, that when you have to do back tracking, that frame would have to entirely different than when you first got there... having it all on one frame would make things so much easier... Everything is still in its infancy as of now...

 
Yesh.. pleaseh shave ush... from all ze money...

Jenswa

Possibly Insane

Registered
  26/08/2002
Points
  2722
8th August, 2013 at 08/08/2013 16:19:27 -

Have you got it scrolling yet?

I've no idea what the upper limit for level size is if there is a limit (probably there is). So I am not sure if that would be the problem.

What might a problem is that your character is falling out of the level and the scrolling therefore can't center the screen on your character.

I am just doing some guesses and making assumptions, since it wasn't (isn't, while posting) clear for me if you've got scrolling working already.

Happy coding!


 
Image jenswa.neocities.org
   

Post Reply



 



Advertisement

Worth A Click