Separating logic update from render drawing code in a single thread using sleep I've read that the speed of game objects should not be hindered by FPS but instead should be based on time. How can I seperate the update draw code to maximize performance without limiting the drawing rate and provide a constant logic update rate based on time? My current pseudo code is as follows loop draw() if (ticksElapsed() gt 100) update() ticks ticksElapsed() The problem is the drawing code hinders the performance of the update() rate. And it consumes 100 cpu because if sleep is thrown in, it throws off both drawing logic functions. I am also using SDL and it doesn't seem to have a vsync option. I've also heard of the terms fixed and variable time stepping however I'm not sure how that can be done with sleep()


Input processing performance I'm building a game using SDL in Linux platform. Now I want to read user input with SDL GetKeyboardState, but my doubt is wich is the best way using a thread or a timer. I tried both and I think they work well.


Exporting Blender bones' transform matrix I use this simple python script to export bones transformation bones armature.pose.bones for eaach bone in bones SystemMatrix Matrix.Scale( 1, 4, Vector((0, 0, 1))) Matrix.Rotation(radians( 90), 4, 'X') if (bone.parent) Export babylon.write matrix4(file handler, "matrix", bone.parent.matrix.inverted() bone.matrix) else Export babylon.write matrix4(file handler, "matrix", SystemMatrix bone.matrix) I'm using a left handed Y up system but I should forget something about rotation because the result is not correct ( Original (under Blender)


Level design modular vs single project I'm working in Blender and UE4 for a while now... I always have the dillema of how to create my levels. My two ideas are a) modular like lego blocks. Create a wall, a floor, wall with hole for a window etc inside blender, and then, in UE4 make a level out of them. The advantage here is that I can arrange them however I want. The disadvantage is I always have a problem getting the elements to fit properly. Even if I scale one element up or down, everything else starts falling apart. b) single project make a whole object like a room or house in blender. Then everything connects nicely, but I'm always worried that it will be harder to edit, and I usually end up messing something. For example, whole house looks great, but inside the game a window is way too high, or the doors are too narrow to go through. My question What should I do should I stick to one method and try to fix the disadvantage? If yes, how would I do that? Is one of the methods considered "better" or the "industry standard"?


Working in large play area maps, what are the performance and practical differences between Unreal Terrain and a subdivided OBJ mesh terrain? I've managed to reliably use SRTM Geotiff Raster Data with some modifications to create decent terrains in unreal, but there is a small problem with how I go about city building when I'm not using the actual terrain from unreal in my modelling program, especially with roads and other wide area constructs. If I were to convert my heightmap to a mesh object for use and manipulate in modelling programs instead of using the unreal terrain, what sort of difference in performance or stability would it make? What about load times? Would it make a large impact with object meshes for building exteriors included in the object mesh for the terrain, thus reducing the amount of information needed to load both the buildings and terrain by a small amount? EDIT title, player should have been play area


Blender Edge Split Alternative What other options alternatives are there to "edge split" for smooth shading low poly game models. As I understand it, edge split does what it say's, its splits the mesh therefore increasing the vert count. I have considered manually marking the edges as sharp however I would imagine this leaves artifacts on the model(in game) ? Cheers.


Regarding BGE (Blender Game Engine), is it possible to generate a single .exe file from multiple files linked together? Would any of you guys or gals know the answer, please? I know one can generate a .exe (windows executable) file from a single blend file. My question is very simple Can anyone generate a single .exe file from multiple blender files of a same project? For instance, say I have a project folder with several subfolders and files from my project game. Each folder has specific elements like scenes, models, textures, etc. They are all linked together to form the final game. Now I want to generate a single .exe file for my game. Is this possible? Or, rather, should I make an entire game inside a single .blend file? (It seems like a very unlikely arrangement, maybe even impossible, but I rather ask). Or maybe even create a master .blend file from where to link all data and when project is finished pack everything before generating the executable (.exe)?


Blender wont export textures (materials) to OGRE3D .mesh i am exporting a model from BLENDER to OGRE3D using the blender2ogre script. the desigre output is a single .mesh file but i know there should be also materials scripts that i should copy to my ogre path. the problem is that blender does not export those files for me it export only 1 mesh file (after i joined all objects) this is the model. in blender it looks fine but in my demo Ogre app it looks like i can use a little help here.


How to export an IK structure created in Blender 2.8 to Godot 3.1? I created this IK bone structure in Blender 2.8 and exported as .escn As you can see, in Blender it's working ok. Now, how to use it in Godot? I've tried export with .dae (native) .dae (Better Collada) .escn .glb None of them worked... Is there any tutorial for using imported IK in Godot?


Getting Model Movement from Blender to OGRE3D I just delved myself into game development. I have created a simple character in Blender, together with its walking animation. I am planning to import the model and the movement so that I could use it in OGRE3D. How can I achieve this? Will the import thing have to separate model and movement? Is there any good and comprehensive guide for this?


Blender Cycles materials not showing in Second Life I ran into a problem after trying to import my own creation into second life. While I am not new to 3D modelling with Blender and other programs, I have always only created things for fun. Now I have decided to import few of those creations into Second Life but the materials I have used do not display in the preview at all. I have used the Cycles Render. How do I solve my issue with Materials not displaying in Second Life after Exporting a Collada file from Blender Rendered in Cycles?


Pixel perfect, sharp uv mapping I'm having trouble understanding how the uv map that Blender gives you works. It gives you a map with outlines which you should color in. But if I have a low res texture I don't know where should I color in exactly. Should I place my textures between the outlines, or should my textures overlap the outlines?


What's the URL of the video showing an EA representative talking about game programming? The video shows an EA representative talking about how a programmer can get into the industry by showing some demos (in fact, he shows a physics demo presented by a candidate who wanted a job at EA). The demo shown depicts kind of a ragtime doll made of yellow cobblestones. I don't remember if I watched on YouTube or Vimeo and I frankly cannot find it after a few hours of work. I just remember the fact that it was taken at a GDC or a SIGGRAPH convention. Thanks in advance. I'm really frustrated because I'd love to show this video to some fellow developers (coders).


Experiences of test driven devleopment in large projects I've used TDD in personal projects, but I wondered if anyone had any experience of using this approach across a large team? Was there resistence to the test first approach? Did you keep code coverage high for the whole project? How did coverage survive fixing those two in the morning and you ship in four hours crash bugs? Did you run tests on all platforms, or just assume that passing on one meant passing the others? I love the decoupled code that TDD produces, and the large suite of regression tests you get for free, but if you only have a few in the team who don't want to contribute tests, won't everyone suffer?


What are windows used for? I have a very general question In games, what use does the programming concept of a window have? Or, in other words, why do some game dev libraries offer interfaces through which to create multiple windows? mdash Why would you need more than one windows in a game? Are multiple windows used as different views states of the game? (I.e. in game, main menu, pause menu, etc.)


UDK Fixed AIController Pawn Height I already asked this question on the UDK forums, without much success though. I'm using a class derived from AIController to control my pawn in RTS style. My problem is that the pawn does not have a fixed Location.Z so if his Velocity in X and Y direction changes the Velocity.Z also changes (for whatever reason). I have tried nulling the Velocity.Z in the tick method, using Move to move the character back to a constant height and some other things of which nothing had worked. How can I solve this?


why is Lua so important ( frequently used ) in game development I have written some small games for fun myself, but never used Lua myself. I have seen people discussing Lua's use in games everywhere. The question is What benefit can I get from using Lua in game development? Can someone explain this a little bit to me?


Best solution for "level string"? I have a game that generates a random level map at the start of the level. I want to implement some way to save and load the level. I was thinking maybe XML would be a good option for saving all the variable, then it would be easy for me to build something that can parse that XML and generate the exact same level. But XML is probably overkill for my needs. I remember back in the day with the old Sega console that didn't have the ability to save your game (I think the Worms game did it too), that they would give you a bunch of character that you could write down. If you punched in that string later on, it would load the exact level. Would a "level string" be a good option? Would it be some kind of "base60" conversion? How would I implement this?


how to breakdown my game project? I am a newbie so when ever i start over i get stuck how to organize things (code) or what should be the order of my work. Can you share your experience of project granularity so i can make my mind what should be done first and so on.


naming conventions in game code vocabulary I'm just starting out as a game developer, and I'm finding some difficulty when naming classes. I usually call the class that handles everything World, Map, or Grid. Then there's the names, inside. For example, I'm making a Frogger clone, and I have a class for everything that moves on screen (I try to use MVC and I'm talking about the model here I have Sprite classes in the view), and I named it Object for lack of a better name. Then there's a subclass from Object which I named Frog (though I could name it Player) and another one for the things controlled by the computer, which I don't know what to call (it could be Enemy or Obstacle or something appropriate for cars and trucks). This class also includes the turtles, which are more like helpful objects, yet are not powerups. How should I manage my naming conventions?


Building a unified interface for a swap chain in both DirectX 12 and Vulkan Most objects in DirectX 12 have natural analogues in Vulkan, e.g. VkInstance IDXGIFactory VkPhysicalDevice IDXGIAdapter VkDevice ID3D12Device VkQueue ID3D12CommandQueue VkCommandBuffer ID3D12CommandList However, when it comes to the swap chain, it's not clear how the entries in VkSwapchainCreateInfoKHR correspond to entries in DXGI SWAP CHAIN DESC1. Clearly, there is not always a 1 1 correspondence, but I would really like to know how I can implement a unified interface for both.


Limitations of p2p multiplayer games vs client server I am reading up on multiplayer game architecture. So far most of the articles i've found deal with the client server model. I'd like to know what are the limitations for using a p2p architecture? what "class" of games are possible (or more common) to implement using it? which aren't? and in general, what are its main differences and limitations against the client server model.


Store and create game objects at positions along terrain I have a circular character that rolls down terrain like that shown in the picture below. The terrain is created from an array holding 1000 points. The ground is drawn one screen width infront and one screen width behind. So as the character moves, edges are created infront and edges are removed behind. My problem is, I want to create box2d bodies at certain locations along the path and need a way to store these creator methods or objects. I need some way to store a position at which they are created and some pointer to a function to create them, once the character is in range. I guess this would be an array of some sort that is checked each time the ground is updated and then if in range, the function is executed and removed from the array. But I'm not sure if its even possible to store pointers to functions with parameters included... any help is much appreciated!


Box2D Do these simple objects need to be in the simulation? I would like to get input from the community regarding how best to represent simple objects in a Box2D based simulation. Some background Without going into too much detail, think of a top down game with a character and some 'food'. You can picture PacMan trade even. Suppose I will simulate the character and the walls to be Box2D so the guy cannot leave the maze and I get collision feed back etc. My question Should the 'food' be part of the Box2D simulation? My thoughts The food doesn't need to be in the simulation because.. It doesn't move. As soon as the character collides with the food it is removed from the game. It should not apply any force to the guy, or anything, ever. Nor should anything ever need to apply force to it. It's extra computation that isn't necessary. The food could be in the simulation because.. I am already using Box2D. Box2D can handle the collision events for me. Again, Box2D can handle the collision events for me I don't really want to check for collisions myself. Box2D should let the food 'sleep' so it won't be much extra computation, correct? What do you guys think? Do the benefits outweigh the costs here? Are there other pros cons I'm missing? I look forward to getting feedback.


How to tell if a fixture is being squeezed by two other fixtures in Box2D? Let's say I had a ground fixture, a player box, and a kinematic block moving up and down. If the player stands under the block, weird things happen. I want to simply play an event where the player dies. How can I detect when the player box is crushed by the block moving down on it?


web based networked game physics efficiency I am writing a web based game, using websockets. its pretty simple, two players shooting at each other with bullets that have acceleration from a starting point at an angle. The client side (frontend in web dev terms) uses phaser.io with p2js for physics. However after reading this post, i believe that it's smarter to do some of the physics for the players on the server side. Such as collision detections, and update the player positions at regular intervals to keep the two players at sync. Now i have two questions if i use the Box2d javascript port on nodejs on the server side to simulate server side physics, than is it just as efficient as using the native c one? seeing as from what i have read so far it seems the js ports aren't that well maintained, and they are js ported on the other hand the js codes might be easier to deal with than the c ones. using p2js on the client side and using box2d on the server. The server being authoritative, and sends regular updates (once every second) as to the actual positions of the players. will the physics simulation be in sync (atleast to the user)? Theoretically i don't see any reason for it to not, given that both user has the exact same latency (this is assumed for sake of simplicity).


Reduce bounciness of dynamic bodies in Box2D In my 2D platformer game my player character is modeled using a Box2D dynamic body. One thing I thought feels off though is that even though the restitution of the fixture applied is zero, the player will bounce off static geometry when falling at an angle, kind of like a plastic box would perhaps, but certainly not like a body would. There isn't really much that Box2D allows me to tweak though except for density and restitution? I noticed that playing with the density has basically no effect on how the player moves which I thought was odd too. Are there any realistic value ranges you would recommend? It's all a bit trial and error right now for me.


What's the best way to handle slopes for a platfomer game using Box2D I would like to know if there is any known solution for handling the player's movement on slopes using Box2D engine. I tried to do it using a circle as the player. Everything was fine until I tried to walk on slopes, the main problem is that due to gravity, the circle does not stop on the slope. Please if somebody has tried this before I'll appreciate it. If you have a better solution without the physics engine would be fine for me too. Thank you.


Libgdx explain steps for beginner to create and use image as a box2d body I am basically from corona background and new to LibGdx , familiar with stage and actor from scene2D. Now wants to use physics body from box2d in the game besides using actor from scene2D. But I need to use images in the game as body... not shapes.. anyone please explain me the steps to use images as a body. Thanks..


GetContactList stops reporting collisions on welded bodies I have some strange problem with my game which uses Box2D as physics engine and I'm out of ideas on what I can do to solve it. My game is a class assignment where I need to build a simple game where the main character moves in a 2D environment while square blocks comes from below him. Each time a collision occurs, that block is attached to the character using a weld joint, when three blocks of the same colors are together, they annihilate themselves(an effect similar to Bejeweled). I'm using a recursive function to iterate through all the attached blocks of a given block to see if there are enough blocks for them to be deleted. I'm using GetContactList function to iterate through the list of contacts to see which blocks are adjacent to each other. The results are quite disappointing, the blocks only get annihilated in few cases. After a lot of debugging, I found the issue, but I still don't know how to solve. My issue is after some time, GetContactList STOPS returning contacts (return NULL) to blocks that were already attached for some time. I spent some time reading the Box2D manual as well as some tutorials and still didn't find any clue of what is happening. Below there's some simplified version of the code that I wrote. for(int a 0 a lt blocksList.size() a ) blocksList a .BuildConnections() And on BuildConnections b2ContactEdge edge body gt GetContactList() while(edge ! NULL) if (long check to see if there's a block nearby) add itself to the list to be anihilated globalList.push back(this) if there's, call BuildConnections again on the adjacent block adjacentBody gt GetUserData() gt BuildConnections edge edge gt next I know that there's another issue related to circular inclusions, but I fairly sure that this problem isn't causing the problem with the collisions. You can download my entire code from this page if you'd like http code.google.com p fellz source list


box2d resize bodies arround point I have a compound object, consisting of a b2Body, vector graphics and a list polygons which describe the b2body's shapes. This object has its own transformation matrix to centralize the storage of transformations. So far everything is working quiet fine, even scaling works, but not if i scale around a point. In the initialization phase of the object it is scaled around a point. This happens in this order transform the main matrix transform the vector graphics and the polygons recreate the b2Body After this function ran, the shapes and all the graphics are exactly where they should be, BUT after the first steps of the b2World the graphical stuff moves away from the body. When I ran the debugger I found out that the position of the body is 0 0 the red dot shows the center of scaling. the first image shows the basic setup and the second the final position of the graphics. This distance stays constant for the rest of the simulation. If I set the position via myBody.SetPosition( sx, sy ) the whole scenario just plays a bit more distant for the origin. Any Idea how to fix this? EDIT I came deeper down to the problem and it lies in the fact that i must not scale the transform matrix for the b2body shapes around the center, but set the b2body's position back to the point after scaling. But how can I calculate that point? EDIT 2 I came ever deeper down to it, even solved it, but this is a slow solution and i hope that there is somebody who understands what formula I need. assuming to have a set polygons relative to an origin as basis shapes for a b2body scaling the whole object around a certain point is done in the following steps i scale everything around the center except the polygons i create a clone of the polygons matrix i scale this clone around the point i calculate dx, dy as difference of clone.tx original.tx and clone.ty original.ty i scale the original polygon matrix NOT around the point i recreate the body i create the fixture i set the position of the body to dx and dy done! So what i an interested in is a formula for dx and dy without cloning matrices, scaling the clone around a point, getting dx and dy and finally scale the vertex matrix.


Making the player walk on walls in box2d I'm making a game in stencil where players walk form left to right along randomly generated walls. I cant use waypoints, since the walls' shapes and positions are unpredictable. Here's a descriptive sketch The red line is the player's path. The red circles are what I thought might make good waypoints until I scrapped the idea.


Do UDK mutators only apply on local games? I have developed a pretty simple mutator. It works exactly as intended on a local game against bots, but it doesn't work (nor do any of the stock mutators) on a listen server. Is this to be expected of UDK (May Beta Release by the way)?


Blender UV unwrapping causes texture to repeat in UDK material I've made pillow kinda thing, unwrapped it in Blender and then I imported my mesh to UDK, applied a material The material splits, but I don't want that to happen, I want to cover the mesh with only big texture, like this one for example How do I do that?


Is it possible to use a spherical collision component in UDK? I have an object in UDK, which has a SkeletalMesh. At certain times in the game, I want this object to continue rendering the SkeletalMesh, but I'd like it to use spherical collision temporarily. After reading a bunch about PrimitiveComponents, my understanding is that UDK supports cylindrical and box like collision, but not spherical without using a static mesh. EDIT What I have now is a StaticMesh with a material that makes it invisible. I've added a StaticMeshComponent to my Pawns. I can shut off the Pawn's collision, and turn on the StaticMesh collision. But it doesn't respond to impulses. I figure I'm missing something in how you turn on the RigidBody thingy. CylinderComponent.SetActorCollision(false, false) SetPhysics(PHYS RigidBody) RBCollisionComponent.SetStaticMesh(RBCollisionMesh) RBCollisionComponent.AddImpulse(InImpulse) RBCollisionComponent.WakeRigidBody()


Why might a Projectile hitting a KActor only call HitWall, and not ProcessTouch? I have a Projectile subclass that seems to work fine. It travels, does Explode(), etc. But when it hits one of our KActors, I get a HitWall event but not a ProcessTouch event. So my question is, why would a colliding actor trigger HitWall, but not ProcessTouch?


Hidden Loading with UDK I was wondering, how would I go about creating hidden loading scenes with UDK? For example, a character walks in to an elevator, the elevator fakes movement, whilst the previous floor is destroyed and the next floor is loaded on top. I assume it's possible with UDK, since it's supposedly rather flexible, but I've never used UDK before (I decided to ask this question first to save me learning it all, finding out it isn't possible, then giving up). So yeah, is hiding the loading process possible? And if so, how would I go about doing it?


Unrealscript splitting a string Note, this is repost from stackoverflow I have only just discovered this site ) I need to split a string in Unrealscript, in the same way that Java's split function works. For instance return the string "foo" as an array of char. I have tried to use the SplitString function array SplitString( string Source, optional string Delimiter ",", optional bool bCullEmpty ) Wrapper for splitting a string into an array of strings using a single expression. as found at http udn.epicgames.com Three UnrealScriptFunctions.html but it returns the entire String. simulated function wordDraw() local String inputString inputString "trolls" local string whatwillitbe local int b local int x local array lt String gt letterArray letterArray SplitString(inputString,, false) for (x 0 x lt letterArray.Length x ) whatwillitbe letterArray x log('it will be ' whatwillitbe) b letterarray.Length log('letterarray length is ' b) log('letter number ' x) Output is b returns 1 whatwillitbe returns trolls However I would like b to return 6 and whatwillitbe to return each character individually. I have had a few answers proposed, however, I would still like to properly understand how the SplitString function works. For instance, if the Delimiter parameter is optional, what does the function use as a delimiter by default?


Unreal Development Kit What is a good method for accessing a relational database file? I'd like to use a SQL Express file or something similar for a UDK demo. Is there a standard method for accessing data in a local relational database file? I understand that the best method may involve creating a class library and using the DLLBind feature, but I'm still a bit unclear on how to pass data to controls in the UI (I'd like to populate dropdowns and such with records from the database).


How are the Unreal Development Kit (UDK) and Unreal Engine 4 (UE4) related? I'm thinking of learning Unreal Engine 4, but it costs money, and I want to try and keep costs as low as possible while I'm learning. In contrast, the Unreal Development Kit is free. How similar are the two? If I learn UDK first, how easily can I transition to UE4?


How can I customize the DefaultInput.ini? I need to make some bindings false. The ones are .Bindings (Name "W", Command "GBA MoveForward") and the same for S, A, D, LEFT, RIGHT, and LeftControl.


Subclasses of GameInfo and Input in UDK We have two main subclasses of GameInfo for the two game types we have. I'm wondering if it's possible to get one of these to read a different .ini file because we'd like to move a few of the controls to different buttons for that mode. It looks to me like it's just going to read Input.ini for this, regardless of the game type.


How to properly rotate towards a local point in Unity C ? (a local LookAt) I am having a nightmare trying to make a child object rotate towards a given point of its parent object, similar to what is possible at the world level when using LookAt. The problem is that most functions related to rotating in Unity C do not work for local level. In the description of function transform.Rotate one can have the impression that it allows that, trough passing the Space.Self parameter. However, to use that function one has to know the 3 angles between the 2 points of interest. And there is no function that allows such calculation. Anyone could please help implementing a local LookAt?


Render a 3D scene in multiple windows extended panoramic view Is there any resource location on how to view a 3D scene from an application or a game on multiple windows or monitors? Each window should continue drawing from where the neighbouring one left off (in the end, the result should be a mosaic of the scene). My idea is to use a camera for each window and have a reference position and orientation for a meta camera object that is used to correctly offset the other cameras (e.g. like in the above figure where the render targets of the two cameras reproduce the star when stitched together). Since there are quite some elements to consider (window specs, viewport properties, position orientation of each render camera), what is the correct way to update the individual cameras considering the position and orientation of the central, meta camera? I currently cannot make the cameras present the scene contiguously (and I am reluctant in working out the transformations without checking whether this is the actual way of doing things).


Camera view projection issue I made a simple OpenGL program but I can figure out why the camera is not working, here it's a little fragment of the Camera class public Matrix4f getView() initializes the view matrix return new Matrix4f().lookAt( new Vector3f(0f, 0f, 1f), camera position at 0,0,1 new Vector3f(0f, 0f, 0f), camera target at 0,0,0 new Vector3f(0f, 1f, 0f)) up axis set to "worldUp" (0,1,0) public Matrix4f getProjection() return new Matrix4f().perspective( (float) Math.toRadians(fieldOfView), the fov has a value between 0f and 180f, by default I set it to 90 viewportAspectRatio, the aspect ratio is equal to 1024 960 (screen height screen width)... even if I've not understood what is it... 0.1f, 1000f) I've not really understood what near and far planes are... public Matrix4f getMatrix() with this function I obtain the final camera matrix return getView().mul(getProjection()) And it's how I handle the camera Matrix in GLSL, created using camera.getMatrix() gl Position camera model vec4(position, 1.0) Without the camera all is fine here's the program running using gl Position model vec4(position, 1.0) (Yeah, it's a cube) But using the camera in the way I showed you before, increasing the FOV, I get this Could anyone look at my code and tell me where I'm wrong? I would be really happy... D


