The Daily Click ::. Forums ::. Klik Coding Help ::. Scrolling doesn't work when I just run the game
 

Post Reply  Post Oekaki 
 

Posted By Message

Dreamsurfer



Registered
  20/12/2003
Points
  288
22nd December, 2003 at 07:32:22 -

I'm kinda toying around with scrolling and stuff, just using platform stuff from the TGF-library. I made several platforms that go up and outside the play-area, and as an event, I stated: "Always Center display at (0,0) from Player Object". This works fine in the Step-Through Editor, but when I choose "Run Level" or "Run Game", I only see the play area and the camera doesn't follow my character anymore. Can anyone help me?

Second problem: somehow my platforms outside the play area, which I have deemed to be "Platform obstacles", don't act like platforms. The character just falls through them for some reason. What can be wrong?

Thanks in advance and happy holidays,
Dreamsurfer

 
Gaming is fun... making others game is even more fun!

Assault Andy

Administrator
I make other people create vaporware

Registered
  29/07/2002
Points
  5686

Game of the Week WinnerVIP Member360 OwnerGOTM JUNE - 2009 - WINNER!GOTM FEB - 2010 - WINNER!	I donated an open source project
22nd December, 2003 at 18:39:05 -

For problem 1: Maybe you should try using the "event editor" instead of the step-through, because in the stepthrough editor you cannot see what everything does and you cannot do alot of proper coding. So try to use the event editor and add the event "Always Center display at (0,0) from Player Object" in there.

2: You have to add the code:
Player collides with background - Player(Stop)

 
Creator of Faerie Solitaire:
http://www.create-games.com/download.asp?id=7792
Also creator of ZDay20 and Dungeon Dash.
http://www.Jigxor.com
http://twitter.com/JigxorAndy

Karnage [Ragnarok Games]



Registered
  28/10/2003
Points
  664
22nd December, 2003 at 21:07:16 -

Nice answer andy-- I have no need to write something now. But as a abckup, if the scrolling doesn't work, replace "always" with "every .01 seconds". ANd it's nice to see someone help, instead of n00b-baashing.

 
Remember, there's a little darkness in all of us... we just express it best.
--Ragnarok Games



Assault Andy

Administrator
I make other people create vaporware

Registered
  29/07/2002
Points
  5686

Game of the Week WinnerVIP Member360 OwnerGOTM JUNE - 2009 - WINNER!GOTM FEB - 2010 - WINNER!	I donated an open source project
23rd December, 2003 at 01:10:25 -

What? I hang around the code-it boards a fair bit and I hardly ever see noob bashing. Where'd u see it?

 
Creator of Faerie Solitaire:
http://www.create-games.com/download.asp?id=7792
Also creator of ZDay20 and Dungeon Dash.
http://www.Jigxor.com
http://twitter.com/JigxorAndy

Dreamsurfer



Registered
  20/12/2003
Points
  288
23rd December, 2003 at 03:18:05 -

Hello, Andy. Thanks for your nice reply. Of course I did use the event editor to program all events, and I use the S.T.-editor to test everything. There the scrolling works perfectly. However, when I try running the game in "Run this level" or "Run this game" mode, scrolling is somehow magically disabled. I also tried replacing it with "every .01 seconds" like Karnage said, but that doesn't work either. My guess is that there's somewhere an option that turns scrolling off, but I can't find it.

The problem with the platforms still exists too: the platforms inside the playfield work great, but once the character tries to get on a platform outside the playfield, he just falls through it. I do use "Player collides with background - Player(Stop)".

So could there be some hidden settings that I have to look at, or something?
Anyways... thanks alot for taking some time to help me. I appreciate it.

P.S: I uploaded the game at http://www.yellowtown.net/files/tgf/scrolling.gam so you can see for yourself. Test in Step-Trough and Run Game mode, and try to reach the upper platforms to see my problem.

Image Edited by the Author.

 
Gaming is fun... making others game is even more fun!

Shen

Possibly Insane

Registered
  14/05/2002
Points
  3497
23rd December, 2003 at 04:06:03 -

Sadly TGF is doing what you've told it to here

Your 'playfield' is still only 640x480 pixels in size. When TGF scrolls near an edge, it centers the screen the nearest to your character it can without showing anything beyond the borders of the playfield. As your playfield is only as big as the window, there's nowhere for it to scroll to.

I made the playfield 1280x1024 and it worked fine. And while you're at it, delete the black Quick Backdrop, as you can set the background colour yourself in Frame Properties.

Obvious now, eh?

 
gone fishin'

Assault Andy

Administrator
I make other people create vaporware

Registered
  29/07/2002
Points
  5686

Game of the Week WinnerVIP Member360 OwnerGOTM JUNE - 2009 - WINNER!GOTM FEB - 2010 - WINNER!	I donated an open source project
23rd December, 2003 at 04:10:46 -

I was just about to reply then I saw your post come up Shen

 
Creator of Faerie Solitaire:
http://www.create-games.com/download.asp?id=7792
Also creator of ZDay20 and Dungeon Dash.
http://www.Jigxor.com
http://twitter.com/JigxorAndy

Shen

Possibly Insane

Registered
  14/05/2002
Points
  3497
23rd December, 2003 at 05:00:58 -

I win.

 
gone fishin'

Dreamsurfer



Registered
  20/12/2003
Points
  288
23rd December, 2003 at 06:04:46 -

Shen, thanks a million! It solved both my problems, and now I understand stuff better. Now I can experiment with stuff some more. And Andy, thanks for thinking along too.

Merry Christmas and stuff.

 
Gaming is fun... making others game is even more fun!

tdc052621



Registered
  20/12/2002
Points
  908
2nd January, 2004 at 17:09:08 -

scrolling is soooooooo easy

 
n/a
   

Post Reply



 



Advertisement

Worth A Click