Page:21 - News Archived: 3437

Title Date
What should I learn before I create my own game engine - Link Sun, 27 Sep 2015 00:42:00

Hello everyone. Im new to game programming and I was just curious where I should start out if I want to create my own game engine. Thank you.

Use openGL in game engines - Link Sat, 26 Sep 2015 23:20:51

Hello. I Would like the make a small add for an android game. This addon requires that I have a small ui menu. This menu has to be compatible with all game engines. Does anyone know how i could make a addon for a game that can be cross compatible with all major game engines. I know that opengl is used alot . Can I directly access open gl from a java game engine and draw the menu i need for my game addon. Because If opengl is used with so many game engines then my code should be compatible with most of them. Is that true. If im wrong what is the most cross compatible ui that i can use for a game addition. This addition servers a sertine purpose which isnt important now its somthing that interacts with my phone while im playing a game. So I want to make an addon that I can add into most games and have it compatible on alot of game engines. Thanks for the help bye.

Simple GUI library to use with openGL - Link Sat, 26 Sep 2015 23:08:14

Hello. I hope this is the right place to ask this. I am writing a small first person RPG based on a 2D tile map so no complex collisions is needed but 3D rendering and decent GUI are targeting desktop systems with these good old keyboards and mouses. I have what I would call intermediate C skills but this project is the first one I work on where I need 3D rendering. I have chosen OpenGL because I work on Debian and that it have an implementation for both Windows and major Posix-compliant systems. I am a pure newbie when it comes to 3D stuff and I never was good in maths. I can learn those though and intend to when Ill have reached decent rendering and logic engines in term of number of features. Eye-candy-ness can wait. I already have a very rough 3D renderer but now I need to do basic GUIs for things like configuration or showing inventory. What I need is a really basic GUI library able to accept text input and display icons in movable and re-sizable windows movable and re-sizable by the user in-game not through an external tool. Ideally it would not try to support exotic stuff like XMLHTMLCSSJS I already have to learn glsl you know.... Simply placingsizing windows with something like window.movexpos yposwindow.resizewidthheight would be far enough and if more is wished in future I would already have at least something to play with. The library I am currently using to connect the OS displayinput is GLFW but if the libraries you know does not support it but instead SDL or SFML and are not too dependent with those I could do the port of the lib. Writing such a library should not be too difficult ok I know that text is pretty horrible when it comes to i18n but as long as I can display something Im fine... if I was not that bad at understanding OpenGL shaders. But if you do not know about such a library if you can point me a link toward a minimal code which just print a sprite over a 3D scene I would be pretty grateful too. I have found AntTweakBar which does almost what I need _ damn simple public API _ text input _ windows that the user can manipulate easily... but unfortunately it does not support icons printing and the code quality is... Ill just say poor. I tried to add the feature myself but I went lost in the 20KLoC of the 2 main source files between zombie code god objects global variables C allocation of C classes and more... Any help will be really welcome on this.

Unbind Render Target - Link Sat, 26 Sep 2015 21:25:04

Hi guys I dont really understand what is going on here this is simplified for clarity set render target to rt0 d3d_context-gtOMSetRenderTargets1 d3d_rt0_view nullptr d3d_context-gtDraw... now use rt0 as shader input set render target to rt1 shouldnt this unbind rt0 d3d_context-gtOMSetRenderTargets1 d3d_rt1_view nullptr this breaks my ssao and causes debug errors d3d_context-gtPSSetShaderResources0 1 d3d_rt0_shader_view d3d_context-gtDraw... Im basically rendering to textures then using them in a shader for SSAO etc. Thanks. SOLVED I have to unbind it explicitly like this ID3D11ShaderResourceView srvs1 nullptr d3d_context-gtPSSetShaderResources0 1 srvs

c - GDIPLUSImage how save an Image object on stream way - Link Sat, 26 Sep 2015 20:58:55

i have Image img how can i save the img in stream way for overloading the ostream ltlt operator i have these code but dont works int GetEncoderClsidconst WCHAR format CLSID pClsid UINT num 0 number of image encoders UINT size 0 size of the image encoder array in bytes ImageCodecInfo pImageCodecInfo NULL GetImageEncodersSizenum size ifsize 0 return -1 Failure pImageCodecInfo ImageCodecInfomallocsize ifpImageCodecInfo NULL return -1 Failure GetImageEncodersnum size pImageCodecInfo forUINT j 0 j lt num j if wcscmppImageCodecInfo91j.MimeType format 0 pClsid pImageCodecInfo91j.Clsid freepImageCodecInfo return j Success freepImageCodecInfo return -1 Failure IStorage pIStorage NULL IStream pIStream1 NULL HRESULT hr Status stat Ok hr CoInitializeNULL hr StgCreateDocfile LCompoundFile.cmp STGM_READWRITESTGM_CREATESTGM_SHARE_EXCLUSIVE0 pIStorage CLSID jpgClsid GetEncoderClsidLimagegif jpgClsid pIStorage-gtCreateStreamLStreamImage1 STGM_READWRITESTGM_SHARE_EXCLUSIVE 0 0pIStream1 rhs.img-gtSavepIStream1 jpgClsid NULL lhsltlt pIStream1 pIStream1-gtRelease pIStorage-gtRelease i dont get the image on file. or isnt read correctly IStorage pIStorage NULL IStream pIStream1 NULL IStream pIStream2 NULL HRESULT hr Status stat Ok hr CoInitializeNULL hr StgCreateDocfile LCompoundFile.cmp STGM_READWRITESTGM_CREATESTGM_SHARE_EXCLUSIVE0 pIStorage pIStorage-gtCreateStreamLStreamImage1 STGM_READWRITESTGM_SHARE_EXCLUSIVE 0 0pIStream1 lhsgtgt charpIStream1 rhs.img-gtFromStreampIStream1FALSE pIStream1-gtRelease pIStorage-gtRelease anyone can advice me

Perfect aabb frustum intersection test - Link Sat, 26 Sep 2015 20:57:58

The only way I know how to do perfect aabb frustum intersection tests is using separating axis theorem. Where you project the vertices of the frustum and aabb onto some axii test for disjointness. And this works fine but now Im trying to get a frustum that extends forever and has no far plane. Can I extend SAT to work with this type of frustum or is there another algorithm I can use

ndotL environment mapping - Link Sat, 26 Sep 2015 18:15:01

Ive been reworking my lighting shaders for physically based rendering. Real-Time rendering 3rd edition scales specular reflection by nDotL page 269 which makes sense that nDotL should apply to both diffuse and specular. Therefore should I also scale the light from environment mapping to do specular reflections by nDotL as well Seems like I should since environment mapping reflections are basically the same thing as light source specular reflections. However I couldnt find a mention in Real-Time rendering of this.

XMVector3TransformCoord - Link Sat, 26 Sep 2015 15:41:15

Hello. Im working with DirectX 11 and C. I have a mesh with some vertices and some generated points for the bounding box min and max vertice. I also have the transformation matrix for that mesh. When I render the mesh and another generated mesh for debug made from the min and max bounding points it renders them correctly. I just send the world transformation matrix to both original mesh and bounding mesh and everything is ok. But I want to make a function that will detect the distance between the camera player position and the mesh. So I need to transform the boundind vertices from local to world space and Im usingXMVector3TransformCoordboundingVectorMin transformationMatrix and I get weird results. The matrix is the same as for the original mesh but when I transform the bounding vertices with that matrix XMVector3TransformCoord and render them with Identity matrix in the shader I dont get the same result as when I send the original matrix to the shader. Any idea why this happens

How to deal with inconsitent game state in entity interpolation - Link Sat, 26 Sep 2015 14:11:25

Im prototyping an online fast paced multiplayer game for educational purposes. I use a client-server model with the server being authoritative. Ive already implemented the client side prediction based and it works fine. Now im working on the entity interpolation im using a simple algorithm interpolationTime currentTime - INTERP_BACK_TIME for my game 0.1s for INTERP_BACK_TIME state1 state2 getTwoInterpolationStatesinterpolationTime get two states to interpolate between length state2.Time - state1.Time t 0.0 if length gt 0.0001 t interpolationTime - state1.Time length entityPos state.pos entityPos.lerpstate2.pos t This algorithm works fine if the server sends only correct states which is not the case of my server let me explain why The client sends what i call Actions to notify the server about what he is doing. For example if the client press the right key it will send a new action to the server something like MoveAction1 0 to tell the server he is moving right. If the client keep pressing the right key for 5 seconds the client will send only two actions MoveAction1 0 at t s and MoveAction0 0 at t s 5. Im testing the whole thing with a ping of 150ms so the server receive actions 150ms late. Here is what happens on the server when the client presses the right key for 5 seconds there is 150ms ping between client and server 1. MoveAction1 0 is received at t s s is the time on the client 2. The action starts being processed on the server the player starts moving to the right until a new action is received 3. MoveAction0 0 is received at t s 5 4. The server knows at this point that the action MoveAction1 0 has ended and lasted 5 seconds on the client but on the server it lasted 5 seconds 150ms since the MoveAction0 0 is received 150ms late 5. The player then need to be snapped back to his correct position The step 4 is actually the one causing me problems for the interpolation. Since the actions are received 150ms late the player will keep moving right for 150ms on the server after the action is completed on the client before being snapped back to his correct position when the action finally arrives. My server sends game snapshots every 20ms so it will potentially sends 7 game snapshots with incorrect player positions. How should i deal with this scenario Should i avoid sending this kind of invalid states or should i handle them client side

Intersect ray with heightmap - Link Sat, 26 Sep 2015 11:21:44

Hello. I got fully working ray picking which tells me if ray hit an object. But using D3DXBoxBoundProbe tells me yes or no but does not give the XYZ of intersection point. Now i need to sleect the point on the terrain to make my unit move to given XYZ on right click press. The only solution for the heightmap which comes to my mind is to take every triangle then count XYZ of intersection ray - plane plane which contains the triangle and then check if the point is inside the triangle. It seems not too optimal for me are there better solutions Greetz

Learning GameStates - Link Sat, 26 Sep 2015 08:58:24

