# Unity advancing animation in fixed time-steps & frame-rate independence

This topic is 3371 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

hi, if you use fixed time steps in your game, whether with your own physics library or Intel Havok, nVidia PhysX, Bullet, ODE... you are most likely using this algorithm that deals with the maximum number of iterations in the following way: //-------------------------- *** ORIGINAL algo - capping the NUMBER
cnt= 0;
time= 10;

maxSteps= 5;

while(time > 0 && cnt < maxSteps)
{
step(); cnt++;
time--;
}

//--------------------------
Iterations, cnt= 5
"Time left", time= 5


most might recognize that the inner part of your 'stepSimulation' function resembles this algorithm, best described here: "Fix Your Timestep!" now, the problem with its practical implementation is in that you have to guess the NUMBER, and it manifests in two ways under certain circumstances: 1.) guess was too low for target CPU - "moon gravity effect" 2.) no matter how high - on some target 'slow enough CPU' it will "spiral to death" which is not a "real problem", because you can sort it out in design-time, but the peculiar thing is that it also seem to try to deal with the reminder of the time after the iterations have finished, with -interpolation- , which i think only introduces the errors and its not really necessary? //----------------------------------------------------------------------------------------- i propose two solutions, this practically solves both problems and removes any errors possibly introduced by "interpolation": //-------------------------- *** 1st algo - scaling the TIME "inside"
cnt= 0;
time= 10;

scaleFactor= 1;

while(time > 0)
{
step(); cnt++;
time--; time-= scaleFactor;
}

//--------------------------
Iterations, cnt= 5
"Time left", time= 0


//-------------------------- *** 2st algo - capping the TIME "outside"
cnt= 0;
time= 10;

if(time > 5) time= 5;

while(time > 0)
{
step(); cnt++;
time--;
}

//--------------------------
Iterations, cnt= 5
"Time left", time= 0


there is "a paper" on this and there you can find practical implementation and copy/paste source code to REPLACE your existing algorithm, so this can be easily tested in 5-10 minutes, and the difference is very obvious: "sampleTest.html" in essence, these are the solutions related to these discussions: http://www.gamedev.net/community/forums/..452753 http://www.gamedev.net/community/forums/..393475 what do you think? does this approach solves some of your problems? thank you, gameBoX Linux //----------------------------------------------------------------------------------------- ApochPiQ,
Quote:
 For better or worse, people are powerfully impacted by presentation.
- absolutely, how to make TAGS in this forum? are there buttons for TAGS like in other forums on the internet?
Quote:
 There are many places to submit such papers; a little bit of research can find several candidates for you, or you are free to ask where to publish it in a forum such as this one
- i cant find anything, can someone give me a name or link or organization or some address? [Edited by - abaraba1 on September 19, 2008 7:26:17 AM]

##### Share on other sites
Quote:
 - absolutely,how to make TAGS in this forum? are there buttons for TAGS like in other forums on the internet?
You can create source boxes using [source][/source]. To quote text, use [quote][/quote].

You can also create clickable links by using the HTML 'href' tag.

##### Share on other sites
thanks, its fixed.
(tho it took quite some time, basically whatever i write the next time i edit im confronted with something different, it breaks lines, inserts some symbols, preview is different to the final page, some stuff is automatically inserted in the final message like 'yahoo.com', which i didnt want ..but all that is not important so lets NOT talk about that, lets just talk about algorithms..)

i see you are the author of CML:
- "The CML (Configurable Math Library) is a free C++ math library for games and graphics." (http://cmldev.net/)

thats great!
you're perfect to make some comment on this algorithms because this is the very place where mathematics merge with graphics in the most literal way

- would you agree these algorithms address and solve the problem?
- whats your opinion on how it works in practice - visual appearance?

thank you

//-----------------------------------------------------------------------------------------
Quote:
 There are many places to submit such papers; a little bit of research can find several candidates for you, or you are free to ask where to publish it in a forum such as this one

- i cant find anything,
can someone give me a name or link or organization or some address?

[Edited by - abaraba1 on September 19, 2008 5:47:24 AM]

##### Share on other sites
Quote:
 Original post by abaraba1thanks, its fixed.i see you are the author of CML:
Co-author, actually (I worked with one other programmer on the project). But thanks for noticing :)
Quote:
 thats great!you're perfect to make some comment on this algorithms because this is the very place where mathematics merge with graphics in the most literal way
