Search found 3582 matches

by pgimeno
Wed Dec 16, 2015 3:35 am
Forum: Support and Development
Topic: Drastic performance difference between different machines?
Replies: 5
Views: 2209

Re: Drastic performance difference between different machine

I'm wondering if the slow computers are using CPU-based GL (software rendering).
by pgimeno
Wed Dec 16, 2015 3:24 am
Forum: Support and Development
Topic: [SOLVED] Help with STI movement implementation
Replies: 6
Views: 3987

Re: Help with STI movement implementation

1) Implement jumping and fix the physics because I probably have it set up horribly. Right now my sprite just "flies" when you hold space bar. Tried to add mass to the sprite, but that just made things worse no matter what I set gravity to I couldn't get it to work right :P I haven't trie...
by pgimeno
Tue Dec 15, 2015 3:00 am
Forum: Support and Development
Topic: Threads not working?
Replies: 10
Views: 5005

Re: Threads not working?

pop() does not wait, but supply() does wait. I think what's happening is: 1. Your thread starts and does a pop(). Since there's nothing, it returns nil, executes the rest of the code, and the thread terminates. 2. When you press a key, the main application uses supply(), which waits for someone to r...
by pgimeno
Mon Dec 14, 2015 12:35 am
Forum: Support and Development
Topic: Why does this simple collision detection not work?
Replies: 2
Views: 1468

Re: Why does this simple collision detection not work?

A sign. The player.y + player.speed * dt inside the rectangle call of the Up direction should be a -.
by pgimeno
Wed Dec 09, 2015 6:37 am
Forum: General
Topic: Why do PNG images have so much "extra" data?
Replies: 14
Views: 4453

Re: Why do PNG images have so much "extra" data?

Weird. I tried with pngcrush and trimage, and both preserved alpha. I start to wonder if ImageOptim does something else, e.g. quantization (creating indexed images with palette) like other lossy compressors do, e.g. pngquant.
by pgimeno
Tue Dec 08, 2015 6:33 pm
Forum: Support and Development
Topic: Problem with math.max returning -0
Replies: 5
Views: 1947

Re: Problem with math.max returning -0

Yeah, there's a few rare cases where -0 makes a difference, apart form display. For example, math.atan2(0,-1) returns 3.1415926535898 but math.atan2(-0,-1) returns -3.1415926535898. But in general, it's nothing to worry about besides for display purposes. They compare as equal: assert(0==-0) doesn't...
by pgimeno
Tue Dec 08, 2015 4:14 pm
Forum: Support and Development
Topic: Problem with math.max returning -0
Replies: 5
Views: 1947

Re: Problem with math.max returning -0

math.abs(math.max...) should do the trick.
Edit: missed Beelz's edit, sorry.
by pgimeno
Tue Dec 08, 2015 1:01 am
Forum: Support and Development
Topic: Distance and Angle
Replies: 6
Views: 2501

Re: Distance and Angle

Yeah, that's where this bit comes into play:
pgimeno wrote:Edit2: Also, your sin/cos calls seem to be expecting a different convention for angle, as you're using sin(angle) for x and cos(-angle) for y, rather than the usual cos(angle),sin(angle).
by pgimeno
Mon Dec 07, 2015 4:02 pm
Forum: General
Topic: Why do PNG images have so much "extra" data?
Replies: 14
Views: 4453

Re: Why do PNG images have so much "extra" data?

There is a way to check if there's loss of quality. With GIMP: - open the two images in two different layers - set the top layer to Difference mode (that layer mode is the absolute value of the difference, so if they are not equal it will be nonzero) - merge down the layers or flatten image (the for...