Hi Im looking at using game states in my programming So I went looking and found Lazy Foos tutorial on states. I found I could understand it even though I still dont like pointers Here is a small program I have made to learn how to use game states. I understand if I want to know the history of what state I have been in I could use a stack At this stage I dont need a stack to keep track of each state. my games are not big enough yet. Here is some code int main GameState CurrentState NULL CurrentState new Title bool ExitGame false while ExitGame false CurrentState-gtProcessEvents CurrentState-gtUpdate CurrentState-gtRender ifCurrentState-gtGetNextState -1 if CurrentState-gtGetNextState GameStatesExitScreen delete CurrentState ExitGame true else if CurrentState-gtGetNextState GameStatesSplashScreen delete CurrentState CurrentState new Splash else if CurrentState-gtGetNextState GameStatesTitleScreen delete CurrentState CurrentState new Title else if CurrentState-gtGetNextState GameStatesHighScoreScreen delete CurrentState CurrentState new HighScores return 0 And here is one of the states.... Title.H pragma once include GameState.h include SFMLGraphics.hpp include ltiostreamgt class Title public GameState public Title void ProcessEvents void Update void Render Title TitleTitle stdcout ltlt Title ltlt stdendl m_NextState -1 void TitleUpdate void TitleProcessEvents if sfKeyboardisKeyPressedsfKeyboardEscape m_NextState GameStatesExitScreen if sfKeyboardisKeyPressedsfKeyboardS m_NextState GameStatesSplashScreen if sfKeyboardisKeyPressedsfKeyboardH m_NextState GameStatesHighScoreScreen void TitleRender TitleTitle This is the first time I have used the virtual keyword in C. This is my base gamestate class. pragma once enum GameStates NullGamestate SplashScreen TitleScreen HighScoreScreen ExitScreen class GameState public virtual void Update virtual void ProcessEvents virtual void Render int GetNextState virtual GameState int m_NextState My question is this. Am I using this correctly In a way I look at it like each state like TitleScreen Highscores etc is its own program. It could be one state is Pacman and another state is space invaders etc. Another question also is How would I be able to use this to create a Pause state in my gameplay Is it something like when Paused is pressed through out gameplay currently I destroy the previous state. But If I am pausing the game I want to take it back to exactly the same state as it was previously. Is that where I would have to put my gameplay state into a stack run my pause state then when the player unpauses delete the pause state completely and pop the gameplay state off the stack which has saved all the variables like player position and what was on the screen at the time. Short question for above would be if I pushed the gameplay state onto a stack ran the pause state then popped the gameplay state back as the current state then it would continue where it left off In theory anyway. I actually need a stack at least for just the gameplay so I can pause dont I Does this sound like I am understanding this Thanks for reading werdy666 Attached Files Gamestates V1.0.rar 2.35KB 15 downloads

MySQL statement error - Link Sat, 26 Sep 2015 05:25:09

My experience with databases is very limited. The statement is INSERT INTO eventCategoryMapeventId categoryId VALUES ON DUPLICATE KEY UPDATE eventId categoryId The question signs are values which are added a bit later before the command is executed. And it generates the following error ERROR Failed inserting event-group mappings into the database. Cannot add or update a child row a foreign key constraint fails databtest.eventcategorymap CONSTRAINT fk_eventCategoryMap_category1 FOREIGN KEY categoryId REFERENCES category id ON DELETE CASCADE ON UPDATE NO ACTION How should I modify the statement

MySQL Connector C tinyint data type setup question - Link Sat, 26 Sep 2015 05:18:11

I am unable to setupaccess a database at the moment so I can only ask can I use the setInt method for a preparedStatement in the c connector to input data when a tinyint type is expected tinyint is only 1 byte in size Im wondering if the int will just be casted. Or I should use setBlob

How do you deal with tons of different same fundamental data types - Link Fri, 25 Sep 2015 22:14:42

Let us stay simple and state I want and need to use a single definition for fundamental types with fixed dimensions. lets forget about why do Microsoft and the CC standards provides non-fixed size... How do you deal with the tons of the Windows data types the VC compiler data types and the CC unfixed data types Do you split into two parts your project one where you code only with your own defined types where you do not have any external library includes and another where you have to deal with the Windows headers or other libraries Actually I pretty like to use the cstding fixed-size integers but every-time a function or a structure except a Windows data type I always check for compatibility through C-style casts not C-style casts. It is useless to state how boring and annoying is this. I was thinking to create an header where using tons of static_assert and check the compatibility of my types with Windows Data types and CC types. But I am not sure about that since I was to add it in the PCH after the Windows and the CC standard library includes. So any advice how to make neat all this is accepted.

Creating low poly game assets using blender - 3d modeling a simple - Link Fri, 25 Sep 2015 20:36:46

linkhttpsyoutu.beS1amy4FCyFc 3D Barrel Download License CC3.0 We are starting a series for absolute beginners making low poly 3d game assets. If you would like any custom 3d low poly assets just list them below and we will create a tutorial on the object and give out the object for free under CCL3.0. Also if you have any critique on what you feel a blender tutorial should involve and what it should avoid please let us know so we can grow and make future tutorials better each time. following this will be uv mapping then texturing.

c Allegro game - Link Fri, 25 Sep 2015 19:41:58

hi there i have some bugs in my game but cant figure them out

Rotate UV - Link Fri, 25 Sep 2015 19:34:11