Unfortunately, physics (at this level at least) is not my area of expertise. There are plenty of folks here who have a lot of experience in that field though, so I imagine that now that the presentation is cleaned up a bit, you're likely to get some feedback on your ideas.

##### Share on other sites
>>"Unfortunately, physics (at this level at least) is not my area of expertise"

ok, fair enough,

* its about the Algorithm that distributes those animation FRAMES per second, in a REAL-TIME

it is a little 'while loop' and only 3-5 lines of code, BUT
- this is the very essence of computer ANIMATION and the core 'function call' of any real-time simulation / game, right?

it may be unfortunate circumstance that it ended up implemented in the Physics libraries, while it really belongs in the main program loop.

cheers

//-----------------------------------------------------------------------------
ApochPiQ,
Quote:
 Similarly, code/source tags are important as well. They make it easy and convenient to copy/paste code and test it out. Although you are correct that it is still possible to do so without proper tagging, it's a pain.

>>"you can go on live your whole life thinking the earth is flat if you like, its not "important" information if you don't care about it, but if you use it in your line of work.. there was no point in arguing if you were not interested enough to pursue the matter for your own interests"

i find its actually easier to copy/paste without tagging

[Edited by - abaraba1 on September 20, 2008 2:53:05 PM]

##### Share on other sites
Quote:
 There are many places to submit such papers; a little bit of research can find several candidates for you, or you are free to ask where to publish it in a forum such as this one

ok, i got some answers to this - thank you

SIGGRAPH:
http://www.siggraph.org/publications/instructions

but it doesnt seem to be very simple procedure,
- and would anyone go on to submit this without checking it out with general public first?
- i mean, i dont even know if this is some misunderstanding, i dont know if im right or wrong?
- simply, i cant be sure, and i can not go on claiming something if i cant confirm my results and my conclusions, right?

would anyone care to discuss this and actually confirm OR prove it wrong, im happy with either.

thank you

##### Share on other sites
In reality, your time values will not be nice, neat integers - most usually they will be very small float values. In a system updating in sync with the vertical retrace at 60 fps, the time values will be around 0.016f but will fluctuate around that value quite significantly.

Both of your solutions above appear to me to lead to the same problem that interpolation is introduced in order to solve - once your physics updates go out of sync with the graphics update, the display will begin to stutter as you will be doing, say, three updates one frame, then one the next, then three the next etc.

I haven't tested your algorithms to be fair, but from looking at the code they seem to be pretty much equivalent to just ignoring the accumulator when rendering. Both algorithms do less physics steps within the timeframe than is actually correct.

Interpolation doesn't introduce errors if done correctly, it just displays your graphics 0 to 1 frame behind the simulation.

##### Share on other sites
>>"Both of your solutions above appear.."

sorry, you lost me right there,
we cant discuss this if all you have to offer is your guesses and assumptions..

basically,
on all that what you said, im telling you - you're wrong

##### Share on other sites
Quote:
 Original post by abaraba1basically, on all that what you said, im telling you - you're wrong

First algorithm consumes one time unit per call to step(). Remaining time units are propagated to next frame and interpolation used to "smooth out" visual results.

Both your algorithms consume 2 time units per call to step(). Therefore though 10 units have passed in actual time, only 5 time-units-worth of simulation has taken place.

Therefore in your example, simulation is running at half speed.

Also, regardless of whether you tell me I am wrong or not, there is now the capacity with more realistic values (in particular, different values for time each frame and a value for time that is not evenly divisible by the physics step) for the physics and rendering to fall out of sync so that you get, say, two steps one frame and one the next. This is what causes the visual stuttering that interpolation solves.

You keep referring to errors introduced by interpolation - what errors do you think interpolation introduces? I have two current projects that use the method outlined at gaffer.org and I can assure you that interpolation is not introducing any errors.

Since you are modifying Bullet code in your paper, may I suggest you post something about your discovery on the Bullet forums? Since the lead on that project worked on the Havok engine, I assume he has a fair idea what he is talking about.