GLM Camera attached to model moves in opposite direction from the model I have been working on a component based engine with nested game objects each with there own transformation's. Each game object calculates its position in the world based on its parents world transformation multipled by there own local one (ModelsWorldTransform ParentsWorldTransform LocalTransform). This all works great until I attach the camera component to a model and in this scenario, as the model the camera is attached to moves away from the origin, the camera moves in the opposite direction to the movement whitest still seeming like it is in the correct position according to its mat4. All local transformations are stored in a mat4 rather then three vec3's for position, rotation and scale to save on calculations each update having to generate new mat4's. Transformation Component Update Code m world transformation m local transformation If we have a parent object if (m parent transform component) m world transformation m parent transform component gt GetWorldTransformation() m world transformation Camers position buffer being updated BufferData.view m transformation component gt GetWorldTransformation() m camera buffer gt SetData() I'm not sure what i'm missing, if anyone has any sugestions that would be apreatiated.


Camera LookAt position with fixed screen position I have a perspective "lookAt type" camera. I'm trying to compute specific focus point of the camera, which should be placed in the middle of the screen I also have a custom 3d point in world space, margin values in screen space and camera's tilt as inputs. I want to compute lookAt point, amp camera distance with restriction, that input world space point has to be visible in the middle of the free screen space area (not affected by margin values) and it has to have a given tilt. I'm able to compute this in 2D, but I'm lost in 3D. Any idea how to achieve this? Here's a sketch of the problem, red and blue area's are margin values of 0.5f in both x and y direction.