Hi Im currently learning d3d11 including the basics of texturing UV updating etc. In the current exercise Im trying to rotate a texture on each face of a cube 6 faces around the center of the texture aka face. The UVs range nicely from 0.0 to 1.0 and Im using WRAP as address mode. To achieve the result Im multiply the UVs by a texture transform matrix. Heres my attempt XMMATRIX zRotMat XMMatrixRotationZXMConvertToRadianszRot XMMATRIX centerMat XMMatrixTranslation0.5f 0.5f 0.0f XMMATRIX scaleMat XMMatrixScaling1.0f 1.0f 1.0f XMStoreFloat4x4mTexTransform scaleMat zRotMat centerMat XMStoreFloat4x4mTexTransform centerMat zRotMat So far Ive found out that just doing a rotation doesnt give the expected result because the rotation then uses 0.0 as origin in my case the left top corner of the cube face. So I tried to do a translation of 0.5f on both X and Y because the cube has the dimensions of 1.0 x 1.0 x 1.0. The result of this is also that the origin of the rotation is not the center of both the cube face andor the texture. I think Im overseeing something but cant figure it out yet. Any input is appreciated.

What is more charged - Link Fri, 25 Sep 2015 19:06:42

Hey guys. I want to study game programming to enter the labor market. But what is the largest charges of companies Unity Html5 SDL... What is up

need a review of my tilemap code - Link Fri, 25 Sep 2015 18:47:25

Greeting first of all

XML Parser for Asset Manager - Link Fri, 25 Sep 2015 18:18:47

Hello Im working on setting up my XML data to keep track of and load levels for my game. Im using XML so I dont have to recompilewrite code every time I want to add a level or change something about a level. Im pursuing data driven programming here. This is all well and good except I have a phobia of messing something up before I even try. Ive got some pseudocode here of what Im going to attempt and it seems horribly inefficient. Maybe someone can quell my fears. First up I have an XML Parser that will take the level XML data and return a list of elements. The root element being the levels themselves. Each level element in the xml file will have a level number and children assets that will themselves contain information for how they should be rendered and the behavior they will exhibit during the game. So far so good I think. Now we get to where the data meets the code. Here is a little pseudocode for my XML Parser Keep in mind Ill be writing this in Java for Android. XMLParser Public Accept the xml file from the user and return a list of elements. Private Initialize and pass the input file to the XMLPullParser library. Reach each tag and do one of the following Create a new element object if its a new tag Add the attribute to the element object using a keyvalue pair ie addAttributewidth 300 Ill be using a hashmap for this. Do this for each attribute found. Add the value within the XML tags to the element via setValuetagvaluegoeshere For each element found within the root element add the child to the current element. Recursively process each child element. Element Public Interface for adding and removing attributes via keyvalue pair Interface for setting value member Interface for adding children elements Private Contain value string value that is found between the beginning and ending xml tags. Contain a list of children elements. Contain a HashMap of keyvalue pairs for attributes found within tags. Two things 1. Does this seem like a sound way to handle xml files and putting them into a data structure I want it to be general so I can use it througout my code. Then Ill set up a level class that will take the level element for the current level and pass it to the assetmanager to load the assets. 2. Im also worried about resources. Are all of these hashmaps in each element going to use up a lot of memory Im not sure how Hashmaps are implemented in Java but Im thinking there is probably an array under the hood that is allocating enough memory for the hash function to address the maximum value that it can come up with. If I use the hashmaps to keep track of assets Ive loaded in the assetmanager is it going to slow things down What is big O for a hash function in Java Any helpadvice would be much appreciated thank you

Exiting running threads in a DLL when calling executable exits - Link Fri, 25 Sep 2015 14:41:48

My D3D application is divided into two parts win specific platform code running in the executable and platform independent code running in a DLL which is linked with the exe. So most of the interesting stuff happens in the DLL. Threads can be spawned in the DLL to handle certain computations which can last up to 5 seconds. When the app exits and the computation is still taking place in a spawned thread in the DLL I get a Application has stopped responding error I assume because the threads were not exited properly. What is the proper approach to handle this Should the executable on exiting notify the DLL and give it time to shut the threads down In that case should I keep track of running threads in the DLL by collecting running threads in an array for example no idea if that is possible and close them down upon exiting Im using stdthread. Thanks.

Should I learn c for game dev - Link Fri, 25 Sep 2015 12:15:26

How should I learn c for Java game development I have been at Java for awhile and Im not really happy with it.

What should i use to create a good performing voxel engine - Link Fri, 25 Sep 2015 08:29:42

For some time now Ive been wanting to create something akin to Minecrafts world of cubes I want to make something for mobile but voxel engines are performance heavy so im not quite sure what to use. Ive considered using Unity but I have a feeling I will be able to get much better performance by doing it from scratch with some other framework. Im not afarid of a challenge but I would like the gained performance to outwieght the extra time spent developing so a few fps difference isnt really worth it if I have to write a 3D engine frmo scratch. Fel free to suggest whatever you think is best for my purpose. Thanks

Disable MSAA for Rendering Depth and Normals - Link Fri, 25 Sep 2015 03:13:50