[Edited by - EasilyConfused on September 22, 2008 7:07:10 AM]

##### Share on other sites
Quote:
 Original post by abaraba1>>"Both of your solutions above appear.."sorry, you lost me right there,we cant discuss this if all you have to offer is your guesses and assumptions..basically, on all that what you said, im telling you - you're wrong

It's a shame you're taking this attitude, as there are many experienced people on this site that could have given you constructive feedback on this issue. It's a well trodden path that anyone who has done any game physics has 'solved' many times before. Unfortunetly from your posts there seems little point in discussing this with you.

Also I noticed this on the page you linked to...

Quote:
 (R) All rights reserved, dont you dare use this code unless you can prove to me you're human being. Use of this algorithm in commercial products without my permission will be cheerfully taken to court.

A few points about this. Firstly (R) is a registered trade mark sign. Do you have a registered trade mark? If so what is it? and what does that have to do with 'your' algorithm? Secondly, what ownership claims do you have for 'your' algorithm? You'd need a patent to prevent commercial use (in countries that allow software patents); do you have a patent for this?

Obviously those are retorical questions, as clearly you don't, but my point is that you are way out of your depth here, making wild claims about things you seem to know little about. I would suggest you take a different, less agressive approach if you really want to find solutions to the problems you have presented.

[Edited by - WillC on September 22, 2008 7:24:07 AM]

##### Share on other sites
Quote:
 Original post by abaraba1>>"Both of your solutions above appear.."sorry, you lost me right there,we cant discuss this if all you have to offer is your guesses and assumptions..basically, on all that what you said, im telling you - you're wrong

abaraba1 - lose the attitude. You should have learned from the responses to your first thread on this.

##### Share on other sites
>"lose the attitude"

what do you mean?
i simply had enough of people putting me down without even thinking!

..and what if turns out that the whole world was wrong?
..maybe i was supposed to give up from telling this to anyone?

because, for trying to tell you this, i got nothing but shit in return

thank you

##### Share on other sites
EasilyConfused,
>>"You keep referring to errors introduced by interpolation - what errors do you think interpolation introduces? I have two current projects that use the method outlined at gaffer.org and I can assure you that interpolation is not introducing any errors."

- and i can assure you that you're just lucky because your deltaTime < fixedTimeStep

>>"...what errors do you think interpolation introduces?"

- and what do you think interpolation accomplishes?
(whatever your answers is, i can tell you it works better WITHOUT IT)

WillC,

- thats right,
but understanding of that one is not a requirement for 'this' algorithm to work.

>>"Obviously those are retorical questions.."

- rHetorical, eh?
if you continue to pretend that you know - you will never learn.

//-------------------------------------------------------------------

you should all understand,
- i made it very EASY for you to test it
- all you said so far are your *ASSUMPTIONS*

stop wasting more of my time, behave like scientist should - TEST IT!

Quote:
 would anyone care to discuss this and actually confirm OR prove it wrong, im happy with either.

so, if you don't like me,
you dont need to say anything, this is a HARD-TALK - facts only, please!

[Edited by - abaraba1 on September 22, 2008 8:56:13 PM]

##### Share on other sites
let me just say that, while in the loop, we doing nothing more but this:

a.) calculate new positions
b.) render straight after, as soon as we can
->REPEAT

there is no magic here, its simple as that,
you simply just have to forget about the "interpolation" ..thats it
..and theres that bit about Max/Min number of iterations, but that has to do with 'accumulator' and 'temporal-interpolation'

..maybe its worth noting that you always look at the computer animation in - the past- ..so to say - you can not really 'keep-up' with a real time, you're always lag behind as much as it was last 'deltaTime', but this is important as much as it is that your wrist watch is off from the "real-time" a few seconds

Unfortunately, no one can be told what the 'temporal-interpolation' is. You have to see it for yourself.
This is your last chance. After this, there is no turning back.

##### Share on other sites
Quote:
 Original post by abaraba1WillC,>>"A few points about this. Firstly (R) is a registered trade mark sign"- thats right,but understanding of that one is not a requirement for 'this' algorithm to work. >>"Obviously those are retorical questions.."- rHetorical, eh? if you continue to pretend that you know - you will never learn.

I think you're missing Will's point. He's not commenting on your algorithm, but on legal issues. (R) means registed trademark. You probably meant (C)opyright. But all a copyright gives you is legal protection if someone copies your idea verbatim (given your rather free form grammar, I don't think you have to worry about that :)). You need a software patent to protect the idea itself. Which, in the US anyway, isn't too hard to obtain, but it is expensive. I didn't look at your algorithm enough to say if it's patentable or not, but that's the only way to protect it. Other than a "please don't copy this idea, pretty please" clause ;)

##### Share on other sites
Numsgil,

ok, let me point all of the problems again, this time with your message as practical example:

problem 1.)
>>"He's not commenting on your algorithm.."

- my question is pretty clear, and for such important and simple algorithm i find it strange indeed that no one can offer any reasonable comment

problem 2.)
>>"You probably meant (C)opyright."

- you making me repeat myself

problem 3.)
>>"You need a software patent to protect the idea itself. "
>>"Which, in the US anyway,isn't too hard to obtain, but it is expensive."

- why do you think i need such information?

problem 4.)
>>"I didn't look at your algorithm enough.."

- so, how then do you find appropriate to make any comments about it?

##### Share on other sites

Since you got me all riled up, I spent some effort to see what your algorithm is talking about. Method 1 and 2 are essentially identical since you're calling the step() function the same number of times, so my comments relate to both methods.

You're calling a step() function with no arguments. From which I can conclude that you're using a fixed timestep irregardless of the frame rate. In essence, during times of potential infinite spiraling, you just simulate 50ms instead of the proper 150ms (or whatever) and call it a day.

Meaning that the game will simulate smoothly but in slow motion. Sort of like what the old NES games did. I did something very similar (I frame locked the graphics to N physics updates) for Darwinbots, where the simulation slowdown doesn't matter since users don't interact with it in real time anyway.

It's a reasonable hack for a game, but it still doesn't address the core concern for all cases. Imagine the case of a networked game where we're just sending deltas every frame. If I have a faster computer, I could be several seconds or even minutes ahead of you in game time if/when you experience lag. I don't even want to think how screwed up the game would get in a state like that.

Another solution I played with but didn't get very far with was a stepless physics engine. Instead of stepping at discrete time intervals, I tried solving the equations of motion analytically and solving each collision at the exact moment it occurred between two bodies. After a collision you'd get new equations of motion and continue the simulation. It worked as long as there wasn't any rotation (since it's hard to solve object to object collisions involving rotations in an analytical way) and no drag (drag made the motion equations have exponent terms, which made solving the collision equations... difficult). It's still possible to go in to an infinite spiral, though, if you have enough objects and not enough CPU power. It's just less likely.

[Edited by - Numsgil on September 22, 2008 10:13:49 PM]

##### Share on other sites
>>"I'm not commenting on your algorithm. "

this is very, very concrete and specific algorithm,
it is about complete replacement that solves THREE somewhat different problems that might have been affecting your game in possibly unknown ways

you simply have to REPLACE the old one with any of the two new ones and report how it works, if you will

i ask nothing more then you to put some effort into it if you want to discuss it, if you are not interested enough to do that, then please do not waste my time

>>"I sense you still do not understand this.."

- it is not required from you to be sensing anything, on the contrary i ask you to turn your brains on

i mean, it only takes about FIVE MINUTES to test it ..i don't understand, if you're too lazy for that, then just leave me be

thanks

//----------------------------------------------------------
i believe every criticism is constructive as long as you state your reasoning or otherwise show the logic of your conclusion, i even believe you can go as far and say that im stupid as long as you can explain it or at least try to reason your opinion with some arguments. ASSUMPTION is NOT ARGUMENT. Assumption is mother of all fukups.

[Edited by - abaraba1 on September 22, 2008 11:38:06 PM]

##### Share on other sites
Quote:
 Original post by abaraba1- and i can assure you that you're just lucky because your deltaTime < fixedTimeStep

The following from gaffer.org:

