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

  • Rank
  1. hi guys! http://www.gamedev.net/page/resources/_/technical/math-and-physics/a-verlet-based-approach-for-2d-game-physics-r2714 I read it and decided to finish a bit for themselves. In general, the essence of what I needed was a regular polygon? ????? ???? ? ???, ??? ????? ??? ?????????? ????????????? By the topography object is specified vertices and edges, respectively, as follows:For example vertex created so: Vertex* V1 = new Vertex( this, X , Y );   and the face, say between two vertices as follows: new Edge( this, V1, V2, true );   P.S fourth parameter is responsible for whether to participate in the face of conflict (ie, whether the outside of the face shape, or it will be framed) Suppose that's to create a simple rectangle:???????? ??? ????????? ???????? ???????? ????????????????:   void PhysicsBody::CreateBox( int X, int Y, int Width, int Height ) { Vertex* V1 = new Vertex( this, X , Y ); Vertex* V2 = new Vertex( this, X + Width, Y ); Vertex* V3 = new Vertex( this, X + Width, Y + Height ); Vertex* V4 = new Vertex( this, X , Y + Height ); new Edge( this, V1, V2, true ); new Edge( this, V2, V3, true ); new Edge( this, V3, V4, true ); new Edge( this, V4, V1, true ); new Edge( this, V1, V3, false ); new Edge( this, V2, V4, false ); }   Similarly, I added a method to create a regular polygon: void PhysicsBody::CreateCircle(int X, int Y, int r, int n) { Vertex * V = new Vertex[n]; float a=0.0; Vertex * V1 = new Vertex( this, X , Y ); for (int i=0; i<n; i++) { Vertex * V1 = new Vertex( this, X + r*std::cos(a*PI/180.0f), Y + r*std::sin(a*PI/180.0f)); V[i] = *V1; a+=360.0f/n; } new Edge( this, &V[n-1], &V[0], true ); for (int i=0; i<n-1; i++) new Edge( this, &V[i], &V[i+1], true ); for (int i=0; i<n; i++) new Edge( this, V1, &V[i], false ); //delete(V); }   And here's the problem, if the vertices of creating, describing each, then all would be OK, but here's a situation where I need to, say, 40-angle polygon, I will not each node individually prescribe ..It turns out that, for some reason, remembering addresses are not the top, when I click the mouse button, the polygon is created, but the top is not just tied to its faces and trite fall down attached was only one vertex, the central Vertex * V1 = new Vertex( this, X , Y ); All vertices and edges are stored in the respective arrays.description of the basic structures, ie, faces, vertices and body: #ifndef __PHYSICS_H__ #define __PHYSICS_H__ #ifdef _WIN32 #include <windows.h> #endif #include <GL/glut.h> #include <math.h> #include <iostream> #include "Vector.h" #define MAX_BODIES 2048 //Maximum body/vertex/edgecount the physics simulation can handle #define MAX_VERTICES 5096 #define MAX_EDGES 5096 #define MAX_BODY_VERTICES 64 //Maximum body/edge count a body can contain #define MAX_BODY_EDGES 64 #define PI 3.14159 struct PhysicsBody; //Prototypes struct Vertex { Vec2 Position; Vec2 OldPosition; Vec2 Acceleration; PhysicsBody* Parent; Vertex( PhysicsBody* Body, float PosX, float PosY ); Vertex(){}; }; struct Edge; class Physics { Vec2 Gravity; //Most of this should be clear after reading the article int BodyCount; int VertexCount; int EdgeCount; Vertex* Vertices[ MAX_VERTICES ]; Edge* Edges [ MAX_EDGES ]; PhysicsBody* Bodies [ MAX_BODIES ]; float Timestep; int Iterations; void UpdateForces(); void UpdateVerlet(); void UpdateEdges (); void IterateCollisions(); bool DetectCollision( PhysicsBody* B1, PhysicsBody* B2 ); void ProcessCollision(); float IntervalDistance( float MinA, float MaxA, float MinB, float MaxB ); bool BodiesOverlap( PhysicsBody* B1, PhysicsBody* B2 ); //Used for optimization to test if the bounding boxes of two bodies overlap struct { float Depth; Vec2 Normal; Edge* E; Vertex* V; } CollisionInfo; public: void Update(); void Render(); void AddBody ( PhysicsBody* Body ); void AddEdge ( Edge* E ); void AddVertex( Vertex* V ); Vertex* FindVertex( int X, int Y ); Physics( float GravitationX = 0.0f, float GravitationY = 0.0f, int pIterations = 1 ) : BodyCount( 0 ), VertexCount( 0 ), EdgeCount( 0 ), Gravity( Vec2( GravitationX, GravitationY ) ), Iterations( pIterations ), Timestep( 1.0f ) {} }; struct PhysicsBody { Vec2 Center; //Center of mass int MinX, MinY, MaxX, MaxY; //Min/max coordinates of the bounding box int VertexCount; int EdgeCount; Vertex* Vertices[ MAX_BODY_VERTICES ]; Edge* Edges [ MAX_BODY_EDGES ]; PhysicsBody(); void AddEdge ( Edge* E ); void AddVertex( Vertex* V ); void ProjectToAxis( Vec2& Axis, float& Min, float& Max ); void CalculateCenter(); //Calculates the venter of mass void CreateBox( int X, int Y, int Width, int Height ); void CreateCircle(int X, int Y, int r, int n); }; struct Edge { Vertex* V1; Vertex* V2; float Length; int Boundary; //Value used for optimization - see Physics::DetectCollision for more information PhysicsBody* Parent; Edge( PhysicsBody* Body, Vertex* pV1, Vertex* pV2, int pBoundary = true ); }; #endif   actually referred to add components just add them to the array   void Physics::AddBody( PhysicsBody* Body ) { Bodies[ BodyCount++ ] = Body; } void Physics::AddVertex( Vertex* V ) { Vertices[ VertexCount++ ] = V; } void Physics::AddEdge( Edge* E ) { Edges[ EdgeCount++ ] = E; } So appropriate constructors for the components: Edge::Edge( PhysicsBody* Body, Vertex* pV1, Vertex* pV2, int pBoundary ) { V1 = pV1; V2 = pV2; Length = ( pV2->Position - pV1->Position ).Length(); Boundary = pBoundary; Parent = Body; Body->AddEdge( this ); World.AddEdge( this ); } Vertex::Vertex( PhysicsBody* Body, float PosX, float PosY ) { Position = Vec2( PosX, PosY ); OldPosition = Vec2( PosX, PosY ); Parent = Body; Body->AddVertex( this ); World.AddVertex( this ); } PhysicsBody::PhysicsBody() { VertexCount = EdgeCount = 0; World.AddBody( this ); } How do I solve the problem with falling vertices? P.S demo: http://yadi.sk/d/Qg0_nZ7h1lOXC
  2. C ????? ????? ??????! ? ????? ????? ??????! ? ?????? ????? ? ??????????!
  3.     Thanks, but it's not work true
  4. ??????? ?????? ?????? ?? ??????? ????? ? ?????, ?? ???, ?? ??????? ??? ????? ????? ???????? ??? ? ??????? 50 ??? ? ?????, ?? ??????? ???????? ? ???????? ? ?????, ?? ??????? ????????". ?????????? ??? ? ??????? ?? ???????.
  5. How to add friction to this?
  6. Hi guys! I was read this article on this site [url="http://www.gamedev.net/page/resources/_/technical/math-and-physics/a-verlet-based-approach-for-2d-game-physics-r2714"]http://www.gamedev.n...e-physics-r2714[/url] And I wondered, what if upgrade it for experiment? i downloaded it and decided to add friction. But I did not understand how to do it correctly. We can replace the speed of this[b] [color=#ff0000]-k*N+OldVelocity[/color][/b][color=#ff0000];[/color] [color=#000000]where N as I understood the normalized velocity (well, more multiplied by -1 is not?)[/color] Well, add a small fix that would not work, that the infinite is force the body begins to move in the opposite direction [b][color=#ff0000]VelNew = max(-k*N+OldVelocity, 0.0f)[/color][/b] how to modify this method (if not this one?) to get the friction? [source lang="cpp"]void Physics::UpdateVerlet() { //????????? ????????? ?????? for( int I = 0; I < VertexCount; I++ ) { Vertex& V = *Vertices[ I ]; Vec2 OldPosition = V.Position; V.Position += V.Position-V.OldPosition + V.Acceleration*Timestep*Timestep; V.OldPosition = OldPosition; } }[/source]