Hi guys When I render generate my depth and normals to a screen-sized texture for post-processing stuff like SSAO not for deferred rendering do I turn off MSAA If not do I have to resolve the depth and normal textures I generated Im confused. Thanks.

GPU loadtemp monitoring for Intel - Link Fri, 25 Sep 2015 02:37:06

Okay Ive been given the task to write a GPU load and temperature monitoring tool as part of an automated test suite for my job. Since Im under NDA I wont get too detailed about my project outside of what is publicly available. We have two devices one with an Intel 4600 GPU and the other is a Quadro K2200. For the NV stuff thats easy. I can use NVAPI to get exactly what I need. For Intel I cant seem to find a similar library. If necessary I may have to do something on the driver level hopefully not but this has got to get done ASAP and were shipping in Q1 next year. As usual I tried doing a bit of googling and wasnt able to find what I needed. Any ideas Thanks. Shogun.

Play a video in a universal platform app - Link Thu, 24 Sep 2015 21:45:27

Hey guys I want to play a video in my UWP app Im using DirectX 11 with native c without xaml. I tried this sample but I had a problem with IMFMediaEngineTransferVideoFrame it failed when the d3d11 device was created withD3D_DRIVER_TYPE_SOFTWARE flag but it worked fine withD3D_DRIVER_TYPE_WRAP... I looked into it I found out that it was a problem with NVIDIA Graphic cards. Is there any other free solution to play a video to a D3D11 Texture in UWP apps thank you guys

How to mix water reflection color with water refraction color how to - Link Thu, 24 Sep 2015 17:29:41

So the main problem is when the sun goes down i get sharer agnles and the look of the water looks really bad for now i do reflectionColor refractionColor 2.0 -gt and that gives me such results how can i fix that

sprite render is very slow - Link Thu, 24 Sep 2015 13:10:38

I use ID3DXSprite interface to make this game. At first I put all properties into one class which is not a good style. Then I try to use component - contain many pointers to different components in entity class. But problems come. The rendering becomes awful when runing at 60 fps you can see the jump between frames... I upload the code. if someone have spare time please give it a look. Ive changed the code many times but this problem remains. the code is not so complex. class scene create entities and update them. ticktimer is a timer class. gamestart gamerun and gameend is called at proper place. thats all. the file I upload is more smooth because I raise the framerate to 120fps. but when use 60fps it will be horrible.. you can change it in main.cpp - it is in messageloop. er..and any improve to this code is welcome..but be sure to send me a copy Attached Files game.rar 24.82MB 34 downloads

Java Most Efficient Way To Iterate Through A File - Link Thu, 24 Sep 2015 10:55:31

I have a large configuration file I need to read into memory when my plugin boots up. Right now I have a very long switch statement loop that seems to take a while to process all the lines in the config file. What would be the most efficient way to iterate through a plain text 1 file in Java to reduce the loading times as much as possible without over complicating the code base to the point of becoming unreadable . Note - the file is only opened once. All the relevant data is dumped into a list THAN processed in the switch loop. 1 - the text file is not formatted in .xml or any other type of markup language

Lua C API tutorial book - Link Thu, 24 Sep 2015 07:31:14

Hi I am looking for some tutorial or bookfocusing onthe Lua C API. I find that the reference manual to Lua on this topic is not managing to help me The Reference manual is very formal and I am not good at extracting the how to do it from it E.g Pushes onto the stack the value tk where t is the value at the given valid index and k is the value at the top of the stack. - is not easy for me to understand. Does anyone know of some tutorial book that explains this a bit different and with some examples I am not looking for a book that explains theLua Language itself I am finding tutorials that manage to explain me this well. Sisofys

Feedback on this Threading architecture - Link Thu, 24 Sep 2015 07:04:43

Ive been racking my brain on implementing this threading architecture for my game engine. Research hasnt done much good. And... its really going to be needed pretty soon. But I am curious in how exactly I should approach this I thought about just diving on in... but I realize that implementing something like this without a good design at first is just a cause of frustration and headaches.Here is what I am currently thinking of. And pardon the crappy art work. MS Paint is not very good at 130 am in the morn. To help add some context. The engine is being optimized for Diablo and Baulders Gate style games. There is only one Lua VM machine and its being driven on the main thread. Most of the loop code is handled here as well as the game code. My system will be using sort of a bastardized version of the ECS implemented in Lua. The game does all pre-updates first updates where we have requested a raycast User input etc. Then logic updates. Animations. Physics. Then a multithreaded rendering. This might seem like a bit of a naive approach. The center is the main thread. The branches are dispatches to worker threads. PreUpdate Animation Physics PreUpdateJobs- PreUpdate - UpdateLogic -DispatchAnimationSystem - Animation - - PhysicsDispatch - Physics - DeferredContextJobs - Render PreUpdate Animation Physics V -gt Dispatch Immediate Data To other workers. Streaming Sounds loading level data. As you can see... UpdateLogic will not have any threaded jobs. I really couldnt be bothered to work out how to thread entities when they constantly ping each other for information. But just about everything else is threaded. Any suggestions to this A better architecture I am also really curious about the deferred context in Directx 11. There really is very little context on how to use it effectively in Microsofts Documentation. And just about everyone else who uses it does not really elaborate what they did with the renderer to make it effective. Does it need to be on a separate thread for it to be effective