Quote:
 From Fix Your TimestepThis code handles both undersampling and oversampling correctly which very is important. Undersampling is where the render framerate is lower that the physics framerate, eg. 20fps display when physics runs at 60fps. Oversampling is where you have an insanely high framerate (or you are viewing physics in slow motion) where one physics frame accumulates over several display updates. Note that the “sampling” here applies not to the physics steps, but to the renderer sampling state and drawing it on the screen.

In other words, the algorithm handles both the under- and over-sampling cases equally well as if the update time is less that the physics timestep, one physics step is accumulated over two frames.

Quote:
 - and what do you think interpolation accomplishes?(whatever your answers is, i can tell you it works better WITHOUT IT)

Third try [smile].

When your physics and rendering rates fall out of sync, you can get a situation where you get a repeating pattern of, say, two steps one frame, one the next, two next frame, one the next etc.

This leads to a visual stuttering that can look jerky. It has no actual affect on simulation speed or stability.

Interpolation addresses just this issue. By rendering a frame that is technically in between the last frame and current frame, based on using a scaling factor based on the remainder left in the accumulator, this "smooths" the motion and helps remove the stuttering.

I'm not trying to convince you - just trying to make sure this thread has correct information in for other browsers.

[EDIT] I'd suggest this thread is closed. I'll be taking no further part in it as I have serious concerns about the OP.

[Edited by - EasilyConfused on September 23, 2008 2:33:08 AM]

##### Share on other sites
EasilyConfused,

>>"The following from gaffer.org:"

- ok, this time you have an argument, but its not YOURS

in other words,
you simply just choose to believe that instead of your own conclusions, what im telling you is: - dont believe, of course not! You simply have to *SEE* it for *YOURSELF*

