Search found 1531 matches

by pgimeno
Wed Mar 20, 2019 6:49 am
Forum: Support and Development
Topic: Strange movements box2d[SOLVED]
Replies: 2
Views: 164

Re: Strange movements box2d

I can't tell for sure, but it seems to me that you need fixed rotation. Try self.collider:setFixedRotation(true). Alternatively, you can set the density of the melee fixture to 0 and call resetMassData on the body. My opinion is that the eccentricity of the melee sensor causes collisions to introduc...
by pgimeno
Sun Mar 17, 2019 8:10 pm
Forum: Support and Development
Topic: Android Scaling Issues
Replies: 1
Views: 92

Re: Android Scaling Issues

Does this work?

Code: Select all

wWidth, wHeight = lg.fromPixels(lg.getPixelDimensions())
by pgimeno
Sun Mar 17, 2019 10:42 am
Forum: General
Topic: Where I run the command "love --version"
Replies: 4
Views: 132

Re: Where I run the command "love --version"

Could you be more specific than "it's not working"? It works for me, so if it doesn't work for you, it would help to know what output you obtain when you do that.

My suspicion is that you don't have a path to the main executable.
by pgimeno
Sat Mar 16, 2019 12:53 pm
Forum: Support and Development
Topic: Understanding draw operations and transformations [SOLVED]
Replies: 7
Views: 241

Re: Understanding draw operations and transformations

Thank you, you guessed correctly. In my (simple) plan I had 80 cards drawn on the screen at the same time (every frame). I could bring that number down however as many of the cards are on top of one another in the stack. More importantly, I don't think many cards will change between frames, so why ...
by pgimeno
Sat Mar 16, 2019 1:26 am
Forum: Support and Development
Topic: Understanding draw operations and transformations [SOLVED]
Replies: 7
Views: 241

Re: Understanding draw operations and transformations

Thanks for the tip. I've begun trying to get my head around them but that drawback of not calling too often could be a challenge - individual components of the canvas may change frequently. Well, what I had in mind is that if you have 20 cards to draw and you need to switch canvas 20 times every fr...
by pgimeno
Fri Mar 15, 2019 11:22 pm
Forum: Games and Creations
Topic: Survive... ball?
Replies: 4
Views: 187

Re: Survive... ball?

Bananicorn wrote:
Fri Mar 15, 2019 7:42 pm
The player is practically only a point, so yeah I should make his collision work as a sphere instead.
I think an AABB would be good enough. I don't expect a perfect collision, just that the ball doesn't go through walls :)
by pgimeno
Fri Mar 15, 2019 7:27 pm
Forum: Support and Development
Topic: Understanding draw operations and transformations [SOLVED]
Replies: 7
Views: 241

Re: Understanding draw operations and transformations

Yeah, canvases are one way to go. The basic mechanism is as follows: - Activate the canvas ( love.graphics.setCanvas ) - Draw the card to the canvas as if you were drawing to the screen (l.g.printf, l.g.draw, etc) with normal ("alphamultiply") blending mode. - Deactivate the canvas (same call as abo...
by pgimeno
Fri Mar 15, 2019 4:39 pm
Forum: Games and Creations
Topic: Survive... ball?
Replies: 4
Views: 187

Re: Survive... ball?

Cool idea! I'm not a great player it seems, I just got 24 points. I think the ball needs a bit more thickness to not pass trough walls when going around corners. I had quite some trouble with the Linux packaging. It's gzipped twice, so the proper extension would be .tar.gz.gz, and the .tar contains ...
by pgimeno
Fri Mar 15, 2019 10:11 am
Forum: Games and Creations
Topic: Get mouse coordinates on a rotated "grid"
Replies: 10
Views: 379

Re: Get mouse coordinates on a rotated "grid"

Jasoco wrote:
Thu Mar 14, 2019 4:23 am
So how would I go about figuring out where the mouse is given that the corner shown above is 0,0 and the image's x and y offset is the position of the player? (The purple square)
You need to compensate for that too, by adding the player's position to the result.
by pgimeno
Fri Mar 15, 2019 12:00 am
Forum: General
Topic: Putting Objects Into Strings
Replies: 5
Views: 188

Re: Putting Objects Into Strings

After rereading the post, I think that the question isn't how to make sure that every object contains a tostring method so that all objects can be (manually) serialized, as I understood initially, but how to make sure that you never add a field to any object that can't be serialized (i.e. is userdat...