How to gurrantee the nodes exist - Link Thu, 24 Sep 2015 05:31:53

If I check the path from 2 to 1 and just 1 to 2 exists I need to swap the 2 nodes in order to find the cost. How do I use the astar function no matter which way the from and to point to They are interchangable... First thought Sorting the set If second is bigger than the first swap it then. Should be correct I think.... Thanks Jack float GridSingletongetActualCostint fromNode int toNode if 1 gt 2 exists 2 gt 1 might not exists if checking for 2 gt 1 I still have to check 1 gt 2 QuadNode from grid91fromNode QuadNode to grid91toNode return m_astar-gtfindCostfrom to return m_actualCosts91stdmake_pairfromto cache this costs

Lighting in Warframe - Link Wed, 23 Sep 2015 15:49:07

Ive been trying to figure out how the lighting is done in this particular scene in Warframe. At least for this area at the start of the clip there doesnt appear to be any point or spot lights that I can see. Maybe there is a point light if there is how do the cover up to lobe of specular reflection Also it appears like there is a constant shadows under the player and enemies how is this done Is there simply a directional light that only has casters that are players enemies dynamic objects

Need Help With First Android Game Please - Link Wed, 23 Sep 2015 14:41:56

So idk if its due to poor planning or setup of my game but basically so you can get an idea below is a game screenshot. If you look the game doesnt look to bad how ever just drawing random blocks on the screen where it never gets any more easy or difficult can get boring fast my prob is I set up the block for loop in the constructor so this only runs one time so if i change the block number later on in the code it doesnt seem to change the amount of blocks getting updated in the game. My idea was to do some type of random draw in the update method of the view to update the block count but like i said it never changes in the game. Do i need to move the block generation somewhere else outside the constructor here is the constructor Our BvSView constructor this will handle setting up our birddrawingand our random starsblocks param context param x param y public BvSViewfinal Context context int x int y supercontext screenX x screenY y Setup drawing paint new Paint surHolder getHolder Setup player bird new Playercontextxy Init GameStats gs new GameStats Set our distance to home gs.setNewDistance700000 Set star and block count int dNum 400Number of stars that will get generated b 5Number of blocks distance int gs.getDistance score gs.getScore health gs.getHealth Lets do some fancy stuff and generated 1000 random stars moving at different random speeds this helps give the illusion of our bird moving through space forint i 0 i lt dNum i FunDebris debrisSpecs new FunDebrisxy debrisList.adddebrisSpecs THE BLOCK GENERATION forint i 0 i lt b i block new BlockscontextscreenXscreenY blocks.addblock

Voxel terrain smoothing - Link Wed, 23 Sep 2015 13:54:03

Hello guys I recently started developing a game in unity. I have some questions and unclear areas in the department of terrain generation. What I want to accomplish is a procedurally generated destructible world with smooth voxels. It would be nice to have the possibility to have calm and flat areas in the starting zone but as you wander out the terrain would get some more interesting. In the game you can control units if you send them into a yet ungenerated chunk they will start walking there and there would be enough time to generate the terrain in the background. The step process that seems logic to me would be to Generate noise based on seed and coordinates Ive read about the different kinds of noise you can use and what the pros and cons are but I wanted to get something straight the result after noise generation should be an array with values between -1..1 or 0..1 if normalized right Generate voxels based on the noise and map them in chunks How does this actually work I understand the big picture but when Im working with an array of numbers between -1..1 I kind of lose track of how to implement it code-wise. Smooth the terrain out This is the point that I find hardest because it gets really mathematical. I have found some sources but most of them are really outdated I was wondering if there are some recent and optimized terrain smoothing algorithms. Ive looked a lot at this article httphttp.developer.nvidia.comGPUGems3gpugems3_ch01.html The terrain is too rough though would it be possible to implement the smoothing with my own noise and voxels TLDRIm developing a game which needs a procedurally generated destructible word with smooth voxels I could use some pointers recent articles and source codes in C preferred with that. Thanks a lot for helping me out Im looking forward to your replies Greetings WhoCarrot

2D collision and component pattern advice needed. - Link Wed, 23 Sep 2015 11:00:31

Hi guys I am currently working on a simple dummy engine to improve my programming skill and learn more about game development. I am implementing simple 2D collision based on bounding boxes aligned with world X and Y. I am building my overall structure on components so my game entity class has a pointer to a move and render component. Now I introduced a bounding box structure and a 2D bounding box collision components. I implemented it and looks working fine but I have a couple of questions about it. First of all my components only knows about 2D bbox because that is the one should solve what happens if I have other shapes for collision Like convex shapes spheres and capsules etc. I would guess is fairly normal in a game to have to deal with different kind of collision shapes right If it so does it mean my components will also need to be able to solve different combinations and means knowing about all the kind of collisions shapes ex 2dbbox with circle 2dbbox with convex polygon etc. My second question is about how to organize the data for handling the different kind of bounding boxes etc but one step at the time I would like to address the first question first. Thanks guys PS here what I currently have I know looks simple but there is already a basic engine pipeline running. Attached Thumbnails

DirectCompute - set numthreads from application code or read from - Link Wed, 23 Sep 2015 07:38:58