[Homer Simpson's comment on religion: -"..and all they ask for is a little bit of blind fate"]

you made me repeat myself, but i dont mind as long as there is some argument there,
and i got used to it in the last TWO MONTHS.. basically i now mostly just copy/paste what i wrote a long time ago to many, many other people before

//=====================================================================
you think im crazy and arrogant?
can you explain why they spread wrong information on the PUBLIC FORUM, then get angry when i interfere to explain misunderstanding and DELETE most of the messages that explain whats going on..

ok forget everything,
how is this possible - they simply deleted last part of this tread after i was being called "idiot" and got attacked by probably same person with multiple nick-names.. what in the world is going on?

(as S.H.)
http://www.geocities.com/ze_aks/bullet/bn1-viewtopic.php.htm
http://www.geocities.com/ze_aks/bullet/bn2-viewtopic.php.htm

and here is original if there at all:
http://www.bulletphysics.com/Bullet/phpBB3/viewtopic.php?f=9&t=2638

maybe i should have mentioned earlier, i didnt want to, but you pulled it - gaffer actually deleted the whole conversation where he goes on and on how i "do not understand", then at the end... he just deleted everything.. and what you quoted me is WRONG, but dont believe me, of course not! ..see for yourself, if you will

crazy, eh?
..you've seen nothing yet,
and actually i hope you dont pull any more of these out..

be HONEST, tell me then,
on whose side do you think i am? and what do you think i want from you?

[Edited by - abaraba1 on September 23, 2008 2:37:28 AM]

##### Share on other sites
Quote:

You didn't read my whole post. That makes me mad (<-- this is an understatement). Go actually read my post in its entirety, instead of just the first sentence.

##### Share on other sites
Numsgil,

the MAIN ISSUE, my ORIGINAL QUESTION:

- would you agree these algorithms address and solve the mentioned problems? (YES/NO)
- whats your opinion on how it works in practice - visual appearance? (DESCRIBE)

thank you

##### Share on other sites
EasilyConfused,
>>"[EDIT] I'd suggest this thread is closed. I'll be taking no further part in it as I have serious concerns about the OP."

do i understand you correctly, i fix three bugs for you and you poke my eye and close the thread?

you want to close my thread because im telling you the TRUTH?

forget the algorithm, ok,
does everyone here understand that im talking about FREEDOM, freedom of information? i wanted nothing but to help, and in return people came one after another just to try and put me down without even thinking or looking at it. When they realised they were wrong they just stared deleting my messages. Intel Havok & nVidia PhysX still silent about the whole thing...

do you know how many times i gave up? do you realize how many times i was sent in the complete opposite direction? do you have any idea how much time it took to realize all this, implement, prepare and get it ready so it can be easily tested ... and you want to close my thread, yet again

how is this possible?

[Edited by - abaraba1 on September 23, 2008 6:57:56 AM]

##### Share on other sites
Quote:
 Original post by abaraba1does everyone here understand that im talking about FREEDOM, freedom of information?

Yes, I understand that. So I'm wondering why you don't grant the same freedom to EasilyConfused and WillC. They provided you with informations, and you told them to shut up. And what kind of freedom do you mean when you simultaneously copyright your information?

Quote:
 Original post by abaraba1i wanted nothing but to help, and in return people came one after another just to try and put me down ...

Has jyk put you down? Has EasilyConfused put you down? No, they haven't. EasilyConfused has validly hinted at issues with your algorithm, but you can't or else don't want to understand him. Instead you rate criticism as "putting down", although you've explicitely asked for.

Quote:
 Original post by abaraba1...without even thinking or looking at it.

Quote:
 Original post by abaraba1do you know how many times i gave up? do you realize how many times i was sent in the complete opposite direction? do you have any idea how much time it took to realize all this, implement, prepare and get it ready so it can be easily tested

No, I haven't. But what should I do? Should I pity you? Perhaps, but your attitudes avoid this so far. Should I admire you? No, because your algorithms are not what I'm after. So, calm down, return to the intention of the thread, and accept that people have a meaning that differs from yours. If you think they are wrong then discuss or ignore, but don't put them down.

##### Share on other sites
haegarr,

you are free to clog my thread as much as you would like me to clog your

>>"No, I haven't. But what should I do? Should I pity you? Perhaps, but your attitudes avoid this so far. Should I admire you?"

- no, you should have realized that has nothing to do with me, but with -wrong information-

>>"No, because your algorithms are not what I'm after.."

- hm, you dont care about all this stuff and yet you made all this effort to explain how you feel about all it, interesting..

i hope its not too much to ask that i actually get answer to my question, instead of everyone having some completely irrelevant questions for me? i can try to explain anything you want, but i cant argue with your guesses and assumptions, so this thread is about this:

- would you agree these algorithms address and solve the mentioned problems? (YES/NO)
- whats your opinion on how it works in practice - visual appearance? (DESCRIBE)

for any other discussion not related to this, please start your own thread, and please leave me be if this is of no interest to you

[Edited by - abaraba1 on September 23, 2008 8:38:24 AM]

##### Share on other sites

This topic is 3371 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

This topic is now closed to further replies.

• ### Forum Statistics

• Total Topics
628728
• Total Posts
2984418
• ### Similar Content

• THE PROJECT

INT is a 3D Sci-fi RPG with a strong emphasis on story, role playing, and innovative RPG features such as randomized companions. The focus is on the journey through a war-torn world with fast-paced combat against hordes of enemies. The player must accomplish quests like a traditional RPG, complete objectives, and meet lively crew members who will aid in the player's survival. Throughout the game you can side and complete missions through criminal cartels, and the two major combatants, the UCE and ACP, of the Interstellar Civil War.
Please note that all of our current positions are remote work. You will not be required to travel.
Talent Needed

Unity Engine Programmer
3D Animator
We have made great strides in the year 2017! INT has received a comprehensive face-lift compared to the start of the year. We look forward to a productive, fruitful year 2018!
Revenue-Share
This is the perfect opportunity to get into the game development industry. Being an Indie team we do not have the creative restrictions often imposed by publishers or other third parties. We are extremely conscientious of our work and continuously uphold a high level of quality throughout our project.
We are unable to offer wages or per-item payments at this time. However revenue-sharing from crowd-funding is offered to team members who contribute 15-20 hours per week to company projects, as well as maintain constant communication and adhere to deadlines. Currently the crowd-funding campaign is scheduled for the year 2018. Your understanding is dearly appreciated.

Thank you for your time! We look forward to hearing from you!

John Shen
Starboard Games LLC

• Energy particles being harnessed by collection multi-hedron energy matrix. Whuuuttt?
Love it :)
• By AndySv
Total Music Collection (http://u3d.as/Pxo)   THE COLLECTION CONTAINS:   Mega Game Music Collection   Universal Music Collection   Huge library of high quality music for any project! All at an incredibly low price!   - 2,5GB of high quality audio - 100+ different music tracks - Loop and short versions   Action, fantasy, casual, horror, puzzle, epic, dramatic, romantic, positive, inspiring, motivational and more!
• By Dafu
FES Retro Game Framework is now available on the Unity Asset Store for your kind consideration!
FES was born when I set out to start a retro pixel game project. I was looking around for an engine to try next. I tried a number of things, from GameMaker, to Fantasy Consoles, to MonoGame and Godot and then ended up back at Unity. Unity is just unbeatable in it's cross-platform support, and ease of deployment, but it sure as heck gets in the way of proper retro pixel games!
So I poured over the Unity pipeline and found the lowest levels I could tie into and bring up a new retro game engine inside of Unity, but with a completely different source-code-only, classic game-loop retro blitting and bleeping API. Months of polishing and tweaking later I ended up with FES.
Some FES features:
Pixel perfect rendering RGB and Indexed color mode, with palette swapping support Primitive shape rendering, lines, rectangles, ellipses, pixels Multi-layered tilemaps with TMX file support Offscreen rendering Text rendering, with text alignment, overflow settings, and custom pixel font support Clipping Sound and Music APIs Simplified Input handling Wide pixel support (think Atari 2600) Post processing and transition effects, such as scanlines, screen wipes, screen shake, fade, pixelate and more Deploy to all Unity supported platforms I've put in lots of hours into a very detail documentation, you can flip through it here to get an better glimpse at the features and general overview: http://www.pixeltrollgames.com/fes/docs/index.html
FES is carefully designed and well optimized (see live stress test demo below). Internally it uses batching, it chunks tilemaps, is careful about memory allocations, and tries to be smart about any heavy operations.
Please have a quick look at the screenshots and live demos below and let me know what you think! I'd love to hear some opinions, feedback and questions!
I hope I've tickled your retro feels!

More images at: https://imgur.com/a/LFMAc
Live demo feature reel: https://simmer.io/@Dafu/fes
Live blitting stress test: https://simmer.io/@Dafu/fes-drawstress
Unity Asset Store: https://www.assetstore.unity3d.com/#!/content/102064

View full story
• By Dafu
FES Retro Game Framework is now available on the Unity Asset Store for your kind consideration!
FES was born when I set out to start a retro pixel game project. I was looking around for an engine to try next. I tried a number of things, from GameMaker, to Fantasy Consoles, to MonoGame and Godot and then ended up back at Unity. Unity is just unbeatable in it's cross-platform support, and ease of deployment, but it sure as heck gets in the way of proper retro pixel games!
So I poured over the Unity pipeline and found the lowest levels I could tie into and bring up a new retro game engine inside of Unity, but with a completely different source-code-only, classic game-loop retro blitting and bleeping API. Months of polishing and tweaking later I ended up with FES.
Some FES features:
Pixel perfect rendering RGB and Indexed color mode, with palette swapping support Primitive shape rendering, lines, rectangles, ellipses, pixels Multi-layered tilemaps with TMX file support Offscreen rendering Text rendering, with text alignment, overflow settings, and custom pixel font support Clipping Sound and Music APIs Simplified Input handling Wide pixel support (think Atari 2600) Post processing and transition effects, such as scanlines, screen wipes, screen shake, fade, pixelate and more Deploy to all Unity supported platforms I've put in lots of hours into a very detail documentation, you can flip through it here to get an better glimpse at the features and general overview: http://www.pixeltrollgames.com/fes/docs/index.html
FES is carefully designed and well optimized (see live stress test demo below). Internally it uses batching, it chunks tilemaps, is careful about memory allocations, and tries to be smart about any heavy operations.
Please have a quick look at the screenshots and live demos below and let me know what you think! I'd love to hear some opinions, feedback and questions!
I hope I've tickled your retro feels!

More images at: https://imgur.com/a/LFMAc
Live demo feature reel: https://simmer.io/@Dafu/fes
Live blitting stress test: https://simmer.io/@Dafu/fes-drawstress
Unity Asset Store: https://www.assetstore.unity3d.com/#!/content/102064

• 25
• 11
• 10
• 16
• 14