2,485 reputation
722
bio website
location Poland
age 24
visits member for 2 years, 3 months
seen 7 hours ago

Feb
22
comment Should I use a engine when building a snake game?
Engine NO. Multimedia library YES. A multimedia library will solve issues you shouldn't have to worry about like rendering, playing sound and reading input, but it won't solve issues you absolutely should have to worry about like the game loop, user interface or collision detection. You're doing this to learn how to make games, not how to use a piece of third-party software.
Oct
26
comment Node.js Lockstep Multiplayer Architecture
This is off topic. Socket.io is convenient to use, but it inflates packets like crazy to achieve that, better to use a more low level solution like github.com/Worlize/WebSocket-Node Read up buildnewgames.com/optimizing-websockets-bandwidth and blog.lightstreamer.com/2013/10/… if you want to learn more
Oct
24
comment Do you need to make a tileset for a platformer?
It's not about the time, it's about imposing a fixed set of rules for your game world that, at the same time, are robust enough for most titles. It makes calculations much easier, it's much easier to determine the exact level structure around an entity. With random geometries, you'll have to do ray/etc. queries to get an approximation of what's around and since these are just approximations, you'll still need to impose some set of rules for the level designer. I wish you the best, but it's likely that few months down the road you'll wish you stuck with tiles, lots of people have been there.
Oct
24
comment Do you need to make a tileset for a platformer?
i'd advise you to use tiles unless you have a serious gameplay or artistic reason not to do so. tiles make editing levels easy, it's easy to implement smooth movement with them, they're great if you want to procedurally generate or destroy things and they make programming AI so much more easier than if you'd use random geometry. if you want to place random sprites, nothing's stopping you, you still can do that while using tiles. just try to understand that tile based level design will make your life much easier and give you more control over your game.
Oct
21
comment Would it be more efficient to handle 2D collision detection with polygons, rather than both squares/polygons?
most physics engines treat boxes the same way as polygons, the better ones provide functions for creating regular shapes like createPentagonVertices or createBoxVertices. to answer your question, i'd say you shouldn't concern yourself with this. treating boxes as polygons means less branching, less clutter in the code and less code to maintain. Also with this approach it's easier to do things like debug rendering and other things that require vertex information. you'll still need a separate collider for circles, of course.
Jul
29
comment Realtime multi-player game design principles for Node.js
@Yannbane Didn't know that WoW uses TCP. Seems like a lot of MMOs do, from what i could find. Makes me much more confident about writing multiplayer games with HTML5. Thanks!
Jun
18
comment Efficient foliage rendering with OpenGL
I'm fairly sure that glAlphaFunc is deprecated, so you have to (if you're using core specification or OpenGL ES 2 or WebGL) substitute it using discard, so that doesn't change much. The issue is that there's tons of bad rep floating around about discard, so i REALLY would like to know how do people solve this in production, because for me, discard is the perfect solution because it requires no additional sorting and produces no artifacts, it's just that whenever i read about discard, people talk about performance losses unanimously.
Mar
31
comment Camera not strafing (GLSL)
@TM3P I was talking to sarahm, his comment is incorrect, i have no idea why it has 2 upvotes. It applies to your situation because that's how your matrices are constructed, but it's not a rule. It's alright if you don't understand this at all, but he should if he's commenting on it. BTW, if you'd like to learn linear algebra in a very accessible manner, try Game Engine Architecture by Jason Gregory, the information is presented in a VERY accessible manner and it's by a game developer for game developers.
Mar
30
comment Camera not strafing (GLSL)
@sarahm No it doesn't, GLSL will use what ever multiplication is appropriate for the notation. If you'll write vector * matrix, then the vector will be treated as a row vector, if you'll write matrix * vector then the vector will be treated as a column vector. I do all my 3D calculations using row vectors, because it's more natural to write it like that for me. It's up to you to set up your matrices for row or column multiplication, OpenGL doesn't care.
Mar
11
comment Friction due to gravity in an impulse based physics engine
@SteveH yeah dude, if you added a reference i'd be very happy to accept that as the answer
Feb
21
comment Resolving a collision with forces
Your model for resting contacts is odd. Resting contacts aren't just for gravity, they should work for any force. The easiest way that works is to just remove the velocity gained due to acceleration in the previous frame upon contact. Also for small velocities you can remove restitution completely, though your calculations don't account for restitution. This approach works for all forces, it's easy to implement and looks good enough.
Feb
3
comment Resolving a collision with forces
@TravisG Oh, alright i see the issue.
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.