How to avoid gimbal lock I am trying to write code with rotates an object. I implemented it as Rotation about X axis is given by the amount of change in y coordinates of a mouse and Rotation about Y axis is given by the amount of change in x coordinates of a mouse. This method is simple and work fine until on the the axis coincides with Z axis, in short a gimble lock occurs. How can I utilize the rotation arount Z axis to avoid gimbal lock.


Relationship between Camera's view size, screen resolution and objects scale I've had this question since a long time ago and wanted to know the relationship between how an object is viewed through the camera depending on the resolution of the device, the camera's view size and the object scale, so for example let's say i have a 100x100 square in the middle of the screen, the camera is looking directly at it and let's say the square takes 10 of a specific screen, if i wanted it to keep that relationship with the screen do i have to change the square size depending on the screen size?, change the camera's width and height? or change the resolution of the game? in short, how does the resolution and the camera's widht and height affect the scale and proportions of the objects of the screen?


Blueprint For Switching Between Cameras In The Unreal Engine So basically I have a scene in the Unreal Engine which has multiple cameras within it, the cameras are intentionally static as the application should behave more like a viewing gallery than a game. As the application is intended for mobile devices, the idea is that when a person touches the screen of their device, the rendering switches from the present camera to another one to show a different image. I have attempted to implement this action in the level blueprint with the following blueprint design Closer up Obviously in the scene there are three camera actors which must be switched between with the first camera viewed through being the 1st CameraActor hence the connection of the EventBeginPlay variable to the Set View Target With Blend variable that the 1st camera actor is connected to. When the Play button is pressed, the scene viewed from the first camera is rendered to the screen as desired however when the left mouse button is clicked equating to touch input on mobile devices, the scene does not switch to the second camera and the question is why?


How can I emulate Diablo 3's Isometric view using Perspective? Using DX11, SimpleMath I am building a isometric game like Diablo 3 in 3D and I want to use a perspective camera that emulates their top down view. Projection Matrix CreatePerspectiveFieldOfView(1, width height, 0.1f, 100.0f) But after this I am a bit unsure how I am suppose to rotate the camera. I assume I could just do p Vector3(10, 10, 10) to get a 45 degree angle at any given p. How do I properly position, and rotate the camera and point it at position p, to mimic Diablo 3 view?


Drag 3D camera with mouse cursor I have a camera that is moved by changing its X and Z coordinates. However, the camera is rotated, so when an object moves by 1 unit in the world, the number of pixels it moves by isn't trivial to determine. How could I move the camera so that if the pointer is at a set point, that point will be under the cursor after the cursor moves? I have a PerspectiveCamera and the number of pixels that the pointer was dragged in each direction (X and Y) on the screen.


Will using similar exact name to a current Marvel superhero name for your game be a problem? I have heard that the word 'superhero' is trademarked by marvel and DC and thus we can't use superhero as part of the name of a game we develop. But I wonder do they also have exclusibe rights to all the names of their super hero characters? For example will people get in trouble if they name their games 'premagneto', 'superwolverine', 'exbeyonder' or 'the cyclop'?


Is it legal to imitate a game without publishing it If you're developing a game that's very similar to a game that's already published, both the game mechanics and the graphics but you're not publishing it, instead you're keeping it in your own computer. Is it legal to do so?


Legal issues with nba player names, profiles, logos? I am searching for this topic and I found a similar question asked check here Legal issues around using real players names and team emblems in an open source game however I have specific questions where I don't know where to ask. So I'll make an nba quiz mini game and I need to know if there might cause some trouble using player profile images, names, team names and logos. I found about a dozen suck mobile apps which use real names also some use photos as well. In case I need a permission or check the customs, where to contact? where can I find such regulations? Lets say I am allowed to use profile images, can I use the official images found on nba.com or yahoo or any sports website? If not, where to get all player photos? sure can't capture them one by one ) As for team logos, there are logo quiz apps which mentions hundreds of logos of different international famous companies, I don't think the app owner contacted each company. Any related information would help. Thanks


