• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.


  • Content count

  • Joined

  • Last visited

Community Reputation

131 Neutral

About Paulus_newbieus

  • Rank
  1. Thanks for the help guys. You were correct - by turning off the Nagle algorithm, my jitter completely vanished! For interest of other readers, in .Net this is possible by toggling the NoDelay property to true (by default its false) on the System.Net.Sockets.Socket class. I believe this change will soon be integrated into the Fleck library by the project developer. Cheers
  2. OK, interesting. I cant see any obvious way to disable Nagle (never heard of it) or how to turn off delayed-ACK. I don't suppose you guys could point me to a good source of on-line explanation for these things? I do broadcast a single message to all my client connections once every 25 milliseconds, and I do actually already attach a time stamp to the message - I use this to work out the rate to animate (linear interpolation). So even though I have the time stamp, It's not yet clear to me how I can use this to re-arrange my packets. At the moment, positions are just drawn straight away. Should I be buffering the updates, re-arrange them depending on time stamps, and then draw them? This feels like yet more lag time. Appreciate the help guys!
  3. Aaah! Of course, why not, this sounds extremely likely. I must admit I was expecting them to arrive in the correct order. Running this simulation locally (debugging on my PC) with server local) I do not get this issue, so I did not consider the ordering to be different. I am using Fleck: https://github.com/statianzo/Fleck I am just using it in its default set-up - I have not done any tweaking or tuning whatsoever, just running it out the box.
  4. I have a web-socket server sending object positions to all clients at a fixed rate (say 40 Hz). Client side (HTML5 browsers) I receive these messages and draw the object (canvas) at that new position. My problem is that sometimes, if there is not a great deal of other JavaScript processing activity on the client, the objects seem to skip a bunch of updates and get transported over a large range. So instead of a nice smooth animation, I get stuttery movements. I have some code to handle lagging updates using linear interpolation - but this problem is different, this is not where the updates are coming in too slow, its where they are coming in too fast! How the heck do I solve this without resorting to decreasing the server update rate, which I really don't want to have to do?! Any suggestions greatly appreciated!
  5. So I loved all the previous Max Payne games and am really looking forward to the new one. I have started playing games on my console more and more, although I come from a heavy PC gaming background. My problem is that I cant decide whether to buy the game for PC (better graphics?) or my PS3 (couch comfort?)! What do you guys think?
  6. [quote name='alvaro' timestamp='1319549306' post='4876731'] You should try to find some material on bit manipulations in C or C++ somewhere else, for a more complete understanding. Let's analyze the expression ((x << 16) + y). (x << 16) means "take the value of x and shift it 16 bits to the left", or equivalently "multiply x by 65,536". This means that (1, 65536) and (2, 0) map to the same number. I don't know if this is acceptable to you, but my guess is that it's fine. The magic constant I used is simply a random odd 64-bit number. You should use a random odd 32-bit number if you are using 32-bit arithmetic. The advantage of using a large random number instead of 65,536 here is that you can generalize the procedure to hash more information into the seed like this: [code] unsigned long seed = x; seed = seed * 10366439865051156459ul + y; seed = seed * 10366439865051156459ul + z; seed = seed * 10366439865051156459ul + w; // ... [/code] If you were to do that by shifting alone, the information about x would eventually get lost in overflow. There are situations where you need to hash information down to a single number and you need the result to look much more random (e.g., cryptographically signing a document), but I don't think you have to go crazy for your particular application. [/quote] Thanks, much appreciated guys.
  7. [quote name='alvaro' timestamp='1319518235' post='4876607'] [quote name='Paulus_newbieus' timestamp='1319488546' post='4876462'] Thanks for suggestions guys. [quote name='Waterlimon' timestamp='1319476188' post='4876360'] Int=(int)short << 16 & short2 ??? [/quote] So short is the x coord and short2 is the y. You are bit shifting the x by 16 and adding it to the y, to make it a unique single value? This is so the point {1;2} will not result in the same seed as {2;1}, am I right? And alvaro, you are doing something similar. [/quote] I am doing something similar, but my code works. What Waterlimon posted has several issues. He probably meant to say `(short1 << 16) + short2' or `(short1 << 16) | short2'. With '&' you'll get 0. And you can't use `short' as a variable name. [/quote] Thanks for clarification and taking the time to help me out alvaro! I actually come from a VB .Net programming background (*hangs head in shame*) so could you please clarify with the symbols what's going on with the bit shift and addition i.e. should it be adding the results? Also, alvaro what's the [color="#006666"][font="CourierNew, monospace"][size="2"]10366439865051156459ul [/size][/font][/color]signify, and how would that be better than a bit shift? Many thanks!
  8. Thanks for suggestions guys. [quote name='Waterlimon' timestamp='1319476188' post='4876360'] Int=(int)short << 16 & short2 ??? [/quote] So short is the x coord and short2 is the y. You are bit shifting the x by 16 and adding it to the y, to make it a unique single value? This is so the point {1;2} will not result in the same seed as {2;1}, am I right? And alvaro, you are doing something similar.
  9. Hi, I am looking to build a pseudo-randomly generated game level/map. A map is divided into blocks of areas, and using a seed I want to be able to regenerate the same content of any of these areas anywhere in my game map. So if I teleport to a far-off area, it will look the same as the next time I visit the same area after restarting the game. I know lots of games already use this mechanic, but my issue is with the fact that to seed a pseudo-random number generator you typically supply a single value such as an unsigned integer. What I have instead is an x,y grid coordinate, not a single value, because that is the only way I can think of how I would identify a map area, especially if the map is potentially infinite in size. For example, the first area may be 1,1. To the right is 2,1, and below is 1,2 etc. So I guess what I am asking is how can I use a coordinate as a seed?
  10. Thanks for the feedback all, much appreciated! Quote: Someone already asked this, but I'll do it again: Why do you think you need the square root? Can you show us an example? I thought that I needed the square root because I was testing with non-Axis-Aligned rectangles. I have just tried with your simple example figures and I get the same result. Basically I became very confused because I am working in a "zoomed in" scale, and applying the square root seemed to give correct figures but I was in fact just plain wrong. Because I can not guarantee my rectangle will always be AA, I think this is really what I should be using: http://www.wikihow.com/Calculate-the-Area-of-a-Polygon
  11. Quote:Original post by Magpie OK the Area of a 4 sided figure, Square or Rectangle is Width * height. If you are using coordinates you need to calculate the distance of the width and the height. IE: Width will be W = Sqrt((X2-X1)^2 + (Y2-Y1)^2) Height will be H = Sqrt((X3-X1)^2 + (Y3-Y1)^2) So area is W * H Ahaha - Yes I am using a 2D coord system. This must be why I need the square root in there, because it needs to be the distance otherwise it doesn't make sense when I convert it to real world measurements. I can expand my actual function - this is what it is doing: Area = Math.Sqrt((m_MaxPoint.X - m_MinPoint.X) * (m_MaxPoint.Y - m_MinPoint.Y)) Does that sit with what you have said Magpie?
  12. Hmm ... does it have something to do with my coordinates? Perhaps related, why would I also need to square root the result of a distance calculation? Public Function Distance(ByVal Point1 As PointF, ByVal Point2 As PointF) As Single Dim dx As Single = Point1.X - Point2.X Dim dy As Single = Point1.Y - Point2.Y Return Math.Sqrt(dx * dx + dy * dy) End Function
  13. To calculate the area of a 2D square or rectangle, you multiply the width by height. However, unless I then get the square root of this value the result is wrong! Public Overrides Function GetArea() As Single Return Math.Sqrt(ShapeWidth * ShapeHeight) End Function Why do I need to apply the square root?
  14. Yes but is it possible to know the sector seeds of a sector 287634 million miles away, just by say passing in a 3D point position parameter, instead of actually generating the entire galaxy up front?
  15. I've been thinking about how you generate content for things like a game, but from a pseudo-random seed. The pseudo-random is important, because I want to be able to re-create the exact same thing if I know my seed value. Generally I know that if you seed a languages randomizer with a certain number, you will get the same sequence of values from the formula. This is of course really useful to store the definition of a game map and its contents just by knowing the seed. So with the seed alone I will be able to generate exactly the same game map on many different machines, without each machine actually having to know the definition of the map up-front. It just takes the seed, then loops through some method calls and constructs the map. I think games use a similar method already, in fact do I think Elite used something similar to generate all its planets? Anyway, the key here when using the random class and the seed is that we have to loop through some procedure. As we go through the loop, we are slowly building up the same content. Now, my question is, is it possible to look ahead into the future to determine what the random number output will be? Think about flying through space in Elite. Lets pretend the game has not yet ran through its routines to generate the entire galaxy, but you go into warp and appear somewhere far away. I come out of warp and appear next to a planet full of amazonians. Now, say I exited the game, reloaded the same map and went into warp at the same place. Would I still appear at the Amazonian planet? Is this possible to tell without knowing the content of the entire galaxy upfront, or is there some procedure that could hop us ahead to that point in space without having to iterate through a loop a bazillion times? I’ve started looking at Fractals and even Perlin noise – am I on the right path? Could you guys direct me to some good reading material please?