• 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

158 Neutral

About Lars-Kristian

  • Rank
  1. [quote name='AmzBee' timestamp='1350903299' post='4992722'] Try updating your logic less frequent, let's say 30fps: [CODE] TimeSpan.FromMilliseconds(1000.0d / 30.0d); [/CODE] [/quote] Thanks for a reply, but this did not work for me and the problem is still there. I used Stopwatch to time my update- and draw method. Update uses under 1ms and draw under 2ms, so I don't think its because my game is to complex.
  2. The code is not displayed the proper way. Does anyone know how to fix it?
  3. Hi, everyone! I am making a game for wp7 using silverlight/xna. In the pre made code the game loop is setup like this: [source lang="csharp"]GameTimer timer; public MyGame() { timer = new GameTimer(); timer.UpdateInterval = TimeSpan.FromTicks(166666); timer.Update += OnUpdate; timer.Draw += OnDraw; } private void OnUpdate(object sender, GameTimerEventArgs e) { } private void OnDraw(object sender, GameTimerEventArgs e) { }[/source] When the game runs, it lags precisely one time a second; From my understanding the GameTimer suspends a frame if the frame is using more time than it should. My game is pretty simple and the game runs fine on all the other frames, so why is this happening only one time per second? I have Googled around and this seem to be a common problem. But I can't find a solution to it. If someone have had this problem or know a solution I would be very happy if you can share it with me. [img]http://public.gamedev.net//public/style_emoticons/default/biggrin.png[/img]
  4. If you have a basic understanding about vectors this link will help you a lot: [url="http://www.metanetsoftware.com/technique/tutorialA.html"]http://www.metanetso.../tutorialA.html[/url] Under the "calculating the projection vector" section. You can: 1. Find the the smallest projection vector. 2. Move the ball on the outside of the paddle.(The length of the projection vector) 3. Reverse the acceleration of the ball in the direction of the collision. Note: It can also be useful too not allow movement of the paddle if the ball hits the top or bottom side of the paddle, so that the ball and paddle does not collide 2 time in a row. This is not the simplest method too find the collision, but it is very useful when it comes too collision handling. If this does not make sense, please let me know. xD
  5. Hi I read your post and I think I can help. But first I need to know: How do you want your game to look like? Are you aiming for the absolute simplest version(the ball updates 1-5 times a second), or the more modern version(the ball have a fluid motion)? Is the ball round or square? What happens if it hits a corner of the paddle?
  6. Thanks for the help, I will try those things tomorrow.
  7. I understand that not everything makes sense. The fraction thing is a variable between 0.5-1.0, it helps making everything more stable. If something collides, instead of moving both object all the away from each other, they are only moved by a fraction. like a dampening effect. m is a vertex, v1 and v2 is an edge. If a vertex is active it can move, but not if its not active. I agree with that mass thing. Are you saying that if 2 objects collide, the object with the least mass moves the most?
  8. Thanks for a good reply The game is a typical bridge builder game. And the problem is with the train. I have managed to get the jumping down to 2-3px, but it still looks horrible. [attachment=11605:test.png] [size=3]The train has not yet been given a texture[/size][size=3]. [img]http://public.gamedev.net//public/style_emoticons/default/tongue.png[/img] [size=4]I think the problem is here[/size][/size] v1 and v2 is the edge, and m is the colliding vertex. [CODE] private void CollidingE(Vertex m, Vertex v1, Vertex v2, Vector2 cv) //cv = Collision Vector { if (v1.active == false && v2.active == false) { m.pos += cv * fraction; return; } float t; if (Math.Abs(v1.pos.X - v2.pos.X) > Math.Abs(v1.pos.Y - v2.pos.Y)) { t = (m.pos.X - cv.X - v1.pos.X) / (v2.pos.X - v1.pos.X); } else { t = (m.pos.Y - cv.Y - v1.pos.Y) / (v2.pos.Y - v1.pos.Y); } float lambda = 1.0f / (t * t + (1 - t) * (1 - t)); Vector2 v1pos = v1.pos; Vector2 v2pos = v2.pos; Vector2 mpos = m.pos; if (m.active == true) { if (v1.active == true && v2.active == true) { v1pos -= cv * ((1 - t) * lambda / 2.0f) * fraction; v2pos -= cv * (t * lambda / 2.0f) * fraction; } else if (v1.active == false && v2.active == true) { v2pos -= cv * (t * lambda) * fraction; } else if (v1.active == true && v2.active == false) { v1pos -= cv * ((1 - t) * lambda) * fraction; } mpos += cv * fraction; } else { if (v1.active == true && v2.active == true) { v1pos -= cv * ((1 - t) * lambda) * fraction; v2pos -= cv * (t * lambda) * fraction; } else if (v1.active == false && v2.active == true) { v2pos -= cv * (t * lambda * 2) * fraction; } else if (v1.active == true && v2.active == false) { v1pos -= cv * ((1 - t) * lambda * 2) * fraction; } } v1.pos = v1pos; v2.pos = v2pos; m.pos = mpos; } [/CODE] Or here [CODE] private void UpdateVertices(List<Vertex> list) { Vector2 tmp; foreach (Vertex v in list) { Vector2 pos = v.pos; Vector2 oldpos = v.oldpos; Vector2 deltapos = v.deltapos; if (v.type == Vertex.NORMAL) { deltapos.X = 0; deltapos.Y = v.mass; deltapos -= (pos - oldpos) * 0.0001f;//0.0001f * (pos - oldpos); tmp = pos; pos += pos - oldpos + deltapos; oldpos = tmp; } else if (v.type == Vertex.TRAIN) { deltapos.X = 0; deltapos.Y = v.mass; deltapos -= 0.05f * (pos - oldpos); tmp = pos; pos += pos - oldpos + deltapos; oldpos = tmp; } else { pos = oldpos; } v.pos = pos; v.oldpos = oldpos; v.deltapos = deltapos; } } [/CODE]
  9. Hi everyone. I am working on a game that uses Verlet integrated physics, and it works pretty well. I got 2 types of objects vertices and edges. The problem is when 2 horizontal edges collide and one of them is static, the other one jumps pretty high. [attachment=11585:path3961-6.png] Is this a common problem? does anyone know how to fix it?
  10. Does anyone know how to make a incremental freedrag from only using gesture samples in xna? What I mean is if the user makes a drag gesture that is 40px long, the object will move to the left or right. I can't seem to figure it out. xD
  11. Thanks for all the help everyone, but i did it my way, and it ended up working the way I wanted to.
  12. I think Python is really fun to start with, and PyGame is easy to learn. The best about pygame.org is that you can download games that others have made, and take a look at there source code.
  13. Thanks for the reply, but im still not sure how to achieve this effect. This is my ideas: [attachment=10203:test2.jpg]
  14. Take a look at [url="http://en.wikipedia.org/wiki/Coulomb_law"]http://en.wikipedia.org/wiki/Coulomb_law[/url] (coulomb's law). It is used in [url="http://en.wikipedia.org/wiki/Force-based_layout"]http://en.wikipedia....ce-based_layout[/url] (Force-based graph drawing). You can use coulomb's law between all the particles, and then they will repel each other. More particles will give more tension or pressure.
  15. Hi, like my title says I want to transform rotational motion in to linear motion. In my game I have a circle that spins, and when it collides with something, it shall transform some of that spin in to a linear motion. [attachment=10173:test.jpg] I have tried alot of different things, and I'm out of ideas. Does someone have a solution? And I'm using a verlet integration for physic's if it helps.