• 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

110 Neutral

About Dauid

  • Rank
  1. Hello, I am making a game in HTML5 & Javascript and I'm having some issues in loading up external scripts. The way the game is built is the data of all the game levels is stored in seperate javascript files where a level object is created and level information is specified. So inside my game engine I want to load 'on the fly' one level file and use that data to start a level. I have tried using jQuery's getScript() but I only get a "Access to restricted URI denied"- exception. I have tried having an empty script tag then changing the src-attribute to the specified path, because I read somewhere that it will load automatically if the src-attribute is changed. One solution is to just load every level file in the HEAD-tag but there will be alot of levels and I like to compress my code as much as possible and also would very much like to learn how to do this. Grateful for replies David
  2. Greetings good people, I am in need of a few pointers regarding the code design of my current game project. I decided to try out javascript for the first time now that the wonderful canvas tag has been introduced. My problem is as follows: I'm creating type of 2D up- and sidescrolling spaceship game and the graphics of each level is a large image (PNG-format, varying dimensions but larger than the viewport). The images can get pretty large so I wonder if using javascript or/and [i]a[/i] canvas-tag I could split the image into smaller images and storing them in a two-dimensional array. Or if another solution is more optimal e.g just clipping the large image to fit the viewport. Even if clipping the image is a better solution, the "large image into array of small images"-solution would be prominent to the loading of my collision data. I have two seperate images with the same dimensions to each level, one with the graphics and one with color-coded collision data. At the moment my solution is a small C# program that reads the collision data image and saves it as a text-document which I in turn load with javascript as a string and read out the data. This is a bit inconvenient because I want to ease up the level-editing process. I also have a problem I can't quite understand: When I load the image to a level some of my math is using the dimensions of the image, code snippet: [code]function loadLevel(filename) { levelCollisionMap = new Image(); levelCollisionMap.src = filename+"CollisionMap.BMP"; levelCollisionMap.onLoad = collisionMapOnLoad(filename); } function collisionMapOnLoad(filename) { levelWidth = levelCollisionMap.width; levelHeight = levelCollisionMap.height; // .... doing other stuff }[/code] when the collisionMapOnLoad-function executes at browser-startup the width and height of levelCollisionMap is 0, but on a refresh it is loaded. Grateful for help David
  3. Solved this myself with this code: Surface imageMap = new Surface("imageMap.png"); Color[,] imageMapColors = imageMap.GetColors(new Rectangle(0,0,imageMap.Width,imageMap.Height)); Surface clipped = new Surface(width,height).Convert(imageMap,true,true); Color[,] newColors = new Color[width,height]; //Copy the portion (width,height) from imageMapColors to newColors clipped.SetPixels(new Point(), newColors); Voila
  4. I see alot of alphablitting problems while cruising online for the solution to my problem and I can't seem to find one. I have a, in my opinion pretty simple task to perform: I have a png-file that contains animationframes(with alpha per pixel). I load this png file into my system using the Surface constructor: Surface surface = new Surface("imageMap.png"); Now I want to split this surface into the number of frames in the png-file so I can display one frame at a time. Now when blitting the split surfaces to the screen the alphadata ha vanished and it shows nasty edges. But when blitting the original imageMap.png to the surface a smooth edge shows. My question is how can I in SDL.NET split a surface logically into several others and not lose the per pixel alphadata?
  5. http://support.microsoft.com/kb/214118
  6. Quote:Original post by bubu LV 6,1257422745431E-17 is the same as 6,1257422745431 * 10^(-17). And 10^(-17) = 0.00000000000000001. So basically it is zero. yes but basically zero doesnt return true on 6,1257422745431 * 10^(-17) == 0 statement. this problem has returned and this time I'm at a loss. The problem is probably in the trigonometric functions of the math library. ex. code: Console.WriteLine("{0:e}\n{0:e}\n{0:e}",x1,x2,x1+x2); Output: 1,000000e+000 -1,000000e+000 -2,22044604925031E-16 bleh
  7. I solved this by defining PI myself using the Atan2-function. And use my selfdefined PI instead of the predefined in the .NET Math-class
  8. Hi, I've encountered an error I can't explain. See for yourselves: Code::: using System; class Test{ public static void Main(){ double d = Math.Atan2(1,0); Console.WriteLine(d-Math.PI/2); Console.WriteLine(Math.Atan2(1,0)-Math.PI/2); } } Output::: 0 6,1257422745431E-17 It's some sort of precision error, though I can't explain why or how to correct it, any thougts?
  9. I see, so to solve my problem of the client getting the updated data from the server is to constrain the pace of sending the data and process it as fast as possible on the client. Ignoring any receptiondelays on the client. Thanks again and that article you posted seems really useful!
  10. Thanks alot for that answer Antheus! I almost understands how this works now ^^ I guess it doesn't matter that the server sends obsoletedata, what I don't understand is where this buffer is and how I can access it. I keep sending data using send(), how can I use recv() to only fetch the end of the buffer? And say if this buffer gets full, how can I empty it so that send can refill with fresh updated data?
  11. then how about this, the server is issuing a send to the connected socket, the client is waiting a few seconds to call recv which would block the sendcall from the server. When the client calls recv the send is no longer blocked and is sending its specified data. The thing now is that the client only calls the recv once but the server calls send until the buffer in the networksystem is filled. I want the send()-function to be blocked until the client calls recv(). I can't seem to find any documentation on this issue, but I must've missed something.
  12. Quote:Original post by Erik Rufelt so you can simply read one number from the back of the buffer, and disregard the earlier numbers. Wouldn't this be a downer to the performance of the app?.. receiving obsolete data.
  13. sup, I've been trying to get a socketserver/client app working and I got it working!, but not the way I want it to. This is my problem: On the server I'm having an increasing integer, increasing at a high rate. This integer is the data I'm sending to the client, what I want is that the client only will recieve the latest available update of the integer, even if the client is receiving at a slower pace. I'm using socket( AF_INET, SOCK_STREAM, 0 ) for configuration. code & output example, excluding all dataconversions. Server:: int i = 0; while(true){ i++; send(i); cout << i << ' '; Sleep(10); } Client:: int buf; while(true){ recv(buf); cout << buf << ' '; Sleep(100); //using higher sleep to describe my problem } Output over ~x seconds: Server: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 ... Client: 0 1 2 3 What I want it to output is: Server: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 ... Client: 0 5 11 14 I want the client to be as updated as the server, or at least as close as possible. I'm having a hard time understanding this networkprogramming so could anyone give some sample code? Thanks in advance
  14. In this thread we see how to invoke the WinMain-method manually. http://www.gamedev.net/community/forums/topic.asp?topic_id=375803 What I wonder is, what is major the diffrence between actually using the WinMain-method and creating a window from a simple main-method? Since it's working by passing NULL to all WinMain's parameters, aren't those parameters obsolete? Are there any functionality of concern that uses any of those parameters?
  15. I see, but is there a way to.. say assign value to the point in the memory that worldp points to from the local scope other than using dynamic memory?.. or is that the method I should use?