2,564 reputation
825
bio website
location Poland
age 25
visits member for 2 years, 10 months
seen Oct 8 at 2:02

Feb
3
comment Resolving a collision with forces
Personally, i'd suggest picking up a book on physics engines, at least read the first few chapters on Newtonian physics. Your assumptions are incorrect and trying to reply to this question would mean having to teach you basics of physics while trying to explain high level algorithms for solving collisions.
Feb
3
comment Resolving a collision with forces
Force does not equal acceleration, first of all. You need mass to calculate acceleration. If you're modifying positions to stop the two bodies from penetrating, you should use mass as well and move both bodies based on it. Applying a force equal to the penetration vector has no merit. Box2D is impulse based, it works on velocities directly, it may not be "correct", but it's good enough. Dealing with velocity changes in an impulse based engine is very simple, so could you specify if you definitively want a force based solution, or is the much simpler impulse based solution good enough.
Jan
28
comment 8-bit Game: To pre-scale images, or post scale my Cocos2d scene. Which is the better approach?
@smokris That's a good point, the answer would probably benefit if you included that in it.
Jan
27
comment How a “view” is handled in an Entity-Component based model?
@Yannbane No, sorry.
Jan
27
comment How a “view” is handled in an Entity-Component based model?
This question probably can't be answered in a reasonable manner, TBH. There's no point in comparing MVC and CBES, they're trying to achieve different goals using different means. Just read the T=Machine articles with a clear mind and forget about your background.
Jan
27
comment How do I calculate how an object will move from one point to another?
@jimmis98 If you subtract vector A from vector B, you get a new vector that's "going" from tip of A to the tip of B. It works for points just as well, because points and vectors are represented in the same way, where the tail is always the origin and the tip is represented by a point. It's indeed the best way to tackle the issue, the angle approach is unnecessarily convoluted and much more expensive. If you want to represent this with an equation, then if A + C = B, then B - A = C. Where A and B are your points/vectors and C is a vector "going" from A to B.
Jan
26
comment Slow Firefox Javascript Canvas Performance?
What's your performance on IE 9? Firefox has been notoriously slow for me too, while Chrome and IE are doing just fine.
Jan
26
comment 8-bit Game: To pre-scale images, or post scale my Cocos2d scene. Which is the better approach?
How is pushing pixels to an offscreen buffer better? You still have to display a full image as always, beside that interpolating textures is costly, it would be way better to scale the images once they're loaded and use the scaled ones with regular drawing. This is all completely unnecessary though, since it's way easier to just scale your images offline, either by using tools, most graphics editors will have that built in, or by using programs which support up-scaled pixel art creation like GrafX2 for example.
Jan
25
awarded  Popular Question
Jan
24
awarded  Popular Question
Jan
20
comment Compress / make Blender .obj file smaller
You will have to decompress the file in software before rendering no matter what, so i don't see a point to this TBH. What exactly causes the crash? Also, as Luis pointed out, a 2MB .obj file is fairly big for an iPhone app.
Jan
20
comment How should IDs be assigned in an entity component system?
It's expensive enough though. CBES shouldn't introduce overhead, this is why Artemis does all the tricks it does. If you're only going to use CBES for something like the player or a monster in an MMO, then sure it's probably fine to use a dictionary, but usually CBES is used for everything from a few massive buildings to lots of tiny particles. These things matter.
Jan
20
comment How should IDs be assigned in an entity component system?
TBH i don't see a point to this, you're introducing a lot of overhead for nothing. Hashing is an expensive operation, dictionaries are expensive data structures, strings are as well compared to integers. If you don't want to use arrays, it's better to just use a list.
Jan
20
answered How should IDs be assigned in an entity component system?
Jan
20
comment Is it possible to render part of the screen in different pixel density using openGL?
I doubt you can do that. You can cheat the looks of it by rendering to different frame buffers depending on the resolution you want and then putting the image together, but that's not an optimization. What you want is Level of Detail. Models with reduced polygon counts, mip-mapping, etc.
Jan
19
comment Canvas animation drops to 30fps every 3-4 seconds
@DanielSunYang I just saw the edit, so nevermind :)
Jan
19
comment Canvas animation drops to 30fps every 3-4 seconds
@DanielSunYang The demo you linked had a massive memory leak, i sincerely doubt that Chrome's the issue here. I'm just saying, if all you did was restart Chrome then your problem is not fixed.
Jan
19
comment OpenGL vs DirectX difference from Graphics card perspective?
@SRN It does in backwards compatibility mode. OpenGL 3.3 works on cards released before 2010 as well. If you want to use new features then of course it won't work.
Jan
19
revised Canvas animation drops to 30fps every 3-4 seconds
deleted 63 characters in body
Jan
19
answered OpenGL vs DirectX difference from Graphics card perspective?