• 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.

Kurt-olsson

Members
  • Content count

    159
  • Joined

  • Last visited

Community Reputation

254 Neutral

About Kurt-olsson

  • Rank
    Member
  1. Hi.   I am pretty confused about what routine to take when trying to create a 2d scroller game. I want to use a rectangle as bounding box and i want to have all kinds of angles and rotating objects, elevetors etc.   right now i like "the move -> get penetration delta ->push back" concept, this is the one i get to be stable without jittering. And with recursive checks this works great in small corners etc. Also other moving objects "pushes" the player for "free"   If i try to sweep and get the TOI and change the velocity to sliding for example, this always gives me jitters and jerkiness. The same with the oldPos vs newPos when saving position and then check for collisions and if found, then revert back to the safe position. This i also get jitters when implement. Should i still be doing the "push-back" even if i calculate the TOI?     What is the "standard" way of doing when creating a FPS in 3D and in my example 2D scroller.   The problem with the push right now is that i get sliding from the gravity vector even though my velocity is set to zero, this is due to the pushback vector. So this is why i want to try something new, otherwise i really like that technique.   And if you were to do a 2D scroller with different angles for floors, would you use AABB and then line intersection? I am checking the minkowskis sum, but i think there might be simpler stuff for the scroller.     I am stuck with prototyping right now and cant get progress, so any input is helpful =) 
  2. Wow, wonder if it is the "real" Jonathan Blow that published this? The dude is a rock star! I have listen to so many sessions by him and he has so many smart things to say! Love the "Game prototype" session. So much good content and i like the "hardcoded vs generic" topic. I have always agreed that the simplest solution is often more powerful! =)   This article is easily 5/5!
  3. Thanks for all replies.   Yeah, i think i have to look at the more traditional AABB, OBB intersections techniques.   Now i am starting to read up on Minkowskis sum, that seems to be very nice way for handeling polygons of all shapes. If i can just add and use the algorithm right it should be easy to cast a ray and get the intersection point as well.   I really got it to work with the Sphere, but it is not good in 2D scrolling game. Now i want to use a rectangle instead. =(
  4. Hi.   I am thinking of a way to sweep polygons and rectangles against another polygon and get the Time of Impact.   If i draw lines between the vertexes startposition and endpositionof the polygon (or rectangle) and test those lines for intersections of the other polygon (or rectangle).  If i then take the intersection point and compare it to the length of that line, that will give me time of impact.   It has of course be the earliest time of impact compared with all the intersections.   Can i really do it like this? It would be great, because then i can only do line-line intersection test between the vectexes of the shapes.     i submitted a file to illustrate this better.   I am using a sphere in my game now, and i dont think it works with my character.    
  5. Thanks alot. Didnt think the last 5% should be so tricky, but it is lots of trimming to get the jump and friction plus slide to work and create a good gameplay. Excellent links, thank you very much.
  6. Hi!   I am almost finished with my 2D engine that supports polygons with all angles. the way i do collision detection is:   move(); update() //pushed the players out again if there was some penetration that was not permitted (this is done recursivly with the smallest TOI first)   everything works great, BUT   one small thing is if my player is standing on a very small hill, he continues to slide very very small distance in the x-axis.   this is becuase the gravity vector is always added and the the player is being pushed down, and with the corrections it is resulting with a movement..   The way i slide is this:                 var dotN = current_pushvector.dot(game.player.vVel);                 game.player.vVel.x -= (current_pushvector.x * dotN);                 game.player.vVel.y -= (current_pushvector.y * dotN);   But this is wrong for 2D scrollers i think.   What kind of collision response do you do on 2D scrollers?        
  7. I did some test with two points and 3 rays that were traced for collision. I ended up with just shooting one ray for my solution and i also didnt need to have the exact position of collision, this is just to prevent the player from going through walls at great speeds.    It ended up working great with just line-line intersection checks and then cut the velocity with the time (vel / distance of intersection) - some small value to be safe. I forgot to say this is only in 2D.   thanks for the help! 
  8. Hi I have made a capsule by making two circles and two lines between them (on the edges) I use lineintersection and closest point to find out if the capsule intersects any lines, this works perfect and i get the intersectionpoint on the lines and where the closest point to the sphere is. My problem is, i cannot get the circles intersectionpoint with radius. I have tried cutting velocity according to distance etc but its only working 95% correctish. Is it possible to get the circle intersection from the capsule intersection point?
  9. Ok. I just want to share how i solved this.   Frist misstake.   My thrust and drag and lift was NOT predicular to the wings. They need to be. Once they are, the vectors iteself will create drag against the weight when climbing. After fixing my other problem (had only one engine hehe) the aircraft climbs really really well and have the same speeds as in the real 737.   Problem solved
  10. I dont simulate rotation in my simple 2D. But i am taking all real world values of the 737-800. I have added a picture where i print all my values. Lift is Correct, Drag is correct, Weight is correct,Altitude Density is correct. (not taking temperature into count right now though) Thrust is correct. But still i think the airplane climbs to easy.   I have one thing to solve, and that is forward acceleration on desc, and backwards weight force when climbing. Then i think i would hit the numbers like in real simulators.   Here is a picture of my game just after takeoff (the rotation speed was a littlebit high, but this is for flaps 0!, in real life flaps 1-15 is used.)[attachment=26199:climbdescproblem.png]
  11. Ok so if i understand this correct, i will end up with this picture. You think this looks correct?   [attachment=26197:climbdescproblem2.png]
  12. Ok. it makes more sence that it is only gravity thats the "affecting" force when goining speed on descent. I guess i can calculate depending on what pitch the aircraft has the amount (fraction) of that gravity is giving thrust forward.   This has been a tip from previous member for me.   But is it also gravity that makes the airspeed loss when climbing? So then the thrust is directed backwards (a fraction of the gravity, that will say)?
  13. I have a problem with my flight model. I miss the part with velocity acceleration during descent and extra drag during climb. I have implemented Drag curve and Lift curve against these formulas. And it works really good. I only miss the extra energy (kinetic) when descending and loss of energy when climbing.   Iam not sure i have understood the resulting drag/acc to the models and cant find good resources on this.   I have attached an image to see if i have understood this correct.   Do you know if this is the correct approach? [attachment=26178:climbdescproblem.png]   My lift function     // L = Lift in Newton.             // P = Airdensity kg / m3             // V = velocity in m/s             // S = Wingarea m2             // Cl = Lift Coefficient - Angle of Attack lookup table (99% it is devided by ten)             // L = (P / 2) * V^2 * Cl * S             var L = (this.getCurrentAirDensity() / 2) * Math.pow(this.getVelocity(), 2) * this.getCoefficcientValue(ClCurve) * this.wingarea;               return L;   My drag function     // D = Drag             // P = Airdensity kg / m3             // V = velocity in m/s             // S = Wingarea m2             // Cd = Drag Coefficient - Angle of Attack lookup table (99% it is devided by ten)             // D = Cd * S * 0.5 * P * V^2             var D = this.getCoefficcientValue(ClDrag) * this.wingarea * 0.5 * this.getCurrentAirDensity() * Math.pow(this.getVelocity(), 2);             return D;
  14. Many thanks Erik, then i am not so off at all.  I will use the "external" force.   I will prob do as you suggest with a wind-object that lives over time with different dir and vel.
  15. Ok.   Lets say i have a sprite that have a weight * gravity.   How do you best code some "random" input force on the sprite?   Do you code the force like a particle system, min-force, max-force, force direction, and delta time the force has to develop.   Basically i am coding a small flight game and i want to simulate different wind-forces affecting the airplane. I know how to do this, but i dont know if i am doing a good coding pattern for this.     airplane has 4 forces = lift weight drag and thrust.   I want to simulate a small wind force blowing the airplane up, i don´t want to include this is my basic formula for flying. I just want to push the airplane around i guess.   How would your approach be for this?