this post was submitted on 02 Feb 2024
73 points (95.1% liked)

Ask Lemmy

26903 readers
2089 users here now

A Fediverse community for open-ended, thought provoking questions

Please don't post about US Politics. If you need to do this, try [email protected]


Rules: (interactive)


1) Be nice and; have funDoxxing, trolling, sealioning, racism, and toxicity are not welcomed in AskLemmy. Remember what your mother said: if you can't say something nice, don't say anything at all. In addition, the site-wide Lemmy.world terms of service also apply here. Please familiarize yourself with them


2) All posts must end with a '?'This is sort of like Jeopardy. Please phrase all post titles in the form of a proper question ending with ?


3) No spamPlease do not flood the community with nonsense. Actual suspected spammers will be banned on site. No astroturfing.


4) NSFW is okay, within reasonJust remember to tag posts with either a content warning or a [NSFW] tag. Overtly sexual posts are not allowed, please direct them to either [email protected] or [email protected]. NSFW comments should be restricted to posts tagged [NSFW].


5) This is not a support community.
It is not a place for 'how do I?', type questions. If you have any questions regarding the site itself or would like to report a community, please direct them to Lemmy.world Support or email [email protected]. For other questions check our partnered communities list, or use the search function.


Reminder: The terms of service apply here too.

Partnered Communities:

Tech Support

No Stupid Questions

You Should Know

Reddit

Jokes

Ask Ouija


Logo design credit goes to: tubbadu


founded 1 year ago
MODERATORS
 

Dear mobile game devs. When I play games like that, I always wonder if it's the physics engine that's actually random and produces the result?

Or is the result calculated before the animation happens, and dictates the animation?

I've always wondered. I have some notion of programming, but from far back, and I've been scratching my head long enough about this.

Thanks in advance.

you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 6 points 9 months ago (7 children)

Physics engines are rarely deterministic, which means most of these games use what you would call the "animation deciding results"

It is very rare that it works the other way around contrary to what others have commented it is non trivial to make weighted deterministic random in this manner

While technically possible, only very specialised games with reasons good enough to budget the programming required will go the route you describe as "result calculated before the animation"

[–] [email protected] 2 points 9 months ago (1 children)

It’s magic. Just say it’s magic.

[–] [email protected] -1 points 9 months ago

It's really not! These days anyone can make games, I promise if you just have the drive, the tools available now are absolutely stellar in comparison to just a few years ago

load more comments (5 replies)