Hello. In my application C side I need to know the total number of threads that will be used in compute shader. Right now I have this numbers in two places - on C side and inside shader. When I need to change a value I need to do it twice and we all know this is bad. Is there a way to pass this data from C to shader or vice versa

C Graphics Library - Link Wed, 23 Sep 2015 04:49:59

Hey everyone I wanted to start working on some more hobby projects. I was thinking about recreating some classics like Galaga Breakout etc. I am trying to decide what would be a fun C library to use for this. Ive used Allegro 4 in the past so I am considering Allegro 5. Ive heard good things about SDL so I was also considering that. I could use an engine like UE4 but I feel like thats a bit much and Id like to have less hand holding. I am trying to improve my knowledge of C mostly. Its a tough choice to figure out what to play around with so I was hoping to get some advice. Even suggestions I havent mentioned would be appreciated. Thanks guys

Why 2D - Link Wed, 23 Sep 2015 02:21:16

For the past few days Ive been reading a lot of topics from people who want to start developing games but dont know how to do it. After some time I started to realize that its almost common sense for the ones who have some kind of expertise in the area to highly suggest starting in this area with simple 2D games instead of 3D games. At first I thought this was obvious. But then something began to bother me WHY is it so obvious Lets think about it. I could make a bad 2D game as well as I could make a 3D game even worse. I mean you need to acquire a certain amount of experience to make both a 2D game and a 3D game. Ive seen lots of 2D games that are much better than most 3D games out there. So lets not waste more words. My question is aside from the fact that we have to deal with one more dimension use a 3D modelling software and some other logic things what are the most significant differences between the development of two-dimensional and three-dimensional games Sorry if this appears to be too naive but Id really appreciate to know this.

Name Utils or Utility - Link Wed, 23 Sep 2015 02:00:20

Hi What is the more correct to use for a folder name Utils or Utility I always used Utils but maybe Utility is more correct. Thanks

Smoothed Particle Hydrodynamics - Link Tue, 22 Sep 2015 23:57:17

Hello all . Im pretty much at my wits end with SPH. Ive implemented incompressible Eulerian fluid simulations before but this is proving to be a bit more challenging. . So I just want to make sure I have everything down so that Im not mistaking everything horribly. From what I understand the algorithm for just basic SPH is for each particle calculate density and pressure for each particle calculate gradient of pressure and apply it to the particles velocity apply gravity for each particle advect each particle enforce boundary conditions . For calculating the density I use the poly6 kernel W vecr frac31564 pi h9 h2 - vecr23 . For calculating the pressure I use the gradient of spikey kernel W vecr frac15pi h6 h - vecr3 nabla W vecr - frac45 h - vecr2pi h6 fracvecrvecr . For calculating pressure I use P k rho - rho_0 although Ive seen a bunch of references to a equation with an exponent of 7 floating around. . All of this checks out with what academic papers say but in my current implementation the particles immediately fall to the bottom of the screen and start squeezing together. I wish I had a video of it but it happens so fast that OBS cant capture it. . I personally suspect that the gradient of the spikey kernel is is the issue just based off of how the fluid clumps together in strange ways once all the particles fall to the bottom. Im not applying any near-pressure just to keep everything simple but even without it the simulation shouldnt fall to the bottom in 0.5 seconds. Another thing Im suspicious of is the k rho_0 and h constants because its a little difficult to tune the simulation when it doesnt last very long . Does anyone have any experience with SPH who could lend some insight I implemented this paperbut it cant be implemented very easily on the GPU which is why Im interested in a more pure SPH approach so insight on either one of these would be enormously helpful . Im attaching the code for anyone who could take the time to look over it. Its 1 file a couple functions nothing too big or too fancy fancy of data structures. All computations are On2 and structures are not very optimized just as a sanity-check. . Thanks in advance Attached Files 115.65KB 29 downloads

FBX importing problems - Link Tue, 22 Sep 2015 23:35:49

Hello. Im trying to convert binary FBX files to my own format which means extracting joints vertices and bone bindingsweights from them but I cant seem to get it right. 1. There are lots of transformation data in there.PreRotation Lcl TranslationRotationScaling GeometricTranslationRotationScaling PostRotation... I have no idea which transforms apply to what. 2. Due to the above problems Im having huge problems with importing jointsbones. The objects have a number of the above transforms but in addition each deformer has both a Transform and a TransformLink. None of these match each other. What am I supposed to base my joint transforms bind pose on 3. My vertex positions and normal seem to match what I expect to get without any transformation applied to them but Ive found sources saying that they should be affected by Lcl and Geometric transforms. The model is rotated in ways Im not expecting it to be with those applied though. 4. My model seems to only have bone bindings for a small subset of the model. Only176 out of750 vertices have any bone bindings at all. This may of course be a problem with the model but it is being animated correctly in Maya which confuses me even more. I would really appreciate any help I could get. Thanks

Where to start - Link Tue, 22 Sep 2015 21:34:39

I would like to begin game development but Im not sure where to start. I need to know what the most recommended coding language is and how to use it. Im not sure what I want to do but Im going to try with something very simple. Maybe using 8 bit sprites just moving around a board for now So what is the most recommendedbest way I can start

