Static Platform Under Floating Point Movement?
I've been doing some tests with custom movement with floats, and I was wondering if it's possible to make a custom/static platform engine using floating point movements?
A while back ago, someone sent me an example of how floating point movement that works under simple left/right and up/down movement. In this code, it doesn't do 'set position of active to 'X(active)+1.5)'. it apparently sets value A and B to the position of active from the start of frame, then adds or subtracts position by 1.5. Apparently, these are defined completely different in MMF2's engine.
I am wondering if this can be used to create a custom/static platform movement under #'s with floats included? I would imagine there would be some problem with y gravity under floats?
Re: Static Platform Under Floating Point Movement?
Nifflas made a widget to do this pretty well, you should have a look ;)
Re: Static Platform Under Floating Point Movement?
Question.
Is there an alternative method besides using these events
Start of frame - Set fxpos("active") to X("Active")
always - set X position of ("active") to fxpos("active")'
Is this the only possible method for using floats for the moment?
I just don't understand that when using an event
'user presses right - Set X("Active")' to X("Active") + 2.5'
while + 2.5 seems to round either up or down I take it? Does it really round here, or is this some sort of bug in the offset positioning system?
Re: Static Platform Under Floating Point Movement?
You can only set an object's position to an integer so it rounds, however if you use a variable then yo can set that variable to anything you want and it will only be rounded on positioning.
Re: Static Platform Under Floating Point Movement?
Quote:
Originally Posted by _LB
You can only set an object's position to an integer so it rounds, however if you use a variable then yo can set that variable to anything you want and it will only be rounded on positioning.
That's kind of the same thing though.
In either case, both cases get rounded to a whole number. Why is this? If alterable values are used, it should be able to use floats as necessary. How is it that the position gets rounded to a whole number when a float is used on an alterable value??
Re: Static Platform Under Floating Point Movement?
It doesn't, you're not understanding me. Positions can only be whole numbers, alterables can be floats. When you set an object's position to an alterable value that's a float, it rounds the number to a whole number for the position, but leaves the alterable value the same.
Alt Val = 1.2345
Set Object Position to Alt Val
Object Position = 1
Alt Val still = 1.2345
See how it works? The point is that you can move an object slower than one pixel at a time without any crazy delay systems.
Re: Static Platform Under Floating Point Movement?
But the point remains the same. Even though the Alterable value is still set as a float, the position of the active object is positioned at a whole number value. Why is this?
If the alterable value has a float, and the event says 'Set X position of ("Active") to X("Active")+Alt. Value A', and Alt.Value A is 1.25, It SHOULD be set to its current position with the addition of Alt. Value A, which would be 1.25, WITHOUT it rounding.
Re: Static Platform Under Floating Point Movement?
MMF3 will be able to handle floating point positions, but MMF2 cannot.
Re: Static Platform Under Floating Point Movement?
Alright. Any news/info of a release date for MMF3? And is this the same MMF3 software that is going to have that Flash exporter?
Will MMF2 owners have a discount to upgrade from MMF2 to MMF3, or is it going to be full price to all users?
Re: Static Platform Under Floating Point Movement?
MMF3 is a long way off, and most likely just like from 1 to 2, you will be able to get a discount from 2 to 3. Flash export will be for MMF2.