Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

126 Neutral

About NameInUse

  • Rank
  1. NameInUse

    Opengl 2d texture bleeding

    My computer. But i want to fix this issue, not change the opengl version.
  2. NameInUse

    Opengl 2d texture bleeding

    x and y is are the screen coords where i want to display this image. I'm placing my vertices there because that i how i understand i have to do it, in fact it gave me the best results for now. Texture.w/h is the image that contains the sub image i want to draw (in case it belongs to a bigger image) like texture atlases. dg is just the object containing the draw order with the arguments (such as if i want to flip the image, or how much scaling). In this case scaleX/y is always at 1.0
  3. NameInUse

    Opengl 2d texture bleeding

    Thanks for your help WirdeCat. I only use opengl 1.4 so shaders are out of the question. I use nearest filter, texture is power of two, no mipmaps etc. I'll use double instead of float, but i doubt that will make any difference.
  4. NameInUse

    Opengl 2d texture bleeding

    But that is exactly what i did and still i see these in between lines: gW = float32(graphic.w) gH = float32(graphic.h) gX = float32(graphic.x) gY = float32(graphic.y) oX = 0.5 / gW oY = 0.5 / gH textW = 1f32 / float32(texture.w) textH = 1f32 / float32(texture.h) left = (gX + oX + (float32(flipX) * gW)) * textW right = (gX + oX + (float32(not flipX) * gW)) * textW top = (gY + oY + (float32(flipY) * gH)) * textH bottom = (gY + oY + (float32(not flipY) * gH)) * textH width = float32(gW) * dg.scaleX height = float32(gH) * dg.scaleY glTexCoord2f left, bottom glVertex2f x, y glTexCoord2f right, bottom glVertex2f x + width, y glTexCoord2f right, top glVertex2f x + width, y + height glTexCoord2f left, bottom glVertex2f x, y glTexCoord2f right, top glVertex2f x + width, y + height glTexCoord2f left, top glVertex2f x, y + height
  5. Hello there. Im using opengl 1.4. In short, i suffer from this well know problem, described in detail in the following links:   http://gamedev.stackexchange.com/questions/46963/how-to-avoid-texture-bleeding-in-a-texture-atlas   Now, what irritates me is that i can play 2d games without experimenting those problems (Say, ala spelunky), but i cannot fix this issue even tho i tried every possible way (border in texture atlas, + 0.5 in text coords, using integers for drawing is a no-no). This problem must be common, still i cannot find a solition for the issue. Any hint?    
  6. NameInUse

    Some precisions on movement

    Let me explain myself with an example: Client sends to server a "move forward" input. In that moment, the server updates the client. This move has the consequence of pushing the entity over a cliff. Now, obviosly gravity should come into play, but how do i compute it, since server has different timerate than client? I dont know, this is too complicated and i feel like im missing a lot.
  7. NameInUse

    Some precisions on movement

    With simulating at the same rate i suppose it means that, when received the player input, i should simulate the movement using the same rate as the client, but here i have a problem. Movement update includes more forces, such as gravity or, say, magic. Which means i cannot simulate the player only when a move is received, i think no matter how i try there will be always differences between server and client.   Also, from the code example by Kylotan, i see that those entities are exclude from the physics system: you wont apply to them gravity or tile collision, but then this means even more packets sent. King Arthur's Gold for example uses extrapolation, and you can tell the client still applies physics to the entities because they collide with the map, and still is a fast paced game.
  8. NameInUse

    Some precisions on movement

    Sorry, i didnt mean my interpolation wasn't working, but that in some examples i read you dont interpolate using this property, for example:   http://www.gamedev.net/topic/639568-network-interpolation-help/#entry5040786   You made a good point on simulating using the same rate in the server. I wasnt doing that exactly, but i'll take that into account.
  9. NameInUse

    Some precisions on movement

    i dont know how would work this. Then i should send at the instant every move packet? This seems to my like a lot. Also, i dont know how this solves the problem on detecting cheaters.   I'm open to more answers btw.
  10. Hello there. I've been reading on this topic for some years now. Recently i started to program an action rpg game with online capabilities, but i always get lost when it comes to networking movement. Here are some of my doubts:   - First of all, many interpolation solutions takes for granted that packets will be received when a movement is produced. What if many move packets are collected and sent at the same time? This actually happens all the time. Client doesn't send player moves when buttons are pressed, they wait until packets are flushed.   - My entities have a speed property. I send this from server to client, but seems like client interpolation doesn't take them into account, which in my opinion makes my first question even more difficult to solve.   - How can i trust the player movement packet rate? The server will receive many of them at the same time, sometimes with different spikes of lag. I suppose that, in this regard, server cannot be too authoritative.   - How can i deal with different update rates between client and server? For example, if i want an entity to move 60 pixels per second, on client each update will move the entity less than in server. It seems to me that synchronizing both endpoints is like mission impossible.   -If possible i'd like to read some code examples. Souce multiplayer networking wiki has a lot of stuff but i cannot make mind.   Thanks, that's all for now. I have never seen the answer of some of these questions .
  • 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!