How not to break licence laws? I have an idea for a game. Also I have almost everything worked out considering coding. What interests me the most is how can I know if that game can be published. As it would be for iOS and android, these markets are of the geratest interest for me. I found on apples store something similair to what I would make and it's published by some big game developer. How can I be sure I am not breaking any laws when publishing the game? Can I make a game like board game 'Risk'? I don't have any knowledge considering licencing. This game would be avaliable for free, with an option to donate, so money isn't my objective (but it won't hurt)


Which open source licenses can address these concerns for an open source game engine? I am on a team that is looking to open source an engine we are building. It's intended as an engine for Online RPG style games. We're writing it to work on both desktops and android platforms. I've been over to the OSI http opensource.org licenses category to check out the most common licenses. However, this will be my first time going into an open source project and I wanted to know if the community had some insight into which licenses might be best suited. Key licensing concerns Removing or limiting our liability (most already seem to cover this, but stating for completeness). We want other developers to be able to take part or all of our project and use it in their own projects with proper accreditation to our project. Licensing should not hinder someone's ability to quickly use the engine. They should be able to download a release and start using it without needing to wait on licensing issues. Game content (gfx, sound, etc.) that is not part of the engine should be allowed to be licensed separately. If someone is using our engine, they can retain full copy right of their content, including engine generated data. Our primary goal is exposure, which is why we're going open source to start with. Both for the project and for the individuals developing it. Are there any licenses that can require accreditation visible to players? Update As per comments, I mean this to be a requirement for either a splash screen or placement in the credits. Not a constantly visible logo. While I'd put our primary goal as exposure, for licensing the accreditation is less of a concern. From what I've read through (and have been able to understand) it doesn't seem like any of the licenses cover anything that is produced by the licensed software. Are there any that state this specifically, or does simply not mentioning it leave it open for other licensing? Are there any other concerns that we should consider? Has anyone had any issues using any of these licenses?


About to release a free game on Google Play Store, any legal considerations I should take into account? I will release in the next few weeks a small free game on the Google Play Store. I was wondering if there was any important legal aspects I should consider before release. Here's a few infos I'm doing this alone. There's no code graphic assets gameplay concepts I would like to protect in particular. I don't have any issues with people copying something from my game. I'm not sure right now, but maybe I'll add the possibility to make a small donation (so there will be IAP in a sense). I'm using a music track from http opengameart.org . The author has specified that it wasn't necessary to credit him, though I would like to.


Releasing a game without really having an officially registered company I'm thinking of releasing my iOS game without formally registering a company at all. I'm not sure I even want to create a company. ITunes wants to know the copyright holder of my title. I have 2 questions regarding this 1) Can I use my (already decided upon if will exist) company name and just register it later (if the need arises)? 2) Or should I just use my NAME as the copyright holder, regardless if I plan to formally register the company later or not?


Art Style Guide External Image Sources? I've been looking into how to structure an art style guide (ASG) it's a document which helps guide artists how a project's visuals should look. They often have sketches and illustrations from artists working on the project, though I am unsure about using external images. I am working on a commercial videogame project and I have been writing both a game design document (GDD) and currently an art style guide. Is it legal for me to add artwork I came across while browsing the internet into the ASG? I know that most artists can add external images outside of their project into a section talking about inspirations, but could this be done for areas that loosely talk about, say, an overall aesthetic of something, such as creature or environment design? For example, say I have a section which talks about the design of fantasy monsters in a chapter about characters. Would it be legally viable to use various images I come across to help show artists what I'm looking for in each creature? I'm guessing that it is legally viable because I don't think I'd be profiting off of an ASG. I hope somebody could verify this for me I don't want to cause any trouble. I apologize for making this a bit wordy I wish I knew how to articulate myself better.


Deferring royalties for assets until revenue is earned I am developing a game and I want to use some assets that are available online for a fixed price, I want to sell my game and actually make money off of it. I have contacted the owners and they will sell it to me for a fixed price to use commercially. However, I am on a very limited budget and don't really want to pay up front for the assets. What I want to know is how to defer the costs contingent on whether I make any money. In other words, they give me the models, and then I promise to pay them back out of the first revenue. If the project dies, I'm not out any money. Other than my word as an honest guy, how could I convince them to agree to this? Would they charge me more because of risk involved?


Licensing Theme Music from other games As part of my game, I thought it would be fun to make a hidden level that pays tribute to Mario Bros (one of the earliest games I ever played). It would be themed in that way with 8 bit graphics and question mark blocks and completing the level would say "Thank you but the princess is in another castle" or such. For the sound track, I'm thinking of just overlaying the standard mario theme music by playing it on a virtual keyboard using a different instrument timing or something. My question is, am I legally safe? I'm not using anyone else's actual music, I'm just playing the same tune in a different way myself. Do I have to get licensing for this?


SQLite Query from unknown table based on known column value single query I'm working on a database to back up my online TCG. It's currently SQLite, but I'm going to transition it to a MySQL database later. Currently, I have three distinct types of cards with their own unique fields. For example. However, all cards have a single uniqueid that I use to refer to them. TABLE cards CARD ID as INT CARD TYPE as INT TYPE ID as INT TABLE creature cards CARD ID as INT TYPE ID as INT NAME as TEXT FLAVOR as TEXT ATTACK as INT DEFENSE as INT ELEMENT as INT FLAGS as INT MANA COST as TEXT TABLE spell cards CARD ID as INT TYPE ID as INT NAME as TEXT FLAVOR as TEXT SPELL TYPE as INT ELEMENT as INT MANA COST as TEXT TABLE mana cards CARD ID as INT TYPE ID as INT NAME as TEXT FLAVOR as TEXT ELEMENT as INT I'm trying to figure out how to build a query that will allow me to get all fields from a specific table without knowing the table I need to pull from ahead of time. Basically, I want to be able to supply CARD ID, query the cards table, and use the CARD TYPE and TYPE ID to return the row from creature cards where CARD TYPE is 1, spell cards where CARD TYPE is 2, and mana cards where CARD TYPE is 3. I'm currently doing this through two separate queries and doing the logic on the backend, but I'm wondering if there's a way to get the data all in one query, because my queries can be quite time consuming. Would it just be better to jam all card fields into one table, rather than keeping them in three separate tables?


What time to display in text messages in multiplayer game? Say I'm having a multiplayer RTS game. There's a main server for each individual game and several clients connected to it. All packets are sent to server first and then server retransmits them back to clients. Say Server is located in one time zone and all of the clients are in different time zones. ClientA send a text message in chat at 12 03, what times should be stamped for other clients? Should his message be uniformely timestamped by Server (12 02) or each client should timestamp the message whenever it is recieved (12 04, 16 04, 03 03, etc..). Bear in mind, that all the messages are to be in the same order on all clients, server takes care of that. So thats the question use local time for each client or use global server time to timestamp chat messages?


Hobbyist game dev, want to create async multiplayer game. Are server costs manageable? I want to make the game I want to play, and that game happens to be an asynchronous multiplayer game. Think Hero Academy or Hearthstone, where there are 2 players and each submits moves to a central server. Alternatively (and not ideally), clients connect to each other and play is limited to a fixed window of connection, but still there needs to be a central server to acquire new opponents. That said, this is very much going to be a hobby type endeavor I'm just one guy after all. This is not going to commercially support itself. If I have 100 players ever, that would be fantastic. Given that I'm going to have to eat server costs myself, what are my options for getting a server? I don't need much bandwidth or CPU, due to the nature of async games only the sending of the gamestate current move, and perhaps some checking of legal moves. Going to Amazon or getting dedicated hosting seems drastically overkill for what I want. If it makes a difference, I'm intending to learn and use Unity for this.


Multiplayer Game Node.js syncing other players' position I'm creating a multiplayer platformer game with 4 players in multiple rooms. I've read a lot of articles and researched about client prediction and lag compensations. I think I can somehow manage to understand how to update "my client". But what would be the best approach in the multiplayer platformer game to update "other clients". This is what I'm thinking Approach 1 the client sends input "left" to the server server increases the velocity of the player the server sends the actual input "left" of this client to all other clients other clients run the physics on the input. Apporach 2 the client sends the input to the server server adds velocity, update state game loop in server updates the position of every single client back to everyone, sends it to all clients client gets it and updates. What would be a better approach? or please if there is a better approach, tell me I am very stuck..


How can I prevent cheating in a distributed multiplayer game? A problem I've been thinking about recently is how it might be possible to create a multiplayer game without a centralised game server. Is it possible to distribute "server" responsibilities across players? I feel like it would be too easy for modified hacked clients to change the multiplayer experience, are there any ways around this?


What is the best time to implement Multiplayer system? I have been starting a new online multiplayer game project this week and as the title says Is it better to implement the Multiplayer feature right away, or is it ok to implement it when the game already has some other stuff, like maps and physics?


