Rhythm is currently piecing together the list for this year's Wedge Award given annually. If you joined the community after November 25, 2016 and have either only come into DeadChat, posted in the Smeghead forum, or visited the Inc Discord, please send Rhythm a private message to let him know you are an active member of Inc and we can include you in our Wedge Award Eligible Nominees List. Check your profile for your join date before sending the PM. Thank You!

Post Reply 
Mega Man X's Camera/View System
Author Message
maskedbyte Offline
Regular
**
Registered

Posts: 27
Joined: Dec 2016
Reputation: 4

Post: #1
Mega Man X's Camera/View System
I've reverse-engineered Mega Man X's camera system, here are the details. Hopefully someone finds it useful.

View - A rectangle that defines the camera bounds (camera can't go outside of this rectangle, if it's the active view)

Trigger - A 16x16 object (often a lot of them are placed right next to eachother for the same view id) that sets the active view number.

When X's position is inside of a trigger, the active view is set to the view id defined in the trigger itself. Each trigger has a "time" value, this tells the game how long the camera should take to get from it's last position (the old view) to the correct position (centered on X, or at least not out of bounds). So if time is 40, it the camera will always reach it's desired position (usually just X's position) in 40 frames. So if X speeds up, the camera will speed up to compensate. No matter what, the camera will reach it's destination in EXACTLY the amount of frames specified by the time value.

And that's it. That's the camera system for Mega Man X. It's quite easy to implement with this information.

[Image: SgZehRu.png]
06-08-2017 10:02 PM
Find all posts by this user Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread:
1 Guest(s)

Return to TopReturn to Content