You’re Thinking It Wrong
Well, maybe not wrong, but too much. That was my problem, overthinking. I'm sure it's not a novel lesson to be learned, but it's worth repeating that sometimes, keeping things simple is the only way to go, and trying to make things more complex than they need to be is not only a waste of time, but ultimately doesn't give you the result you want.
Unfortunately, programmers tend to be wired to overthink things, or at least to try to model reality where reality has no business.
I'm working on a game in my spare time, and it's a game that involves physics. Or rather, it involves the perception of physics-like interactions. We're talking bouncing, and more specifically: levers. When one object lands on one end of a first-class lever (aka. a see-saw), the object on the other end should experience forces proportional to the normal component of the force of the landing object, and the distance of both objects from the fulcrum of the lever.
In other words, if an object lands near the end of the lever, it should launch the object on the other end of the lever further than if it landed near the fulcrum.
So I got it into my head that I would be calculating the torque of the landing object, or maybe taking the forces on one side and the other, but force (and therefore, acceleration) is useless unless you know how long it acted for (acceleration is change in velocity over time, after all) so how long should I apply the force to the object I'm launching? And what about angular momentum, linear momentum's bastard cousin? Shouldn't momentum be conserved... or something? So does that mean that I need to apply not only an acceleration but also a starting launch velocity based on the angular momentum applied to the lever?
As you might be able to tell, it's been years since I took a physics class, and my understanding of this particular aspect was fuzzy at best even then.
My friend, who is also working on this game, pointed out that all of this was a waste of time, because it likely wouldn't be fun anyway, and what we really needed was a set of rules that was fun to play, not necessarily "physically accurate." I knew he was right, of course, but I wanted to do both, I wanted the simple tweakable system, and the realistic physical simulation, the latter probably more as a challenge to try to figure this stuff out again.
Ultimately, I realized that even if I did get a realistic physics simulation working, both of my objects would have about the same mass, and therefore, either one landing on the lever wouldn't do much at all to the other. It certainly wouldn't result in the kind of wacky catapultation that we were aiming for.
So instead of mucking with the math any longer, I sat down and wrote a reasonable approximation of what I wanted to happen, not what would happen in real life. I simply launched the object on the end of the lever at a constant velocity scaled by each object's distance from the fulcrum. Not only did this give a pretty satisfying feeling to the way objects are launched, but it also immediately exposed a bunch of fun values to tweak. Now we could tweak the constant launch velocity, what weight either object's distance played in the final velocity, as well as the simple fact that there was now a working function where any sort of formula could be devised if we found that this one didn't work for us.
In other words, when I stopped overthinking it, I was able to quickly and easily cook up a system that was a lot more customizable than boring old reality, and allowed us to focus on fun gameplay, rather than my pedantic obsession with simulating reality.
A simple but valuable lesson then: don't spend even a minute worrying about how to implement a gameplay system if that system's goal is not fun gameplay. If you're thinking about how to implement a gameplay system, think about how to implement it so that it feels fun, and is easy to tweak for yourself and other designers.
February 7th, 2011 - 23:55
Hey, toller Artikel, der RSS Link funzt leider net, aber trotzdem top Homepage!
February 8th, 2011 - 11:46
Hi, I just hopped over to your current blog by means of Bing. Not really some thing I might typically browse, but I loved your thoughts none the less. Thanks for producing some thing well worth reading.
February 8th, 2011 - 14:57
Nice post. I learn something more challenging on different blogs everyday. It will always be stimulating to read content from other writers and practice a little something from their store. I’d prefer to use some with the content on my blog whether you don’t mind. Natually I’ll give you a link on your web blog. Thanks for sharing.
February 8th, 2011 - 15:39
excellent article – looking forward to Part 2. -Genuine Collagen
February 10th, 2011 - 09:44
I am glad to be a visitant of this pure web blog ! , thankyou for this rare information! . -Lissie
February 10th, 2011 - 11:00
hi!,I like your writing very much! share we communicate more about your post on AOL? I need a specialist on this area to solve my problem. Maybe that’s you! Looking forward to see you.
February 11th, 2011 - 16:42
Good write-up, I’m normal visitor of one’s web site, maintain up the nice operate, and It is going to be a regular visitor for a long time.
February 11th, 2011 - 22:50
שטיחי ישראל – מכירתפרקטים ופריטים לעיצוב הדירה. חברה המתמחה יצור של פרקטים במבחר גדול של דוגמאות. כמו כן החברה מייצרת גם שטיחים
February 12th, 2011 - 09:41
I truly wanted to post a brief comment to appreciate you for some of the remarkable ways you are giving out on this site. My long internet look up has at the end of the day been recognized with reliable information to talk about with my companions. I ‘d declare that most of us visitors are undeniably fortunate to live in a wonderful place with very many awesome professionals with great techniques. I feel very much blessed to have encountered your entire web pages and look forward to some more fun times reading here. Thanks once again for all the details.
February 13th, 2011 - 04:36
you’re really a good webmaster. The site loading speed is incredible. It seems that you are doing any unique trick. In addition, The contents are masterwork. you’ve done a magnificent job on this topic!
February 14th, 2011 - 12:48
Thanks , I’ve recently been looking for information about this subject for ages and yours is the best I’ve discovered till now. But, what about the bottom line? Are you sure about the source?
February 16th, 2011 - 22:24
Sourpuss – Someone who is cranky
February 17th, 2011 - 07:50
You made some first rate factors there. I appeared on the web for the problem and located most individuals will go along with together with your website.
February 18th, 2011 - 21:58
Assisted me a lot, just what I was searching for : D.
February 19th, 2011 - 09:33
I in addition to my buddies happened to be digesting the excellent points located on your web site and then all of the sudden I had an awful feeling I never expressed respect to the site owner for them. All the men were absolutely thrilled to read through them and have now in truth been having fun with them. Thank you for actually being indeed kind and then for obtaining this kind of excellent useful guides most people are really desperate to know about. My honest regret for not expressing appreciation to earlier.
February 21st, 2011 - 07:10
I just could not depart your site before suggesting that I actually enjoyed the standard info a person provide for your visitors? Is gonna be back often to check up on new posts
February 21st, 2011 - 13:16
heievid uebiehei
February 22nd, 2011 - 00:58
you might have a terrific blog here! would you wish to make some invite posts on my weblog?
February 22nd, 2011 - 12:59
This is so great that I had to comment. I’m usually just a lurker, taking in knowledge and nodding my head in quiet approval at the good stuff…..this required written props. Theory rocks…thanks.
February 26th, 2011 - 00:12
I in addition to my buddies happened to be digesting the excellent points located on your web site and then all of the sudden I had an awful feeling I never expressed respect to the site owner for them. All the men were absolutely thrilled to read through them and have now in truth been having fun with them. Thank you for actually being indeed kind and then for obtaining this kind of excellent useful guides most people are really desperate to know about. My honest regret for not expressing appreciation to earlier.
February 27th, 2011 - 00:43
One more excelllent part of equipped posting, that it is beneficial to buy a little well written content material material internet based you would like to actually recognize the value of.
February 27th, 2011 - 02:53
You are my inhalation , I have few blogs and often run out from to post : (.
February 27th, 2011 - 06:35
Cindy Lew~ Remember the greatest gift is not found in a store nor under a tree but in the hearts of true friends.
February 28th, 2011 - 15:40
Can I make a suggestion? I believe youve obtained something good here. But what should you added a pair links to a page that backs up what youre saying? Or possibly you could give us one thing to look at, one thing that may connect what youre saying to one thing tangible? Only a suggestion. Anyway, in my language, there aren’t much good source like this.
February 28th, 2011 - 22:58
You’re 100% on the money! Most individuals I see view things in the short run and try to take each alternative to advertise or hype themselves instead of building credibility via helping others achieve their goals.
March 1st, 2011 - 17:47
Your place is valueble for me. Thanks!…
March 3rd, 2011 - 14:35
uevkdhdke iehkdndf
March 3rd, 2011 - 23:34
I just couldnt leave your website before telling you that we really enjoyed the quality information you offer to your visitors… Will be back often to check up on new posts
March 5th, 2011 - 21:10
After research a few of the blog posts in your web site now, and I really like your way of blogging. I bookmarked it to my bookmark web site checklist and shall be checking again soon. Pls take a look at my website as well and let me know what you think.
March 7th, 2011 - 17:56
Nice post. I learn something more challenging on different blogs everyday. It will always be stimulating to read content from other writers and practice a little something from their store. I’d prefer to use some with the content on my blog whether you don’t mind. Natually I’ll give you a link on your web blog. Thanks for sharing.
March 7th, 2011 - 22:20
I like the valuable information you provide in your articles. I’ll bookmark your blog and check again here frequently. I’m quite certain I will learn plenty of new stuff right here! Good luck for the next!
March 8th, 2011 - 04:16
There is noticeably a bundle to find out about this. I assume you made certain nice factors in options also.
March 9th, 2011 - 08:06
Excellent read, I just passed this onto a friend who was doing some research on that. And he just bought me lunch since I found it for him smile Thus let me rephrase that: Thank you for lunch!
March 13th, 2011 - 23:12
It’s laborious to find educated people on this matter, but you sound like you recognize what you’re speaking about! Thanks
March 18th, 2011 - 02:07
This actually answered my drawback, thanks!
March 18th, 2011 - 07:47
*An interesting discussion is worth comment. I think that you should write more on this topic, it might not be a taboo subject but generally people are not enough to speak on such topics. To the next. Cheers
March 19th, 2011 - 13:43
Hello, which blog engine software in your opinion is the easiest one to use? I’m thinking of starting with wordpress, you think that’s what I should do? Thank you.
March 20th, 2011 - 15:13
Please tell me that youre heading to keep this up! Its so superior and so important. I cant wait to read extra from you. I just really feel like you know so a lot and know how to make people listen to what you have to say. This blog is just too cool to be missed. Wonderful stuff, really. Please, PLEASE keep it up!
March 21st, 2011 - 17:28
hey, what blogging software in your opinion is the best? I’m thinking of starting with drupal, do you think that’s a good choice? Thank you.
March 22nd, 2011 - 04:52
*There is noticeably a bundle to know about this. I assume you made certain nice points in features also.
March 22nd, 2011 - 07:08
I’d should verify with you here. Which isn’t something I normally do! I take pleasure in studying a put up that may make individuals think. Additionally, thanks for allowing me to remark!