Those physics

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
User avatar
Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

Re: Those physics

Post by Robin »

It's not very hard to do. The hardest part is figuring out which data structures and algorithms to use, and I'm sure the LÖVE CLUB can help you on any step of the way. I think quadtrees are your best bet here.
Help us help you: attach a .love.
User avatar
kikito
Inner party member
Posts: 3153
Joined: Sat Oct 03, 2009 5:22 pm
Location: Madrid, Spain
Contact:

Re: Those physics

Post by kikito »

Jasoco wrote:Edit: One day SOMEONE here will make a working side-scroller engine framework and offer it as an example to Löve users so we can stop getting these same questions every week.
I estimate this to happen around mid-October.

EDIT:
Robin wrote:I think quadtrees are your best bet here.
I happen to have implemented one of those (It needs middleclass).
When I write def I mean function.
User avatar
Mizore
Prole
Posts: 6
Joined: Wed Aug 11, 2010 5:56 pm

Re: Those physics

Post by Mizore »

bartbes wrote:Instead of correcting the x and y values, use the offsets to set the origin to center (ox and oy). (it'll fix rotation)
And how could i do that?
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: Those physics

Post by bartbes »

Using the ox and oy parameters to love.graphics.draw.
User avatar
Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

Re: Those physics

Post by Robin »

bartbes wrote:Using the ox and oy parameters to love.graphics.draw.
Documentation.
Help us help you: attach a .love.
User avatar
Mizore
Prole
Posts: 6
Joined: Wed Aug 11, 2010 5:56 pm

Re: Those physics

Post by Mizore »

bartbes wrote:Using the ox and oy parameters to love.graphics.draw.
Fixed, thank you.
Geti
Party member
Posts: 112
Joined: Tue Oct 20, 2009 6:38 am

Re: Those physics

Post by Geti »

btw: http://love2d.org/forums/viewtopic.php?f=5&t=1560
box2D can be used for platformers, though doing that game made me angry at the inability to edit maximum body constants and the like (turns out you need a heap of shapes for tiles, even when the shapes are turned off on tiles that don't have exposed edges. Also, it would be a lot nicer if the game bound shape:destroy() to a function that made it miss all the coming collisions and destroyed it immediately without causing a freaking segfault <_<
User avatar
Taehl
Dreaming in associative arrays
Posts: 1025
Joined: Mon Jan 11, 2010 5:07 am
Location: CA, USA
Contact:

Re: Those physics

Post by Taehl »

Jasoco wrote:Yeah. I hate to say it... again... but 2d side-scrollers and Physics just don't work together.
*Feeling somewhat slighted* Hey, wait a minute...
Earliest Love2D supporter who can't Love anymore. Let me disable pixel shaders if I don't use them, dammit!
Lenovo Thinkpad X60 Tablet, built like a tank. But not fancy enough for Love2D 0.10.0+.
User avatar
Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

Re: Those physics

Post by Robin »

Taehl wrote:*Feeling somewhat slighted* Hey, wait a minute...
Yeah, and that was fun and all, but not really a side scroller. It didn't feel that way anyway.
Geti wrote:btw: http://love2d.org/forums/viewtopic.php?f=5&t=1560
box2D can be used for platformers,
Yes, much in the same way a tank can be used to go to school every day, or a nuclear bomb can be used to clean your garage. ;)
Help us help you: attach a .love.
User avatar
VideroBoy
Party member
Posts: 102
Joined: Wed Mar 31, 2010 6:12 pm
Location: Canada

Re: Those physics

Post by VideroBoy »

Just to play devil's advocate, but what about Gish? That game was pretty physics-based but still fun.
Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests