Jump to content
  • Advertisement

DrZoidberg42

Member
  • Content Count

    7
  • Joined

  • Last visited

Community Reputation

121 Neutral

About DrZoidberg42

  • Rank
    Newbie
  1. I say, just use whatever language you are already familiar with. It's all fast enough. What kind of game are you trying to make btw.?
  2. I tested it again. It depends on the browser. In Chrome performance.now() only has an accuracy of 8ms. On Firefox it's less than 1 ms. But the input latency is still 8ms for both browsers. For a game input latency is what counts I guess.
  3. I know that on Windows, Java and JavaScript both have a precision of about 8ms for keyboard events. That could be different on other OSs though. There is an easy way to test that. Open a JS console in your browser (usually with F12) and then type in document.onkeydown = function() { console.log(new Date().getTime()) } Then click on the website and press two keys at the same time. Two numbers will be printed in the console. The smallest difference you get gives you the accuracy in ms.
  4. Why don't you use a normal tile map? Also the alpha information can be put into a sepperate black and white image if you can't put it into the png. [font=arial, verdana, tahoma, sans-serif][size=2] [/font][font=arial, verdana, tahoma, sans-serif][size=2]13mb for 20 800*600 png images? That's strange.[/font][font=arial, verdana, tahoma, sans-serif][size=2]I mean, look at this picture http://i1-games.softpedia-static.com/screenshots/2-6634_3.png[/font][font=arial, verdana, tahoma, sans-serif][size=2]It's a screenshot of a worms game. It's 800*600 png and only 47 kb in size. 20 times that would be less then 1MB, not 13MB.[/font][font=arial, verdana, tahoma, sans-serif][size=2]Set the color depth as low as possible. 8bit may be sufficient. [/font]
  5. DrZoidberg42

    How does Programming a game work?

    If you want to create a 3D game, the Unity game engine is probably the easiest way to make professional looking games. http://unity3d.com/ There are lots of unity tutorials on youtube. And you can use C# for the programming. If you have no programming experience whatsoever it might help to first take a look at Alice http://www.alice.org/ It was designed for teaching programming to students and it allows you to make very simple 3D games. e.g. this here http://www.youtube.c...h?v=XDDhqlD689Y Of course it's very limited, so once you mastered it you should use something else, like Unity for example.
  6. DrZoidberg42

    trying to understand "chipmunk"

    ok, thanks. I guess the math for this is more complex then I thought. I see that those axes are used for collision detection. The vertices of one polygon are being projected onto the axes of the other. But is this really necessary? Isn't it easier to just use the sum of the angles to determine whether a point is inside a polygon? I mean given a point A and a polygon B you take a list with all the vertices of B and then you create a second list that - for each vertex of B - contains the vector from A to the vertex. Then you go through that second list and add up all the angles between the vectors. If it adds up to 360 the point is inside. If the point is outside, it adds up to 0.
  7. I was looking at the source for the chipmunk 2d physics engine. It's a relatively small, simple engine so I thought I might be able to understand it. But I already stumbled upon some strange math being used in there that doesn't make sense to me. In cpPolyShape.h, there is a struct defined like this typedef struct cpPolyShapeAxis{ // normal cpVect n; // distance from origin cpFloat d; } cpPolyShapeAxis; And then in cpPolyShape.c, line 181 it says for(int i=0; i<numVerts; i++){ cpVect a = cpvadd(offset, verts); cpVect b = cpvadd(offset, verts[(i+1)%numVerts]); cpVect n = cpvnormalize(cpvperp(cpvsub(b, a))); poly->verts = a; poly->axes.n = n; poly->axes.d = cpvdot(n, a); } cpvadd - adds 2 vectors cpvnormalize - normalizes a vector cpvperp - rotates a vector 90 degrees cpvdot - dot product I wonder what is meant by "distance from origin" According to that code the distance from the origin is equal to the dot product of the normalized form of one of the edges of the polygon rotated by 90 degrees and one of the vertices of that edge. Or in other words the "distance from origin" is equal to the distance of the vertice from (0,0) times the cosine of the angle between that vertice and the normal on the edge. How does that make sense?
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!