The Daily Click ::. Forums ::. Klik Coding Help ::. vertical arcade space shooter Scrolling engine
 

Post Reply  Post Oekaki 
 

Posted By Message

Kokocipher



Registered
  03/06/2008
Points
  439
12th March, 2009 at 16:38:41 -

How does the arcade space shooter scrolling work? I tried with timing objects falling down to the frame, but it seems too ineffective when making complex levels.

 
http://blog.kokoarcade.com

OMC

What a goofball

Registered
  21/05/2007
Points
  3516

KlikCast Musician! Guy with a HatSomewhat CrazyARGH SignLikes TDCHas Donated, Thank You!Retired Admin
12th March, 2009 at 17:10:28 -

An alternative is to have a frame that is uberdyscoobus long vertically, and have a little black box that is unvisible during runtime that moves upward slowly. Always center the camera on that box, disable off-screen enemies, and voila!

 

  		
  		

Kokocipher



Registered
  03/06/2008
Points
  439
12th March, 2009 at 20:33:31 -

the problem with that is the player1 ship will always lag behind. What would you code so that the ship will have the same X,Y speed as the invisible box? Any examples?


Edited by Kokocipher

 
http://blog.kokoarcade.com

OMC

What a goofball

Registered
  21/05/2007
Points
  3516

KlikCast Musician! Guy with a HatSomewhat CrazyARGH SignLikes TDCHas Donated, Thank You!Retired Admin
12th March, 2009 at 21:04:29 -

I believe unchecking "follow the playfield" in the object properties should work.

 

  		
  		

Jon Lambert

Administrator
Vaporware Master

Registered
  19/12/2004
Points
  8235

VIP MemberWii OwnerTDC Chat Super UserI am an April FoolSSBB 3265-4741-0937ACCF 3051-1173-8012360 Owner
12th March, 2009 at 21:12:50 -


Originally Posted by OldManClayton
I believe unchecking "follow the playfield" in the object properties should work.


Yes, it does. I've done this before.

Also, so this is more substantial than just agreeing, you could also have an invisible counter or alterable value and have the scrolling set to that value at all times, and change the value to change where the screen is. You have it constantly adding one to the counter, or at a certain rate, so it scrolls that way. Although 1) that would work better if MMF2 allowed you to use a calculation for time-based events (which it doesn't) and 2) it's much more unnecessary code compared to the black box OldManClayton described.

When you have the object follow the playfield, you'll either have to code the black box to scroll further when you go past a certain point or code the ship so its movement is restricted when it reaches an edge of the screen. Of course, I don't know if you can (or will be able to at any time) move all around the screen or back and forth.

 
Sandwich Time!Whoo!

JoyCheck & KeyCheck Widgets
For easy implementation of customizable joystick and keyboard controls.
http://www.create-games.com/download.asp?id=8364

Kokocipher



Registered
  03/06/2008
Points
  439
13th March, 2009 at 18:58:05 -

scrolling works, but the ship won't follow the scrolling either with or without "follow the play field." And it kills the x2 window zoom. So I think it's best to just keep it the way it is, until someone comes up with a new extension

 
http://blog.kokoarcade.com

Mr G



Registered
  31/12/2008
Points
  178

VIP MemberPS3 OwnerI like Aliens!Attention GetterDos Rules!
13th March, 2009 at 20:26:06 -

I believe Shab had done something like that (open-source):
http://www.create-games.com/download.asp?id=7245


EDIT: Damn the link is dead Maybe pm Shab for the file? :/

Edited by Mr G

 
Image

http://create-games.com/project.asp?id=1549
   

Post Reply



 



Advertisement

Worth A Click