What data to exchange in multiplayer real time games? I am a hobbyist programmer and right now I am curious about what data is exchanged in a multiplayer session in real time games like starcraft 2. I did a bunch of searches. I found gafferongames.com offering a very good overview of the issues to consider. Glenn in his article and comments gives a very strong case for using UDP over TCP, but SC2 obviously uses TCP. To qoute Gleen, The problem with using TCP for games is that unlike web browsers, or email or most other applications, multiplayer games have a real time requirement on packet delivery. For many parts of your game, for example player input and character positions, it really doesn t matter what happened a second ago, you only care about the most recent data. So from his statement, I am guessing that his approach is to send the the full game state of every unit on each frame. If the server does not receive a player input on the current frame, then it's just back luck on that player. For God of War Acension, in which he is lead network dev, this should work quite well I guess. For SC2, due to it's replay capability, my gut feeling tells me that the underlying engine is a deterministic fixed timestep "user input playback machine", where the only data exchanged is player inputs. Hence Glenn's statement mybe completely irrelevant for SC2. Player input is important, and input sequence is even more important. I don't think it's feasible for SC2 sending game state of 200 units and more at 30 60 FPS. Question I could be wrong, but I have attempted to identify 2 possible types of data. What are other techniques? Will be good to qoute the game if you will. EDIT found this link about starcraft networking model


Why do console versions of multiplayer games support fewer players than PC versions? source http answers.yahoo.com question index?qid 20111205162848AAb1sl9 64 Players on P.C ( 32vs32) amp bigger maps with more vehicles amp buildings. 24 on Consoles ( 12vs12) ( It was planned to have a 32 player limit, but was later reduced to 24). Why does the console version have a maximum of 24 players? Is it hardware related? One of the reason was that players can host games themselves. If thats true its very sad that you cannot play 32x32, because one or two guys want to host games.


Can various browsers be assumed to maintain predictible state accurately in multiplayer online gaming? With many games it is said that server will assume that clients keep track of the world accurately. Assuming this is true, for a browser based multiplier space invaders game you would only tell the client when new bullets or the players ship moves and everything that behaves in a predetermined manner in the js client. It would be expected that positions would be the same in the browsers. Do you think you could trust browsers to do this? I feel that timings could differ between rendering loops and cause positions to get out of sync and might just get the server to maintain all the positions to make sure.


Client side prediction on FPS game I've recently attempted to develop a simple client prediction for an FPS based on Gaffer on Games famous blog (http gafferongames.com game physics networked physics ). Now I've gotten to the point that everything works (more or less), my main problem is crossing the message sent from the server and finding the appropriate snapshot on the client. I can use the last average ping time to find a very near state, but it will never be exactly timed placed as on the server. So my question is how exactly can I sync and find the time stamp sent from the server to the client and find which snapshot is the correct one on the client?


Is it possible to develop a game with Lua L ve and have the source code compiled? I've been looking at Lua and L ve for developing simple 2D games. But since Lua is interpreted and I know it can be compiled to some point, but how secure is that to decompiling. Or is there a better way to distribute the game?


How can I fix this code to spawn multiple types of enemies on the same point with the Corona SdDK? I have this code to spawn a simple enemy outside the window local function spawnGrupo1() local color01 display.newImage("assets img enemigos blue.png") color01.x 40 color01.y 50 physics.addBody( color01, density 5.0, friction 0.0, bounce 0 ) end timer.performWithDelay( 1000, spawnGrupo1, 0) But I want to be able to spawn multiple enemies from that point, and I can't figure it out. I tried this, but it doesn't work local function spawnGrupo1() local numero math.random(1, 3) if numero 1 then local color01 display.newImage("assets img enemigos blue.png") end if numero 2 then local color01 display.newImage("assets img enemigos yellow.png") end if numero 3 then local color01 display.newImage("assets img enemigos red.png") end color01.x 40 color01.y 50 physics.addBody( color01, density 5.0, friction 0.0, bounce 0 ) end timer.performWithDelay( 1000, spawnGrupo1, 0) How can I approach the problem?


how to display current time as a static value in lua pico8 Pico8 has a function time() that when called displays the current time from start of program. i.e. print(time(),0,0,14) prints time at (0,0) with colour 14 However the function doesn't stop and keeps drawing the time each frame. I'm trying to figure out how I would draw the time without it increasing changing. So If I printed this 5 seconds from the start of the program I'd want it to display 5, but not change from that 5 value. https pico 8.fandom.com wiki Time I don't know how to store a static value of this time as a variable. Although according to the wiki, assigning var time() will cause time at 0 to be stored. Another way of phrasing this is...how would I display the time of 10 seconds when the following print is triggered? So after 10 seconds "time's up" is displayed. How would I display the current time 10, as well, as a static? Maybe I don't know what the time is when the event is triggered, so how can I count using time()? function init() last time() end function update() (empty update to use game loop) end function draw() cls() if (time() last) gt 10 then print("time's up!", 44, 60, 7) end end


Love2D how to zoom out map? I've set up a basic map with Tiled, imported it with STI library (https github.com karai17 Simple Tiled Implementation) and everything looks in place. How can i get a zoom out feature now? I can kinda zoom in using scalex and scaley and i tried the same procedure to zoom out. However, if i set i.e. scalex 0.5, scaley 0.5 the map actually scales in size but it only fit 1 4 the screen size, and the remaining 3 4 are just black space.


var time() vs time() var pico8 lua time() is a preset function in pico8 gameengine. I don't understand whatsoever why I get an error when I write time() var But it's fine if I write (where var is any variable) var time() What are the rules dictating order? This makes no sense to me. For some context consider a time function time diff 0 function time change() if time() time diff gt 1 then time diff time() end end if You change to time() time diff.....it generates an error.


Game state management (Game, Menu, Titlescreen, etc) Basically, in every single game I've made so far, I always have a variable like "current state", which can be "game", "titlescreen", "gameoverscreen", etc. And then on my Update function I have a huge if current state "game" game stuf ... else if current state "titlescreen" ... However, I don't feel like this is a professional clean way of handling states. Any ideas on how to do this in a better way? Or is this the standard way?


Any advantage of having chunks with sizes by the power of two? With my past experience of having my little game lag because of the size of the world, I have decided that in whatever next project I might choose to create, I will split said world into chunks. Now here comes my question Should the chunk's width, height and depth be a power of two? For example, in a little game called Minecraft, chunks have a height of 256 and width,depth of 16. Both numbers a power of two. Is there any advantage over having the chunk simply be 100x100x100? Minecraft was written in Java, but I'm working in Lua. Just pointing that out in case it has any relevance.


Why is the button's code not running? My script for a slot machine isn't working. When the button in the Bilboard GUI is clicked, the below dosen't run. I am new to scripting and this is mostly based on wiki stack exchange Dev page info. local player game.Players.LocalPlayer local textLabel script.Parent local toggled false local button script.Parent textLabel.Text "Click to Play for 5 Cash!" slot1Combos "Bar", "Seven", "Seven", "Seven", "Cherry", "Cherry", "Cherry", "Cherry", "Orange", "Orange", "Orange", "Orange", "Orange", "Lemon", "Lemon", "Lemon", "Lemon", "Lemon", "Banana", "Banana", "Banana", "Banana", "Banana" slot2Combos "Bar", "Seven", "Cherry", "Cherry", "Cherry", "Orange", "Orange", "Orange", "Orange", "Orange","Orange","Lemon", "Lemon", "Lemon", "Lemon", "Lemon", "Lemon", "Banana", "Banana", "Banana", "Banana", "Banana", "Banana" slot3Combos "Bar", "Seven", "Cherry", "Cherry", "Cherry", "Orange", "Orange", "Orange", "Orange", "Orange","Orange","Lemon", "Lemon", "Lemon", "Lemon", "Lemon", "Lemon", "Banana", "Banana", "Banana", "Banana", "Banana", "Banana" local function onButtonActivated() if toggled false then toggled true x math.random(1,23) y math.random(1,23) z math.random(1,23) g false player.leaderstats currencyName .Value player.leaderstats currencyName .Value 5 if slot1Combos math.floor(x) "Bar" and slot2Combos math.floor(y) "Bar" and slot3Combos math.floor(z) "Bar" then player.leaderstats currencyName .Value player.leaderstats currencyName .Value 60 textLabel.Text "You Got 3 Bars. You won 60 cash" wait(5) textLabel.Text "Click to Play for 5 Cash!" elseif slot1Combos math.floor(x) "Seven" and slot2Combos math.floor(y) "Seven" and slot3Combos math.floor(z) slot2Combos math.floor(y) then player.leaderstats currencyName .Value player.leaderstats currencyName .Value 40 textLabel.Text "You Got 3 Sevens. You won 40 cash" wait(5) textLabel.Text "Click to Play for 5 Cash!" elseif slot1Combos math.floor(x) slot2Combos math.floor(y) and slot3Combos math.floor(z) slot2Combos math.floor(y) then player.leaderstats currencyName .Value player.leaderstats currencyName .Value 10 textLabel.Text "You Got 3 of a Kind. You won 10 cash" wait(5) textLabel.Text "Click to Play for 5 Cash!" elseif slot1Combos math.floor(x) "Cherry" and slot2Combos math.floor(y) "Cherry" and slot3Combos math.floor(z) "Cherry" then player.leaderstats currencyName .Value player.leaderstats currencyName .Value 20 textLabel.Text "You Got 3 Cherries. You won 20 cash" wait(5) textLabel.Text "Click to Play for 5 Cash!" elseif slot1Combos math.floor(x) "Cherry" and slot2Combos math.floor(y) "Cherry" or slot3Combos math.floor(z) "Cherry" and slot1Combos math.floor(x) "Cherry" or slot2Combos math.floor(y) "Cherry" then player.leaderstats currencyName .Value player.leaderstats currencyName .Value 3 textLabel.Text "You Got 2 Cherries. You won 3 cash" wait(5) textLabel.Text "Click to Play for 5 Cash!" elseif slot1Combos math.floor(x) "Cherry" or slot2Combos math.floor(y) "Cherry" or slot3Combos math.floor(y) "Cherry" then player.leaderstats currencyName .Value player.leaderstats currencyName .Value 3 textLabel.Text "You Got 1 Cherry. You won 3 cash" else textLabel.Text "Sorry, you didn't win" wait (5) textLabel.Text "Click to Play for 5 Cash!" end end button.Activated Connect(onButtonActivated) end) This is the explorer tree with the script highlighted


