The Daily Click ::. Forums ::. Team Projects ::. Physics for MMF2 - A little help?
 

Post Reply  Post Oekaki 
 

Posted By Message

DeadmanDines

Best Article Writer

Registered
  27/04/2006
Points
  4758
4th February, 2007 at 10:14:32 -

I wonder if someone could possibly help with the physics side of a game I'm considering.

It's a sidescrolling Sh'mup. The objective is to carry out various missions in return for cash. Using the cash you can buy various kinds of chassis. Each chassis has mounting points available where you can bolt on different add-ons, like engines, guns, etc (you can have mounting points on the side of the ship, and mounting points on the top/bottom/front/back of the ship as well, depending on chassis).

Each possible add-on has a mass - and if it's an engine, it has thrust as well.


Ideally I want to bind these to the physics as much as possible. So bolting on very heavy guns will impair the acc/decceleration, and may require new up-thrust engines to counteract the weight.

If possible, I'd also like to be able to have moments of inertia (or whatever you call them). For example, having a heavy gun at the top will make the top want to lift if you brake too hard.


Could anyone help out with the formulae and application for this?

 
191 / 9999 * 7 + 191 * 7

Tim

I'm on here way too much

Registered
  25/08/2006
Points
  132

You've Been Circy'd!Clickzine StaffSilverNova MemberVIP MemberTurtle Power!Evil klikerWii OwnerHero of TimeGhostbuster!Pokemon Ball!
4th February, 2007 at 15:01:32 -

I'm gunna be really unhelpful at the moment and just say:

As far as the application goes, store everything such as deceleration and weights etc. into global values / variables instead of setting them to separate values each time. so you can add to and take from each value in loops etc. when movement (weight vs speed etc) is concerned

I'll be back later hope to help more then

 
http://www.SilverNova.co.uk


DeadmanDines

Best Article Writer

Registered
  27/04/2006
Points
  4758
4th February, 2007 at 17:23:40 -

The physics only really needs to apply to the main player's ship - enemy ships and stuff will be far simpler.

Just thought I'd mention that, cos it should mean the engine doesn't need to be as complicated as it might otherwise be.

Image Edited by the Author.

 
191 / 9999 * 7 + 191 * 7

Joe.H

Evil Faker

Registered
  19/08/2002
Points
  3305
4th February, 2007 at 19:54:21 -

for the overall system, F=ma.

I forgot all about how to do moments and shit. Damn, no wonder i didnt do so well on that exam

 
My signature is never too big!!!

axel

Crazy?

Registered
  05/02/2005
Points
  4766

Game of the Week WinnerYou've Been Circy'd!
5th February, 2007 at 06:04:33 -

Heh, I dunno. Maybe you could just tilt the ship depending on each add-on's position compared to the ship's hot-spot (or if you want to complicate things: its center of mass). Like, fastloop through all add-ons, compare their X and Y position with the ship's hot-spot, sum it up and divide it by something to get a nice small value, and add it to the ship's rotation angle.

I don't know if that made any sense, but at least I tried

 
n/a

DeadmanDines

Best Article Writer

Registered
  27/04/2006
Points
  4758
5th February, 2007 at 08:28:47 -

Rotation's gonna be another toughy - the two main problems are:

- How much to rotate by
- What point to rotate around

cos the hotspot can vary in different situations.

 
191 / 9999 * 7 + 191 * 7

Muz



Registered
  14/02/2002
Points
  6499

VIP MemberI'm on a BoatI am an April FoolHonored Admin Alumnus
5th February, 2007 at 21:57:18 -

Well, if you still need help, you can mail me. Hmm... I think you did, lol, or was it someone else. But one thing is clear though... rotation is a b*tch, especially with MMF's engine. I could probably do the engine for you, but I want some payment for my time .

I kinda forgot the formulae for it too... I had a nice functional physics engine, but never released it on the net because I was too lazy to make examples. Heck, I also have a nice, functional programming language engine I finished last week but didn't release it for the same reason.


 
Disclaimer: Any sarcasm in my posts will not be mentioned as that would ruin the purpose. It is assumed that the reader is intelligent enough to tell the difference between what is sarcasm and what is not.

Image
   

Post Reply



 



Advertisement

Worth A Click