Your opinion on BGFX - Link Tue, 22 Sep 2015 21:08:14

Whats your opinion on using a library like bgfx instead of a custom GLFW GLM GLAD approach With the upcoming release of Vulkan should i wait for it and use it or work on top of an abstraction like bgfx It has its own shading language.

Creating a filled Bresenhams ellipse - Link Tue, 22 Sep 2015 20:53:17

I have the following code to create a Bresenhams ellipse for a voxel game. While this is complete and works great to create nice ellipse outlines Im struggling to figure out how I might convert this to create a filled ellipse. I was thinking of perhaps doing some sort of flood fill but not entirely sure how I might implement it. I thought maybe I will save the map points and do a line scan across from left to right boundary and fill in between. I was hoping someone might have an example of something more efficient and working. The code below is C but more interested in how it will work and I can just convert to c. void DrawEllipseint xc int yPos int zc int width int height VoxelInfo voxelInfo int a2 width width int b2 height height int fa2 4 a2 fb2 4 b2 int x z sigma for x 0 z height sigma 2 b2 a2 1 - 2 height b2 x lt a2 z x voxelInfo.chunk.SetVoxelxc x yPos zc z 9 true voxelInfo.chunk.SetVoxelxc - x yPos zc z 9 true voxelInfo.chunk.SetVoxelxc x yPos zc - z 9 true voxelInfo.chunk.SetVoxelxc - x yPos zc - z 9 true if sigma gt 0 sigma fa2 1 - z z-- sigma b2 4 x 6 for x width z 0 sigma 2 a2 b2 1 - 2 width a2 z lt b2 x z voxelInfo.chunk.SetVoxelxc x yPos zc z 9 true voxelInfo.chunk.SetVoxelxc - x yPos zc z 9 true voxelInfo.chunk.SetVoxelxc x yPos zc - z 9 true voxelInfo.chunk.SetVoxelxc - x yPos zc - z 9 true if sigma gt 0 sigma fb2 1 - x x-- sigma a2 4 z 6

Sprite Sheet Doubt - Link Tue, 22 Sep 2015 20:25:38

What i can use to help to create Sprite sheet withsame dimensions Have some tutorial

Dealing with D3DX____ functions being depricated. - Link Tue, 22 Sep 2015 18:51:39

Im trying to upgrade my framework to DX11 in hopes of then upgrading it to 12 right now its on 10 but I was a little lazy when creating it in the first place and just used the helper utilities in D3DX even though they were deprecated a long time ago. So now Ive got Windows 10 and it doesnt even ship with D3DX so Im forced into switching. Its a lot of code and pretty laborious. Ive managed to switch all my math to newer DirectXMath but what about effects I cant find any references to effects in DirectX12 documentation and have no idea what happening there. It seems like .fx files are no longer used is that true And without the D3DX lib how do I load the effects file now Thanks.

Handling collision data in a very large node-based open world - Link Tue, 22 Sep 2015 17:48:06

What Im trying to achieve with this threadis a discussion regarding managing collision data in an unbounded dynamically loaded andor generated world that is the game world is not really intended to be unbounded but can be much much larger than either single or double precision floating point would allow. I have currentlyno intention of taking advantage of an unbounded world but I like the concept and frankly this is a pretty neat little general design problem. Since information on this topic is scant Id like to share what Ive thought of so far and hope that people can point out issues with my reasoning and offer other ideas or perhaps provide links to prior RnD that I may have missed

Best language for solving diamond problem 38 is this a good idea for - Link Tue, 22 Sep 2015 16:31:23

Hello This is my first time in these vast forums and Ive come today to ask you if you know of a programming language that has a good solution for the diamond problem unlike Cs workarounds of virtual inheritance using to specify which super-class to get the implementation from etc. I also wanted to share my probably naive and basic solution for multiple occurrences from multiple super-classes of the same method named implementation in a class which is to call both implementations in alphabetical order of the super-classes names. I have a very strong feeling that there could be many problems linked to this form of behavior for classes yet I fail to see them. I seek criticism on this solution and if no faults apply to this behavior please do approve. Kind Regards Kreative

WinAPI - Decoupling and abstracting input from window - Link Tue, 22 Sep 2015 15:44:43

Hello at first I was thinking of just having each window class inherit from a base window class and implement a virtual window procedure but Id rather have a designated class that handles input. Ideally Id want to have something like allegro does with an event queue. Im just not exactly sure of how I want to implement this. Any ideas

Gaming News Headlines - Yahoo News - Link Sat, 26 Sep 2015 09:33:00

ltpgtlta 30 height86 altA PlayStation Vita Successor Sounds Unlikely alignleft titleA PlayStation Vita Successor Sounds Unlikely border0 gtltagtThe current climate is ampquotnot healthyampquot PlayStation exec says New Wipeout and Killzone HD collection not ruled out.ltpgtltbr clearallgt

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68

Welcome to

Floating Point Softwares is an Indie company started in 2015
focusing mainly on Android, iOS, HTML5 and PC game development.
Currently we also offer non-game related solutions, 
such as mobile apps depending on the demand, as well as pixel & vector graphics.

Read more

What's Going On?

Featured Shop Items