Obscuring stored info in a flat text file I have an idea for an addon for World of Warcraft which would basically be a minigame within the game itself. Eventually, I'd like to have players be able to compete against each other directly. The game would have some RPG like elements, particularly statistics and abilities, which it would be undesirable for the end users to modify. So the fact that this is a client side script, where everything (logic and data storage) are all in flat text files, means that it's impossible for me to truly secure things. But I'd like to at least make it non trivial to alter things, e.g. so that you can't just open up a file in notepad and type in 'Strength 256'. I'm looking for any ideas on how I might obfuscate the data, preferably something which is easy to implement as it's not really what I feel like spending my time on, but probably more sophisticated than ROT 13. As an example, one idea I had, which I'm not sure if it's feasible (have never made an addon for WoW before) is to serialize the data in base 64.


How to use LuaJIT the same that Lua in a C program? I'm using Lua in my C program, as an library. But I read that LuaJIT is a better implementation. Is it posible to replace with LuaJIT with little change? How?


Finding equivalent axial coordinates for a wrapping hexagonal map of radius n I'm creating a wrap around hexagonal map that will potentially render infinatly. With the method I'm using, I have an x y coordinate I use to find it's equivalent axial coordinate with the equations Q (sqrt(3) 3 x 1. 3 y) hexSize R (2. 3 y) hexSize the problem is, my map is of radius n and it's possible for the Q R coordinate to be far outside that radius. How can I find the equivalent Q R coordinate within the radius n? I know methods for a single radius outside, but I'm talking the potential of having a radius of 15 but a Q R something like (9999999,99999999). What would that coordinate be in relation to the center of the 15 radius hex region it'd be in?


Turn Based AI Algorithm (Small Board, Two Steps) This is my Game Board The Red Balls are the AI Controlled Actors. The Blue Balls are the Player Controlled Actors. The Yellow Cells are the locations, from which the Red Balls can attack. Each Red Ball can do 2 actions move move, move attack, attack attack. At no time there can be 2 minions on one cell, but a minion can arrive on a cell another just left. Its the AI's turn. Its planning the whole turn for all minions, each of them has the two moves. The objective is to maximize the number of melee attacks, which can performed in a single turn (2 actions) on the player balls. Problem I have in my current (brute force) implementation Sometimes it is advisable for a minion to move, although it is already in a melee position, to make space for another minion, which can then move into melee range aswell. Example In this situation its more effective for the front minion to move once, so another minion can move into melee range as well. Do you know an effective algorithm for this job? Thank you for your time!


Prevent collisions between mobs npcs units piloted by computer AI How to avoid mobile obstacles? Lets says we have character a starting at point A and character b starting at point B. character a is headed to point B and character b is headed to point A. There are several simple ways to find the path(I will be using Dijkstra). The question is, how do I take preventative action in the code to stop the two from colliding with one another? case2 Characters a and b start from the same point in different times. Character b starts later and is the faster of the two. How do I make character b walk around character a without going through it? case3 Lets say we have m such characters in each side and there is sufficient room to pass through without the characters overlapping with one another. How do I stop the two groups of characters from "walking on top of one another" and allow them pass around one another in a natural organic way. A correct answer would be any algorithm, that given the path to the destination and a list of mobile objects that block the path, finds an alternative path or stops without stopping all units when there is sufficient room to traverse.


How to generate Bayer matrix of arbitrary size? In ordered dithering Bayer matrix is used. How is that matrix generated? What algorithm can be used to generate matrix of arbitrary size?


How can I write my scoring system and add a score multiplier? I am new to the scripting world and I am currently trying to add a score multiplier to the game code I am working on. Right now the score is set to increase as the player runs across the level however I want to set it up so that the players gains X amount of score for every Y amount of distance traveled. I also want to add a multiplier for when they come into contact with certain objects X amount of time. Any help would be greatly appreciated.


How to find all possible destinations, within a certain walking distance of a unit? I have a standard 2D grid that i use for pathfinding. I already use A to find the path of my units when I want to move them around. What I need to implement now is a preview of all possible destinations of the unit when it is selected. Here is what I want to achieve. The yellow orange cells represent the possible destinations. I want to make this as optimized as possible, because it can be executed on very big maps and for multiple units. I have something in mind but I wonder if there is better approach for this. Here is my idea Get a list of all cells that are walkable in a square around my unit. The square will be from Unit.X Unit.Speed to Unit.X Unit.Speed for X axis and Unit.Y Unit.Speed to Unit.Y Unit.Speed for Y axis. For each element in this list, execute A search to see if it is possible to find a path. By doing the search for only the cells that are within my unit range I should be able to do this on big maps. Basically this is the same feature that we have in games like Heroes 3 and many other turn based games. Screenshot I was also wondering when it is a good idea to execute this pathfinding logic. When you select a unit (might result a spike) or when something moves on the map to update the list of all possible destinations of all units on the map.


Calculate 8 different directional input based on arrow keys combinations Considering I have four variables event binded to each arrow key, that can be 0 or 1 My current approach to this issue is simply 8 nested ifs checking each combination or keys Is there a more math y clever way to solve this issue?


Action oriented AI evasion algorithm takes much time Evasion, the process of evading, is the opposite of chasing. Instead of trying to decrease the distance to the target we try to maximize it. It takes much time while evading multiple objects simultaneously. I use BFS here. To make it faster what algorithms should I use?


Is there a known most efficient version of A search algorithm? Is there a known 'most efficient' version of the A search algorithm? I know some people write papers on the most efficient way to compute common operations, has this been done for A ?


Real Time Dynamic Pathfinding? I'm currently doing some pathfinding research and my simulation is the following I have a 3d scene with a start and end point represented, I'm capable of creating navigational meshes, waypoints and polygons to aid with pathfinding. I've tried an A algorithm and some of its variants and they work perfectly. However, now I'm more interested in 'dynamic' pathfinding. For example, while finding a path from point A to point B, if a new obstacle suddenly appears, i want my algorithm to immediately be able to re plan a path and not start searching from scratch again. I've done some reading on the D algorithm and wondering if this would be appropriate for what I need or would this seem like an overkill. So my questions basically are What algorithm would be best for Real Time Dynamic Pathfinding? OR what combination of techniques could I use instead?


Love2D STI library not drawing map at all (black screen) I'm trying to use a pretty standard map with the Simple Tiled Implementation module for Love2D, but no matter what I try, I can't get it to display anything but a black screen. Here's my current code (keybindings in an effort to see if the map has just been placed offscreen) local sti require "sti" local mapPos x 0, y 0 function love.load() map sti("maps map1.lua") end function love.update(dt) if love.keyboard.isDown("w") or love.keyboard.isDown("up") then mapPos.y mapPos.y 5 end Move player down if love.keyboard.isDown("s") or love.keyboard.isDown("down") then mapPos.y mapPos.y 5 end Move player left if love.keyboard.isDown("a") or love.keyboard.isDown("left") then mapPos.x mapPos.x 5 end Move player right if love.keyboard.isDown("d") or love.keyboard.isDown("right") then mapPos.x mapPos.x 5 end map update(dt) end function love.draw() Transform world love.graphics.translate( mapPos.x, mapPos.y) Draw world map draw() end However, even a more basic attempt (copied from the STI tutorial linked from the README on the Github page) doesn't work, again giving a black screen Include Simple Tiled Implementation into project local sti require "sti" function love.load() Load map file map sti("map.lua") end function love.update(dt) Update world map update(dt) end function love.draw() Draw world map draw() end My directory structure is basically just main.lua, an assets folder, and a maps folder. The maps folder contains the Tiled tile set and the Tiled .tmx maps and the lua exported maps. I'm on Mac OSX, using Love2D version 0.10.2. Am I missing something? Thanks.


Is there a name for this technique to put the tiles on the corner of a level? A very common approach in development of old games is to put the tile set on the corner of a level, to use it as a reference. For example On this level, the developers put a set of tiles in the upper left corner. But is there a name for this technique? I'm writing a manual about that and I would like to name it.


Store metadata for tile in Tiled Map Editor In my tilemap based game, I need to associate lights with light switches, buttons with doors etc. I am using the Tiled map editor (mapeditor.org), but I have yet to find a way to store these associaltion. My idea is to store a number with each tile, so I can have groups of tiles that interact with each other. Is there a way to store custom data with each tile in the Tiled map editor? Just to be clear I don't want to store custom data with each tile type, but with individual instances of one tile type.


Touch Gesture Map Movement I really dig the way that the map is moved in Clash of Clans (https itunes.apple.com ca app clash of clans id529479190?mt 8)... I can recognize the pinch and finger movement needed for the zooming and the swiping around the map, what I'm looking for is a tutorial in any language that reveals how to test for the map going out of bounds when moved or scaled. My google fu has failed so far on this one, any hints? Right now I can perform the scale operations and the movement operations, but I can't figure out how to stop the map from going out of bounds when pinched or scaled. My code is a crazy mess and makes me think I'm missing the fundamental logic of how this is done. (I am using Starling with AIR, but a tutorial in any language if you have a link). Update this is what I'm basing what I have currently so far https github.com PrimaryFeather Starling Framework blob master samples demo src utils TouchSheet.as


Are there definitive, unambiguous terms for hexagon tile orientations? I have been working on a tile map editor and plan to support two orientations for hexagons. I have seen various terms used, but these all seem ambiguous to me. Horizontal, Vertical (ambiguous does this mean they line up horizontally, or stack horizontally?) Flat, Pointed (ambiguous Are they flat on the sides or top and bottom?) I would like to find unambiguous terms for the following two orientations for hexagons ideally, these would be definitive and succinct (I could refer to these as "Flat on Top" and "Pointed on Top" but would prefer something more technical and authoritative). Edit I was holding out for something more technical, but it's hard to argue with Amit. For me, "pointed" sounds more formal than "pointy," so I am going to use the following (a decision reinforced by DMGregory's answer) Flat top and Pointed Top.


How do I make my foreground tiles stand out more from the background? (the background implemented in the game) In the game that I work on, the background and the map tiles are pretty indistinguishable for new players, probably because they have similar colors and theme. Are there any tips or tricks to make the background more like a background and be distinguishable from the map tiles? The game has motion blur which kinda helps, when the player is running the background gets blurry therefore making it more distinguishable from the map tiles. However, that is clearly not enough. Any suggestions, tips or tricks will be greatly appreciated! (purely the background) EDIT Thank you for the suggestions and the ideas! here are some variations of this background that I came with. (darker and way more blurry) (dawn colors and some blur) (one of the coolest things I've done blur) (one of the coolest things combined with dawn colors blur)


What maps sizes did old 2D RTS games like C C and WarCraft support? I'm looking for the size (in tiles) of the maps for the old 2D games Command and Conquer and Warcraft 1 and 2.


Hexagonal Game Board Modal? Tile based games like Chess have a simple modal an array of arrays, each coordinate with an X and a Y value. This is easy to implement, and it is easy to figure out what is going on. Chess Board http www.chesscentral.com EasyEditor assets chess board blank.gif However, when I see games like Civilization 5, I am not sure how hexagonal worlds are implemented. I have a couple ideas, but cannot confirm them. Each row of hexagons is represented in the modal by an array of tiles. This would be much like the first chess board, but would require more effort to figure out adjacent tiles. Each tile only know what tiles border it. When the game renders one tile, that tile loads the 6 around it, which repeats until the screen is filled with tiles. Are either of these guesses correct? If not, how do developers implement these hexagonal maps?


Tiled tilemapper isometric I'm attempting to move from oblique mapping (45 degree angles) to isometric (30 degree angles) in Tiled. I made a test tile in Photoshop Made an isometric map But my tile appears completely distorted, and the 'isometric' map just appears as a top down grid rotated 45 degrees How do I create a proper isometric scene using tiled? Hi, in your example (here), your Tiled grid is angled down. As you can see, mine appears Top down. How do I configure this?


Torque2D, Class vs Datablock I'm scripting my first game with Torque2D and have not fully understood the difference between "Class" and Datablock. To me it seems like Datablock is similar to a struct in C C or a Record in Pascal. If I create Datablocks with keyword new, are they instantiated in the same way as a "Class"? I have a large TileMap and need to attach some information to each Tile. I was thinking to use a Datablock, as a struct, to attach this information to the tile's CustomData property. The two questions are What is a Datablock and should I use a Datablock or a "Class" for this tile information?


Getting a Ranged AI "In Range" to shoot In my game, ranged units and melee units have the same behavior. Ranged units try to maintain a fixed distance r, from their targets. If they're within r d of the target (where d is a small value) they stop and shoot it. Note that this means the ranged unit can't be closer than r d. Melee units are the equivalent of ranged units, but with r set to zero. Right now, my AI for ranged units is as follows Find a path to the target using A . Walk along the path until you are within r d, r d of the target. Stop and shoot. If the target is dead, quit. If you are still within r d, r d , goto 3. Otherwise, move away towards the target until you are within r d again. Goto 4. Here's a sort of diagram. My problem is, if there are obstacles and the target moves, step 5 causes a lot of problems. Ranged units will end up backing into walls, unable to shoot. If instead of going to step 5 I go back to step 1 (planning a path), the problem still isn't solved, because walking toward the target will only decrease the range, not increase it. How can I get ranged units to successfully follow and shoot their targets?


How does an AI determine the bearing to follow within a nav mesh? I've done some reading on nav meshes, and I understand how to generate a path of polygons to reach a goal. However, what I don't understand is how you determine the bearing to follow within each polygon. Without a central node to aim for, what do you aim for? I suppose you could cast a ray to the goal and then head to the point where that ray crosses into the next cell but that would only work if that next cell is actually on your path. If your ray doesn't cross the edge into the next cell, do you instead plot a path to whichever corner of the edge is closest to the goal? I think that would get you the path shown in the 3rd diagram, but would it work in all cases? http udn.epicgames.com Three NavigationMeshReference.html


Are there any pathfinding algorithms that would handle different movement types? I'm developing a bot for a BattleTech board game simulator http en.wikipedia.org wiki BattleTech, it is turn based. The board is divided into hexagons, each one has a different terrain type and elevation. You drive a robot which moves over them, to destroy other robots. I only know Dijkstra and A pathfinding algorithms, but the problem is that there are 3 types of movements walk, run and jump several hexagons (each of them have their own rules). Walk and run are almost the same. The best path could be a combination or each movement type. Here is an example of map http megamek.info sites default files isometric view.png Do you know a good algorithm for this complex pathfinding or a way to combine A results for each movement type?


State machine interpreters I wrote my own state machine tool in C and at this point I'm faced with two choices for specifying state machines. Crafting a little language and writing a interpreter. Writing a compiler for that language. I know the advantages disadvantages of each. I'd like to know what choices game programmers have made for their games. If you've used a state machine in your game in any form, I'd be interested in knowing how you did it.


How can I apply steering behaviors to a car controlled with turning and acceleration? I feel like I've got my head around steering behaviors, but I've having trouble applying them to a car. The steering behaviors return forces that one could apply to an object that can move in any direction, but a car can essentially only move forward and turn. I'm having trouble determining how hard the car should turn or how much it should accelerate forward based on the steering force. How can I translate a steering force into the car's input?


How do I end a behavior tree's action early without evaluating the entire active branch? I'm reading about behavior trees, and one of the common recommendations I've seen is to maintain a reference to your running action so that you don't have to traverse the entire tree during every game loop. Without traversing the entire tree every time, how do I check if an action should end early? For example, suppose I have the following tree and the AI encounters an enemy that's closer than 10m, so he starts to aim his weapon. But then while he's aiming, his HP drops below 50 . I would want the agent to stop the aiming firing sequence and move to the "use medkit" action. The only way that I can think of to accomplish that sort of behavior is to evaluate every node in the active branch starting from the root node during every game loop. But based on what I've read, evaluating the entire active branch every game loop is discouraged. Is there a way to be able to abort an action if a higher level node is no longer valid, while not spending a lot of processing power evaluating the entire branch every game loop?


Neural Net Controlled Car I'm trying to make an AI car controlled by a neural net. I saw this two videos Neural Network Demo and Q Learning and neural network in 2D car driving and I want to replicate that. I already have the neural net code made, with a back propagation algorithm. The thing is, I don't know how to reinforce the learning of the net. What kind of value should I use to calculate the error? My car currently have 5 inputs (similar to the first video), and outputs 2 numbers, 1 which is plugged in the rotation torque of the car, if it's positive it will rotate clock wise, if it's negative counter clock wise, and how much it will turn is based on it's magnitude, it ranges from 1 1, and I mapped it to a desired min max rotation. The second output number is acceleration, it's from 0 1, but mapped to 10 100 (so it can reverse).


Should enemies still attack if they cannot see the player? This may seem like a silly question, but let me explain this further. Consider a common stealth situation where the player is hidden from the enemy AI. The AI has vision and hearing and if they either see or hear the player they will move towards the player's last known position. However if the player is behind cover (therefore the enemy cannot see them) and they attack with a silent weapon (therefore the enemy cannot hear them either), how should the enemy react? Realistically, the enemy should have an idea of the direction from which the attack struck them and therefore start moving in that direction. But I am wondering if this then would be detrimental to taking a stealth as oppose to offensive approach. If the enemy turns around when hit irrespective of whether they were hit with a loud or silent weapon, there is little benefit to using a silent weapon, since the loud ones will have more power anyway. On the other hand, if the enemy simply stands their while being hit several times by a silent pistol, it may make the AI seem a little stupid. I suppose it comes down to balancing between rewarding stealth gameplay in a stealth game, but not making the AI seem silly at the same time. What should I do to balance this?


How can I implement a "20 Questions" algorithm? Ever since childhood, I've wondered how the 20Q electronic game worked. You think of an object, thing, or animal (e.g. potato or donkey). The device then asks you a series of questions such as Is it larger than a loaf of bread? Is it found outdoors? Is it used for recreation? For each question, you can answer yes, no, maybe, or unknown. I always imagined it work with immense, nested conditionals (if statements). However, I think that's an unlikely explanation because of its complexity for the programmer. How would I implement such a system?


How would one approach developing an AI for a trading card game How would one approach developing an AI for a trading card game(e.g. Magic The Gathering, YuGiOh, etc.)? I'm not sure where to even begin. How would "Easy", "Normal", and "Hard" AI difficulties differ under the hood?


Server hosting and costs I'm developing a game that will require renting a server. The server will be used to host scores, clans, friends(on off), match making, lobby, and chat. The game match will be hosted by each player (to lower the cost). How much would a server like this cost? Any hosting recommendation? How much would it cost if the server hosts the games matches too? I want to know a base price (imagine a card game or turn based RPG, even though my game is real time).


Implementing an online database I'd like to get into online games programming. I thought that as a start i'd be a good idea to implement an online database that would store the progress and score for a game i have made, i'll probably want to implement an account system too. My issue is, i can't see to be able to ask google the right question. I don't know where to start. I've touched some on SQL and PHP, HTML and XSL, but, to me they're just languages, i can't see the big picture, how do these things connect to form a working service? I'm not looking for a solution, i just don't know what should i learn. I'm not looking for knowledge on sockets, i'm familiar with network programming, i just don't understand the "modern" process of handling databases. I'd be very happy if somebody could lay out the structure of a database, how you put it out on the web, how you access the information and change it (not in a direct solution, just "this is done by programming a filter in SQL"), what languages are used for it, etc.


Multiplayer tile based movement synchronization I have to synchronize the movement of multiple players over the Internet, and I'm trying to figure out the safest way to do that. The game is tile based, you can only move in 4 directions, and every move moves the sprite 32px (over time of course). Now, if I would simply send this move action to the server, which would broadcast it to all players, while the walk key is kept being pressed down, to keep walking, I have to take this next command, send it to the server, and to all clients, in time, or the movement won't be smooth anymore. I saw this in other games, and it can get ugly pretty quick, even without lag. So I'm wondering if this is even a viable option. This seems like a very good method for single player though, since it's easy, straight forward (, just take the next movement action in time and add it to a list), and you can easily add mouse movement (clicking on some tile), to add a path to a queue, that's walked along. The other thing that came to my mind was sending the information that someone started moving in some direction, and again once he stopped or changed the direction, together with the position, so that the sprite will appear at the correct position, or rather so that the position can be fixed if it's wrong. This should (hopefully) only make problems if someone really is lagging, in which case it's to be expected. For this to work out I'd need some kind of queue though, where incoming direction changes and stuff are saved, so the sprite knows where to go, after the current movement to the next tile is finished. This could actually work, but kinda sounds overcomplicated. Although it might be the only way to do this, without risk of stuttering. If a stop or direction change is received on the client side it's saved in a queue and the char keeps moving to the specified coordinates, before stopping or changing direction. If the new command comes in too late there'll be stuttering as well of course... I'm having a hard time deciding for a method, and I couldn't really find any examples for this yet. My main problem is keeping the tile movement smooth, which is why other topics regarding synchronization of pixel based movement aren't helping too much. What is the "standard" way to do this?


How to handle MANY enemies in networked P2P game? Let's suppose a game of 4 players, one is the host. They will fight many enemies, along the lines of 20 40 at the time. Among other things like sending their own state to the other players (position, rotation, shot this frame, crouched, etc). How do I handle the enemies? Do the host "decides" the enemies state? (again position, rotation, isattacking, etc). And then sends several messages to the other players so they sync their own game? or do I "divide" the enemies, lets say 40, and 4 players, 10 enemies "controlled" by each player game? and then, each player sends those messages to the other players so all enemies are in sync? Also, should I group the messages and send one big message instead of 40 little ones? How do I know how big can the message be (how many enemies info in each message)? Basically I'm asking whats the best way to handle a 4 player p2p game with many enemies on screen. Any good tip is appreciated.


Lag Compensation in a Real Time Game I have been trying to implement some lag compensation techniques for a real time game, I've found some good resources online, but I don't think I fully understand the server side part of the problem. The game is a simple 2D game, where the player moves an entity around the map. There will be other entities with their own behavior that are controlled by the server, but I made it so that their movement can be easily interpolated. The player input is quite simple an analog stick and some commands (pick target, loot objective, etc.). The game runs at a fixed 10 TPS (it's on mobile and it's not that action packed, 10 TPS will suffice). The client will send the input state every tick (even if no input is present, like the analog stick is in the default position). It is worth mentioning that only one player is connected at the same time, so in a way this is not multiplayer, but I need to run this on the server as well to prevent cheating. I understand client side prediction and that's quite straightforward to implement. I am struggling with the server side part. As far as I can see I have 3 options The server waits for the input from the client then computes the new game state and sends it to the client. This is a viable option only because there is only one player. The server runs the game loop waiting up to 100ms (10 TPS 100ms tick) for an input. If it gets one, it will be taken into consideration when computing the next state, otherwise it will be discarded. If an input arrives after the tick was done, it will be discarded. If an input arrives during this timespan, but the tick numbers don't match (client send input for tick 5, but server is at tick 7) it will be also discarded. The server runs the game loop waiting up to 100ms (10 TPS 100ms tick) for an input. If it gets one, it will be taken into consideration when computing the next state, otherwise it will be discarded. In this case it will not care if the input is not for the current tick, it will apply it anyways. Option 1 is the easiest to implement and will be more consistent. The biggest issue with this is that I believe it's easy to cheat. Since the server is waiting for input, the player might be able to "pause" the game, analyze the situation then dispatch the action, basically allowing a cheating player to play in slow motion. The client side reconciliation in this case seems easy, when the player moves, it will move instantly on the screen and when it received the updated state from the server it will do it's reconciliation. Option 2 is a tad harder to implemented (not by much though), but it will be unplayable (literally, the player won't be able to move) if their ping is higher than 100ms. Option 3 has the same complexity as Option 2. It will work with pings higher than 100ms but it will most probably lead to some frustration on the player's side since their inputs will not arrive in time. Is there a better way to do this? What are your thoughts?


Which server platform to choose I'm going to write a server for an online multiplayer with these requirements Pretty simple turn based game (think a card game) that is played entirely on the server (security reasons) Must be able to run multiple games (tables) with 4 players per table, but no lobby system required (another server takes care of that) Can support as many players at once as possible Might need multiple servers Chat between players Socket connection to a Flash AIR client Must be able to communicate with other servers (for player accounts and such) Now, I'm considering two options Smartfox (or equivalent) A custom Java solution in something like Tomcat Why Smartfox? It handles multiple rooms and chat natively It presumably has solutions for well known multiplayer gaming issues Why custom? Smartfox has many unneeded functions, bad for performance Smartfox communicates with an XML based format, I could use a more efficient binary one. Don't know if running the entire game model on the server is convenient with Smartfox' extension mechanism Multiple rooms and chat are easy to reimplement Tomcat or a lightweight container is easier to deploy than Smartfox Better IDE support for developing on Tomcat (automatic deploy, etc) What do you think? Are my assumptions correct? Do you have anything to add? What option should I choose (or maybe a different one entirely)?


How to measure packet latency? In the context of lag compensation, one needs to know when the command is instantiated on the client (this can be named as "command execution time" as well). AFAIK, there can be 2 methods for this Client sends a timestamp with the command. Client doesn't send any timestamps, but server does a smart thing to calculate the command's instantiation time. About 1 Is this safe in terms of cheating? About 2 According to Valve's paper, command execution time is as following Command Execution Time Current Server Time Packet Latency Client View Interpolation This means, server must know the packet latency. Another paper from Valve confirms this and says Before executing a player's current user command, the server Computes a fairly accurate latency for the player ... How can the server compute "fairly accurate latency for the player"? Most naive and easiest approach would be sending pings regularly (less frequent than game commands and updates though) to find out an average of the latency and use it. Busy network traffic, latency fluctuation and naiveness of this method makes me feel there must be a more elegant way. EDIT Would UDP vs TCP change anything in this context?


How to interpolate server updates on the client for multiplayer? I am implementing client side prediction and an authoritative server multiplayer architecture. I am following along with the series of articles from http www.gabrielgambetta.com entity interpolation.html I am at a point of confusion and have a few questions. Within my client game loop I have a sequence of actions that update the local state. applyLocalUpdates(state, loopTime) reconcileLastRemoteUpdate(state, loopTime) applyLocalUpdates This updates all the entities positions based on their local physics and game logic simulation. reconcileLastRemoteUpdate I am in the process of implementing this and is the point of confusion. My initial naive attempt takes the last received server state and sets each local entities position to that last remote one. This produces a choppy update effect. When each server update comes in the entities jump to match that last server position. This is where I am trying to add interpolation... I have interpolation methods like vec3.lerp(a,b,t) and quat.lerp(a,b,t) which I use to update the position vector and rotation quaternion. My unknown points are Which values do I pass for a and b in the interpolation? Is this the most recent local state and the last server state? What value do I pass in for t in the interpolation? This I'm highly confused. Is this the difference of elapsed time between the last 2 server states? Is it the difference of elapsed time between the last local update and the last server update? Additionally, should I swap the order of execution between applyLocalUpdates and reconcileLastRemoteUpdate ?


Networking Packet Design When using a Client Server model, it's necessary for those two parts to communicate data back and forth. There is one specific area that I've been thinking about and unsure about. That being putting certain information in a main update packet, that is sent every n milliseconds, or send it once when it happens. An example would be a turn based strategy game. When one player's turn ends, and the next player's turn starts, you could send one packet to notify the clients of the change, or every n milliseconds, tell the client whose turn it is and it can determine when it changes. These are the pros I see to these approaches Inside Update Packet Harder to become desynced if packets are lost, whereas if sent as an individual packet and the client fails to receive it, could create big desync issues. Individual Packet Sends less data between the server and client since it only sends it once, instead of every n milliseconds. I'm fairly new to game design, so I'm not sure if there is a general consensus about the proper way to do this. There may also be another solution that I haven't thought of. Any input would be great.


Movement networking for a Worms like game I want to implement a strategy artillery game, similar to Worms Arcanists. As game development (and game networking especially) is new to me, I was wondering whether this would be a good performant way to do the movement networking Server has all client's positions. Moving client to server Message start moving, moving direction Server now starts a simulation of the moving client moving. Server to all clients, except originating one, every 100ms(?) Message set client position client id, new position new position calculated by the server's simulation Clients lerp the moving client's position. Moving client to server Message stop moving server's simulation ends Server to all clients, including originating one Message set client position client id, final position all clients have the same position for the moving client in the end


UI Automation for Flash Games has anyone used or heard of a good selenium like toolset for doing automated UI testing with Flash? I would ideally like to have the ability to record and playback events against my game and integrate this into our build server.