Page:4 - News Archived: 3437

Title Date
Pre-compiled HLSL shader question - Link Thu, 22 Oct 2015 23:42:17

Hi GuysI am currently trying out how to add a precompiled shader to my program in the form of a header file.I have compiled the shader in to a header like so as per MS documentation as follows. fxc T ps_4_0 EPShader Fo PixelShader.h PixelShader.hlsl This document then says to add the precompiled header into the project as follows Actual MS example include PixelShader.h ComPtrltID3D11PixelShadergt m_pPixelShader hr pDevice-gtCreatePixelShaderg_psshader sizeofg_psshader nullptr m_pPixelShader My code slightly modified to suit my project include PixelShader.h HRESULT result d3dDevice-gtCreatePixelShaderd3dPsBuffer-gtGetBufferPointer d3dPsBuffer-gtGetBufferSize 0 d3dSolidColorPS The result is an unexpected end of file found due to the include file.Also I have concerns as to how does the include file magically associate itself with d3dPsBuffer I cant see how the CreatePixelShader call can possibly know that it is loading the data from that particular header file. What would happen if you had a dozen pre-compliled HLSL headers How would you determine which belongs to what CreatePixelShader callThanks in advance

Structuring my Unity3d project - Link Thu, 22 Oct 2015 19:12:42

In my first unity3d project an RPG I wasnt very clear about how to structure my project. So I decided to use an old method created a class named GameInstance containing all the game related info like the player instance item factory class game settings and time etc. It also handles events. This class is created in the first scene the main menu. The only disadvantage I have found is that I cant test scenes indpendently as the GameInstance is attached to a GameObject in the first scene and marked as DontDestroyOnLoad the other scenes dont have it. I would like to know if there are more optimal or adequate approach for this issue so I can improve my code in future projects.

Sequential vs Simultaneous collision detection - Link Thu, 22 Oct 2015 17:36:46

Just wanting to get some clarification on some collision detection thoughts. This is all 2D to keep things simple and no rotations. In a dynamic impulse based resolution system ie multiple bodies moving around when they collide we apply forces to them for the next frame it seems that theres only a couple of ways that I can go about detecting wherewhen collisions are going to happen. Say I have a list of bodies I can either attempt to move them one at a time to their next collision point ie sequential movement or I can attempt to find the soonest collision point of all of the bodies move all of the bodies to that point and then repeat until the timestep is finished ie simulataneous movement. In the first case ordering of the objects matters as collisions may or may not occur based on which bodies is moved first. In the second case this involves multiple iterations over the bodies to do all of the movement and seems more complex but seems much more accurate. Ive seen it mentioned or at least it seems that many games use the first case as its easier to implement faster and the ordering effects arent noticeable. While this seems like it would be just fine I just cant get over the fact that its not deterministic if the order of objects changes It could also be that Im completely misunderstanding this... Thoughts or resources related to this subject would be greatly appreciated.

Properly Mixing NavMesh Pathfing with Steering Behaviors - Link Thu, 22 Oct 2015 17:19:06

So I am working in Unity 5.x Pro and have my AI agents moving about via calls to Unitys built in path finding and movement system NavMesh base. I also in the past did alot of work with Reynold style steering behaviors and had alot of nice uselfull emergent behaviors come about. But when I used them there was a low density of static obstacles so a true global path finding solution was unnessisary. But for this new Unity project my maps have a high density of obstacles also some areas of low density e.g. large courtyards etc and a global path finder is quite nessisary some places can be maze like. So what I want to do is somehow properly mix NavMesh based path planning with Steering Behaviors Evade Chase Formations etc.. It is not quite clear to me how that would work. The NavMesh does give me all walk-able areas which I can query with ray casts. I also can compute paths from any location on the navmesh to any other location on the navmesh without having to traverse them Ive used that to know if even a path exists but this is an expensive operation and can not be perform too often like once an update frame would not work. The number of AI agents I am dealing with right now is anywhere from 1 to 32. I was just wondering if others have tried to mix these two movement systems and how they went about it Thanks -Ryan

Newbie looking for a high level explination of the systems that make - Link Thu, 22 Oct 2015 16:17:33

I am a DBAAnalyst by trade and I work within the Property Management industry. Within this industry there are termsphrases that have very different meanings outside of Property Management and so when seeking answers via search engines to questions specific to that industry its important to knowunderstand the jargon used in that industry else you may find too little or just as worse too much. For example within the development world the term property or properties has a very different meaning than it doeswithin my industry. It is these differences between domains that makes it difficult for someone to seek answers to questions that are outside the domain they know. Knowing how to ask the question is as important and sometimes as difficult as knowing what to ask. As a newbie to game development its difficult to know how to ask as well as what to ask so my first question or search for assistance in how to find the answers is How can a newbie to game development get a high level explanation of the parts of video game design such that they can best determine where to go next For example if I were an alien from another world with a fluent understanding of the English language and I had no concept of an automobile. After riding in one I decided I wanted to learn more about it so as to determine what I need to do to go about constructing my own vehicle where would I start I would think the first stop for this alien would be an over view of the automobile how it works at the top level and its basic parts. This would include a high level explanation the various systems that make up an automobile transmission body electrical engine etc. I wouldnt need to know the intricacies of each system just the top level explanation of each so that I see the automobile as more then a black box machine that will go where I tell it based on the controls. Once I had the basic understanding of the automobile I could then determine if I wanted to build one new from the ground up modify an existing base model or maybe just tweak a specific line. Likewise with video game development where can I find a high level breakdown of the parts of a video game and those parts interact I assume that all modern 3d video games are based on a game engine consisting of a map the game world characters both playable and NPC with flexible traits i.e. skills objects such as weapons and craftinguseable items and the other items that are key components but may still be separate from the game world characters and objects such as lighting and effects. As a newbie I have no idea if the PBR physical based rendering is separate from the engine or not. I know the above is rather lengthy but I am trying to convey as best as I can what I am looking for where Im coming from and why as a newbie to this industry it can be difficult to know how to ask and not just what to ask. Thank you

directx for simple graphics - Link Thu, 22 Oct 2015 15:40:34

I want to make a somewhat complex game but with simple graphics 2d or 3d everything you hear nowadays is physically based rendering so I was wandering where do I stand in relation to directx 101112 I want to use a modern api not just directx 89 thanks for input

Eclipse and SFML - Link Thu, 22 Oct 2015 15:12:12

So Ive been learning C and have finally gotten to the point where Im ready to do graphics. I tried to install SFML and Ive followed several tutorials about how to link it properly in Eclipse but I cant get it to work at all. The furthest I can get is where Im getting undeclared errors instead of unable to resolve ones. Can someone help me figure out whats wrong Im using the tutorial code from the SFML website so I know theres nothing wrong with it. Heres some screenshots of my settings if that helps Spoiler And a screenshot of the errors Im getting

Filling a grid using Hamiltonian paths - Link Thu, 22 Oct 2015 10:16:06

Hello recently I was trying to implement a Hamilton path function to generatefill a grid of points with a snake-like path. Generally the code I have now miss-performs in the beginning and near the last steps between those 80 of the generation everything seems extremely fine. I really cannot find what would be the issue. Seems like my nodes just snap and another related node gets placed in a completely random spot. Maybe somebody could point out where I did a mistake Here is my Pastebin code httppastebin.comj5RUfXTH I am using GLM for vec2 class but a simple struct with int x and y would do. Thanks in advance

Source code for Camera Space Shadow Mapping CSSM - Link Thu, 22 Oct 2015 08:42:34

Hi everyone Here is the source code for the original CSSM shadow mapping API It is missing the math library but things are pretty clear left handed system column major matrices and order of multiplication is from left to right. Sorry about some comments on Croatian language. Paper is here httpsbib.irb.hrdatoteka570987.12_CSSM.pdf Sample projects are here DX9 and DX10 httpfree-zg.t-com.hrcssm I still dont have time to start working on CSSM with Depth Histograms image attached but maybe this will kick-start something. I should probably make some kind of GitHub project with original CSSM and then slowly start updating it to Depth Histogram version with the help of the community but Im currently too busy with my current project. So if someone is willing to help out and compose starter project that would be great NOTE I wouldnt prefer using my old sample projects because they are MFC DX Effects which are not that commonly used any more. Cheers -- Ivica Koli Attached Thumbnails

Managing large amount of data. - Link Thu, 22 Oct 2015 08:03:58

Im working on an infinite terrain generator - and so far so good. Ive got what is likely to be a problem in the future though. The player-save-data. The terrain itself is reading from perlin noise with some modifications to let me control its result. When the player changes anything that objects relevant data is processed into a uLong and put in a list. Every so many loops I then check the complete list to see if the rendered tiles position is within the render area. If it is i put it into an array that corresponds with the tile - so my terrain-maker can access the data without looping through the entire list. My saved data doesnt attempt to save the entire infinite world - just the players alterations. Right now theres no problems whatsoever but Im just testing now so I have maybe 10-100 tiles in the list. So when i do the periodic InRenderArea check it only has to process those 10-100 items. BUT.. players could have 1000 to 100000. Or higher I suppose. Since 100000 tiles would be .8mb Im guessing that it would have an impact on performance since Im trying to populate my Render-Area array every 10th loop. Im not too sure how much data is too much to process in a single loop. Im not sure what the best way to deal with this would be. I thought about doing a fairly complex system that splits the world up into grids and stores the data in structures that correspond to them. But seeing as Im lazy Id rather find an easier solution than that. My lazy-solution was going to be to have a near list and far list and every loop process through maybe 100-500 or whatever far list items. If theyre close to the render-area then theyd be put into the near list. Would this be sufficient enough to avoid a performance hit or late updates resulting in non-present tiles or should i go for the more elaborate multi-grid solution I apologize for the lengthy preamble but I figured details were necessary.

When you Fix your timestep Do you need to change the physics - Link Thu, 22 Oct 2015 05:51:53

Hi all. From FixYourTimeStep. Before fixing the time step the motion code was multiplyng the time delta with acceleration and velocity. Like this. update velocity m_vVelocity acceleration timedelta update the position m_vPos m_vVelocity timedelta That all sort of worked out hence the Fix Time step But after the fix my timestep The objects all stated tojitter when separation is applied. I tracked it down to the fact All the forces are small and applying timedelta makes them even smaller like values of V30.0003 0.001 1.023 I even downloaded open steer and tested it On my setup and it has the same behaviour JitterBugs. I also looked at there code and its almost the same small difference on how there rangesobj radius and the use of the dotproduc for squared are used. My question is whenusing a fixed time step canthat timedelta be removed from the calculations. That would make the forces larger and out of the fractions.

Level creation editing in Monogame - Link Wed, 21 Oct 2015 20:53:32

I created a pong clone for a first project and now Im making a clone of impossible game Im not too sure on how to create the levels. I know I can use a 2D array to draw sprites and set up collision for them as well. But that just seems like a more time consuming complicated and less productive way of doing it. Ive tried to find information on using tile editors with monogame but have not found much. Would I have to write my own tile editor Or can I import from Tiled or something Im hoping someone can shine some light on my issue.

Hardware instancing speed check - Link Wed, 21 Oct 2015 19:19:09

Ive just implemented hardwareinstancing in my engine and I wanted to know whether my results are on par or not - I appreciate this can be a subjective question. In full releasefull screen mode Im rendering100 instances of a30k triangle tree. With nothing else on the screen my frame time is approximately 35ms or 30FPS. Thats 3 million triangles each frame meaning approximately 90million triangles per second. Im running this on my Mac Book Pro 2015 Retina at 2560 x 1440 with a 2Gb NVidia GT750M 16Gb RAM and an Intel i7 2.8GHz quad core processor. Seems alright doesnt it...

Problem with save mechanisms - Link Wed, 21 Oct 2015 19:14:53

Hi I should call myself a beginer... I started creating this game not so long ago but I recently thought Hey why my game has no save mechanism And so I found one with fingtgt and foutltlt that uses .save The problem is... This mechanism is not saving properly I tried to do everything I know should help but nothing worked So yeah there is the code include ltiostreamgt include ltconio.hgt include ltwindows.hgt include ltcstdlibgt include ltctimegt include ltaccctrl.hgt include ltfstreamgt using namespace std int main string charactername gender string characterclass unsigned int w characterage xp lvl a Info bout the players character unsigned int hpmax hp mpmax mp ad cs armor string agree unsigned int i achieve xp0 lvl1 Other thingies hpmax100 hp100 mpmax0 mp0 hp100 mp0 ad5 cs0 armor0 achieve0 coutltltLoad a saved file or start a new gameLNn char choice cingtgtchoice if choiceL string file coutltltEnter the name of your file n cingtgtfile ifstream iosbinary fingtgtcharactername Sleep 100 fingtgtgender Sleep 100 fingtgtcharacterclass Sleep 100 fingtgtcharacterage Sleep 100 fingtgtxp Sleep 100 fingtgtlvl Sleep 100 fingtgthpmax Sleep 100 fingtgthp Sleep 100 fingtgtmpmax Sleep 100 fingtgtmp Sleep 100 fingtgtad Sleep 100 fingtgtcs Sleep 100 fingtgtarmor Sleep 100 fingtgtachieve coutltlt The name of the character ltltcharacternameltltendl Sleep 100 coutltlt The gender of the character ltltgenderltltendl Sleep 100 coutltlt The class of the character ltltcharacterclassltltendl Sleep 100 coutltlt The age of the character ltltcharacterageltltendl Sleep 100 coutltlt The xp level of the character ltltxpltltendl Sleep 100 coutltlt The level of the character ltltlvlltltendl Sleep 100 coutltlt The max ammount of the characters hp ltlthpmaxltltendl Sleep 100 coutltlt The last ammount of the characters hp ltlthpltltendl Sleep 100 coutltlt The max ammount of the characters mp ltltmpmaxltltendl Sleep 100 coutltlt The last ammount of the characters mp ltltmpltltendl Sleep 100 coutltlt The value of attack damage of the character ltltadltltendl Sleep 100 coutltlt The critical chance of the character ltltcsltltendl Sleep 100 coutltlt The armour of the character ltltarmorltltendl Sleep 100 coutltlt The value of the characters progress in the game ltltachieveltltendl system PAUSE switch achieve case 0 goto launch break case 1 goto acceptedID break system PAUSE achieve0 launch do system CLS coutltltachieve coutltltn Whats your namen cingtgtcharactername coutltltn What is your gender ltltcharacternameltltn do coutltlt 91MF93 cingtgtgender if gender M gender F coutltltn Give me the proper answern while gender M gender F coutltltn Welcome if genderM coutltltgentleman else coutltltmilady coutltlt.n May I ask how old are youn do coutltlt 9116-50 cingtgtcharacterage if characterage lt 15 characterage gt 51 coutltltn Give me the proper answern while characterage lt 15 characterage gt 51 coutltltnn Chose your class ltltcharacternameltlt. coutltltnn 911 if genderF coutltltWarrioress else coutltltWarrior coutltltn coutltltn 912 if genderF coutltltSorceress else coutltltMage coutltltn coutltltn 913 Assassinnnn 9112393 do cingtgta if a 1 a 2 a 3 coutltltGive me the proper answern while a 1 a 2 a 3 switch a case 1 if genderF characterclassWarioress else characterclassWarrior break case 2 if genderF characterclassSorceress else characterclassMage break case 3 characterclassAssassin acceptedID coutltltn So... Your name is ltltcharacternameltlt you are ltltcharacterageltlt years old and your class is ltltcharacterclass coutltltnn coutltltn Is everything alrightn do coutltlt 91YN93 cingtgtagree while agree Y agree N if agreeT coutltltnn Ok then good luck and have funn achieveachieve1 coutltltachieve coutltlt Do you want to save exit nown coutltlt 91YN93 cingtgtagree if agreeY goto end while agree T Rest of the game end coutltltnnYou chose to exit. Do you wish to save your current progressn to continue the game laterYN cingtgtchoice if choiceY string save coutltltEnter the name of the file in which you want to save your progress n cingtgtsave ofstream iosbinary foutltltcharacterclass foutltltxp foutltltlvl foutltltgender foutltlthpmax foutltlthp foutltltcharactername foutltltmpmax foutltltmp foutltltad foutltltcs foutltltcharacterage foutltltarmor foutltltachieve stop coutltltnnn____________n DEAD END ltltnn You earned ltltxpltlt xp and ltltlvlltlt level while kbhit Also two photos On the 1st one you can see what I put in at first On the 2nd one is what Ive got when I tried to Load the save Btw english is not my first language as you may have spotted... I translated this all so it will be easier for you to understand. Ill be really thankful for any advice Attached Thumbnails

Collision detection in a tight maze - Link Wed, 21 Oct 2015 18:30:10

The idea here is we have a tight maze ie a maze with 0 thickness walls and movement only along the xy axis. This differs from say Pacman where the walls are a full tile thick. A specific example of this is Wizard of Wor. So I think theres a couple ways to go about this I could create a list of walls for the level and then do collision detection against the walls. This seems to work fairly well collision wise as movement is just a general thing with sliding against the walls. Problem is collision detection is pretty complicated due to the walls not actually having any size physics wise. The other option is to create a tilemap with each tile knowing which sides it has walls on. Movement is more complicated because youre moving from point to point in the grid. This is nice because AI can make decisions about where it wants to go strictly when it hits grid points. At a glance how do you think this sort of thing was implemented in the past Im guessing it was probably the the tilemap way as its be less CPU to do this.

ActionScript 3.0 issue - Link Wed, 21 Oct 2015 17:57:53

For a Flash Game Development course I am taking I am supposed to modify an Asteroids-type game. Our instructor has given us a lot of code to play around with and I am currently working on including some meters to display the score lives level and energy. The problem is regardless of what I have tried I cannot get the new meters to work with the game. The original scoring lives and level meters work so I am not sure what the issue is. Here is what the instructions say that were also given to usNote that each movie clip meter has a nested movie clip inside it. The level score and lives meters have a text field movie clip object named mcItem. The dynamic text field resides within the mcItem movie clip and it has its own name txtAmount. So for example to drive information to these meters your code will look similar to this levelMeter.mcItem.txtAmount.text 3 I am calling the movie clips for example as follows private var livesMeterLivesMeter new LivesMeter Then going in and trying to use it livesMeter.mcItem.txtAmount.text 5 Doing multiple tests on this it does not cooperate with the code. Ive double checked all of the instances within the movie clip and they all look correct. I feel like I must be missing something simple any ideas

Maze Trimming - Link Wed, 21 Oct 2015 17:03:47

I like so many others here am working on some procGen maps. I stumbled upon this example httpspaginas.fe.up.ptei12085miscdungeon-generatorw64h24mazeTyperandomroomAttempts100roomMinSize1roomMaxSize5connectiveness0.02 Now I understand the majority of the algorithm or at least can replicate the effects... but the last step is where I was hoping for some help. As the demo shows it selects placement for some rooms then builds a maze around it. Then using a connectiveness value it cleans up the majority of the maze leaving only a few laborinthesc hallways. I was trying to come up with a similiar algorithm but i dont think my idea is as efficent as the method the demo uses. My Idea was to label each room with a unique RoomId then the maze path would not have a roomIds. Then I would iterate marking any square without a roomId with the roomId of an adjacent cell. If there are multiple adjacent RoomIds then If the RoomIds are distinct-gt Do nothing Indicates the hall connects to a different room If the RoomIds are the same randomly choose to remove one of the halls or not. If the choice is made to remove a hall randomly choose one of the halls to remove. But I dont think the demo uses that algorithm... the algorithm used looks to be On as cells in the top left are trimmed before cells in the bottom right regardless of room proximity and etc...

How to get non-planar ground reflections with a realtime cubemap - Link Wed, 21 Oct 2015 16:53:39

Hello I recently played NFS U2 and noticed that the road reflections are quite accurate compared to SSRR methods. Its mighty fast aswell since I can play the game maxed out on a laptop while SSRR is quite impossible on a laptop. Im writing codeC and shaders in Unity 5 if thats important to point out. So here is a video I found on youtube wich describes the reflections quite well My personal guess is that there is a small mix of screenspace rendering and a cubemap going on Because I tryed a mirrored cubemap rendering method and the results were not as good. Infact they were terrible. I had 2 different results one of where the reflected ground was hanging way beyond the reflection plane and the other had some normal issues but was more accurate. Both required a cliping point input wich I calculated with a raycast under the camera. Not the best way to do it but it worked for testing. Here is a Unity3d link for the mirrored cubemap renderer method not mine but the basics are the same httptwiik.netprojectsrealtime-reflection-example-scene Here are some screenshots I took from the video on the left is the original and on the right is the mirrored view for comparsion. Another guess would be that there is some sort of a rendering matrix and the rendered image is wisely placed along the surface And exucuse me for my bad descriptions english is not my natural language and my grammar might be of.

GL 4.0 booktutorials - Link Wed, 21 Oct 2015 14:45:33

Looking for some suggestions. I know 2.0 really well just been lazy in the upgrade.

OOP inheritance structure - Link Wed, 21 Oct 2015 14:17:18

Im having some issues with my inheritance structure. Im having a abstract Class Entity where all characters are derived from. A player can be a Mage -gt Humanoid -gt Entity for example. But AINPC needs to extend an extra Class NpcEntity. I have many abstractions of Entity so either I have to create a AI class for each one. Or have methods not relevant to the player in the Entity class. Neither of these options seem good to me. class mageMob extends HumanoidMob class HumanoidMob extends NpcEntity class NpcEntity extends Entity Things go even deeper then the above example and I have a lot of different character classes that need to behave differently. The reason for this is that I want to implement a State Machine for AI. A player does not need all the methods and fields for that. So how would I do this in Java I really do not want to change out the classes for something like an enum and have a ton statements everywhere to check what enum the object is.

realtime multiplayer damage managment between client - Link Wed, 21 Oct 2015 13:31:56

hi all im making a realtime multiplayer game using phaser node and i managed movements clients side and then emitting to server client coordinates serve then save them and broadcast to all clients. Now i have toimplement damage between players.. i was thinking about hit and be hitted emit from both clients then server can compare timestamps of emits and validate the attack if both send the message... Do anyone already approached the problem I read many guides but all talking about thory and i cant find nothing concrete... Any tip is welcome link dev test loginbypassed-gtplay httpgame.pydge.com5001

Fitting directional light in view frustum - Link Wed, 21 Oct 2015 12:58:46

Im trying to optimize my shadow maps by making my directional shadow maps fit in the view frustum however this is causing me some problems. I tried several things but all didnt work or didnt work properly. Assuming i only have the following information vec3 describing direction of the directional light perspective camera with values fov width height near plane far plane and transform matrix How can i use this information to create the correct light space matrix to generate and sample my shadow maps Any help would be greatly appreciated

Help with specs for laptop - Link Wed, 21 Oct 2015 11:57:27

Hi all Incredibly new to the world of game design but I have been thinking about getting into it for awhile now. Ive been reading a lot and watching tutorials and I want to start looking at laptops. I have a desktop PC but with my two kids its hard to get down to the basement for more than 45 minutes at a time. Id like to get a laptop because I know Id be able to work on the game a lot more. The games Im mostly interested in creating are more of the retro style. Maybe a top down or side scrolling shooter and rpg ect. Im interested also in recording my own music for the games as well and I do hope to create my own sprites and images. Im not an overly computer savvy person as is so as Ive started to look for laptops Im having a hard time figuring out what a good but not crazy expensive system would be. Any help and advice is greatly appreciated

Direct11 change texture coordinates in vertex shader - Link Wed, 21 Oct 2015 09:52:32

Ive learned form a book that we can change texture coordinate in .fx file to avoid using dynamic vertex buffer. But I cannot get more information on how to do this...Ive tried to use a constant buffer which passing a matrix to effect file but it doesnt work or sometimes work in an odd way. So how should I achieve this exactly thanks in advance

Basic HLSL pixel shader question - Link Wed, 21 Oct 2015 06:15:09

Hi guysI have a basic pixel shader as follows float4 PShaderfloat4 pos POSITION SV_TARGET if pos.z 0.0f return float40.5f 0.5f 0.5f 1.0f if pos.z gt 0.0f pos.z lt 0.0f return float41.0f 1.0f 1.0f 1.0f return float41.0f 0.0f 0.0f 1.0f I have flat 2D objects rendering in 3D space.The intention here is to render any objects that have a z vertex position of 0.0f as mid grey and anything ltgt 0.0f as white. I understand the return value of red should never happen with the current code.At this stage even though object 1 is at z0.0f and object 2 is at z10.0f within the vertex buffer that is both objects are being rendered mid grey.This is all leading up to having multiple objects in one vertex buffer at different depths and have the shader determine the correct color depending on that depth.Is what I am trying to achieve possibleThanks in advance.

View Matrix Rotation - Link Wed, 21 Oct 2015 06:08:18

Hello everyone I am pretty new to gamegraphics programming. I am trying to do a bit of learning with WebGl. I am trying to get a camera to rotate around a cube. I thought I could do this with a bit of spherical math. I am targeting the camera at 000 which is where my cube is. I would like to rotate around in a circle. I am going for the type of camera you might see in a platformer. Where the camera fixes on one point and then can rotate about that point move up and down and follow the point. Here is where I set the camera position the view matrix var a 10 Math.cos0 cameraPosition912 a Math.cosrad cameraPosition911 10 Math.sin0 cameraPosition910 a Math.sinrad Now with phi 0 everything works as expected. I am facing the cube dead on. However if I set phi to PI 4 or 45 degrees then everything seems to tilt and I rotate through the floor while still targeting 0 0 0. I am pretty sure the code that is incorrect is where I set my View Matrix. Ive tried the spherical math a few different ways with the same result and conceptually I think that I understand that a lot better than I do the View Matrix math. Here is my code for setting the View Matrix var z vec3.create var x vec3.create var y vec3.create vec3.subtractz cameraPosition cameraTarget vec3.normalizez z vec3.crossx cameraUp z vec3.normalizex x vec3.crossy z x vMatrix910 x910 vMatrix911 x911 vMatrix912 x912 vMatrix913 0 vMatrix914 y910 vMatrix915 y911 vMatrix916 y912 vMatrix917 0 vMatrix918 z910 vMatrix919 z911 vMatrix9110 z912 vMatrix9111 0 vMatrix9112 -vec3.dotx cameraPosition vMatrix9113 -vec3.doty cameraPosition vMatrix9114 -vec3.dotz cameraPosition vMatrix9115 1 Here is the code to set my cameraPosition target and up vectors of course I am changing camera position to be the values I think I need in the code at the beginning of this post. var cameraTarget vec3.fromValues0 0 0 var cameraPosition vec3.fromValues0 0 0 var cameraUp vec3.fromValues0 1 0 If anyone can spot what I am doing wrong or help me out conceptually that would be much appreciated. Ive been trying different things for the better part of 4 hours. Thank you. Chris

please help me teach yourself game programming in 21 days - Link Wed, 21 Oct 2015 05:54:14

please can somebody help me i bought the book teach yourself game programming in 21 days second hand but i did not get a cd i need a cd or source code from cd please

scaling down a texture causes it to fade away transparency increases - Link Wed, 21 Oct 2015 03:58:48

Ok so Im reviving an old project that uses old school managed DirectX. I know its deprecated but Im really hoping I can get a straight answer without everyone focusing on the wrong thing I want to draw some stuff imagestextures onto a larger texture and then show that larger texture on the screen. Then I want to shrink the larger texture scale it down slowly over time. So far everything seems to work fine until I start shrinking the texture. The transparency seems to shrink along with the scale and the whole thing slowly fades away as it gets smaller Ive been scratching my head for hours and Im sure its one of those easy answers to the right person. Please let me know what could be happening Ive stripped my code down to a pretty simple example below. I even was able to remove all the drawing-to-texture code. It currently just draws a 524x524 square of Orange. When it scales down it dissapears Not shown in the code below but I have the scaleFactor variable slowly transition from 1.0f to 0.0f. The orange square slowly fades to black the background is black so I believe the opacity of the orange square is also going from 1 to 0. The square actually fades away to nothing long before its size is reduced to zero. Id guess that its completely faded away by the time its scaled to about 50 size. mapSprite new SpriteGraphicsMain.m_device mapTexture new TextureGraphicsMain.m_device 524 524 0 Usage.RenderTarget Format.A8R8G8B8 Pool.Default Format.A8R8G8B8 Surface surface mapTexture.GetSurfaceLevel0 Surface buffer GraphicsMain.m_device.GetRenderTarget0 GraphicsMain.m_device.SetRenderTarget0 surface GraphicsMain.m_device.ClearClearFlags.Target System.Drawing.Color.Orange 1.0f 0 draw some stuff here.. Done rendering to texture GraphicsMain.m_device.SetRenderTarget0 buffer now draw it to screen mapSprite.BeginMicrosoft.DirectX.Direct3D.SpriteFlags.AlphaBlend mapSprite.Transform Matrix.AffineTransformation2DscaleFactor Vector2.Empty 0 new Vector2float50 float50 mapSprite.DrawmapTexture Vector3.Empty Vector3.Empty Color.White.ToArgb mapSprite.End

Alpha splatting and unexpected behavior - Link Wed, 21 Oct 2015 03:20:26

My issue is explained in the attached images. I am attempting to texture splat by adjusting alpha values on seperate layers. The problem is when the alpha map runs through the shader multiple times it affects previous alpha adjustments adversly. The shader is very simple and is as follows void psPPAlphaPaintfloat2 iUV TEXCOORD0 out float4 color COLOR0 color tex2DAlphaMap iUV float2 distance float20.0f 0.0f distance.x uCoordinate - iUV.x distance.y vCoordinate - iUV.y float dist sqrtpowuCoordinate - iUV.x 2 powvCoordinate - iUV.y 2 ifdist lt 0.05 color.a 1.0 Older alpha adjustments begin to blur and adust their position in the texture. Any thoughts or clarifying questions Thank you Edit I am running the shader using a full screen quad to make adjustments to the alpha map as a render target Attached Thumbnails

Programming a simply 2D game - Link Wed, 21 Oct 2015 01:27:58

I need help programming a 2D game. Im not expert doing this. I am biologist and I am working on evolutionary ecology. Actually Im testing if grasshoppers which colour doesnt match with their background prefer to use disruptive camouflage placing themselves on a line or hole. As you can see I am working in something totally far away from the programmation of games. But I need a game which allows register the time position and order of detection for a grasshoppers. With that we want to test if people detect better a non disruptive grasshopper. I need to build a simple game with next characteristics - 2D game. - Responsive area for clicking. - Random presentation of pictures. - Register order and time taken for find a grasshopper. - Data export of that register. - Distinction if grasshopper is on a line or over the ground. Thanks for your help. I really need you guys. P.D. Im sorry for my bad English.

Learn Java or C - Link Tue, 20 Oct 2015 22:04:09

Hello everyone I would first like to introduce myself in order for you to be able to answer my question. Some time ago I started learning C programming. I went through most of the basics to be clear variables conditional statements loops functions arrays vectors pointers classes inheritance dynamic memory and template programming. I learned C to start making games but yet I think it is more wise to start with something else while Im very interested in some other development topics as well. I want to learn a new language for that but I just cant decide. I am interested in making two types of things -Desktop applications GUIs I will call them that from now on to prevent confusion -Mobile Applications I did some research and found out that making GUIs for Windows my target platform is the easiest with C and .net. So in that sight I would start learning that but on the other side is Java good for programming mobile applications. In the end I want to learn both languages but first I would like to make some things with the first of the two that I learn. 1. My first interest is making desktop applications so my first question is is Java good for making desktop applications as well then I dont need to make a very hard choice between mobile and desktop. 2. Is one easier to learn than the other for someone with programming experience in C 3. Are the average mobile Andoird apps more profitable financial than GUIs for desktop my main interest is just to make something nice and usefull and learn from that but if one is maybe a little more profitable due to advertisement for example than the other then the choice is a bit more easy 4. What is a good resource I prefer books to learn the language you advise A resource meant for someone who has former programming knowledge for example not a book that spends a huge amount of pages on the theory behind variables. I hope everything is clear otherwise I would like to hear it. Many thanks in advance

How to combine polygon and circle localworld transformation - Link Tue, 20 Oct 2015 21:00:15

I have a rigid body it have a world position and rotation. The rigid body may have multiple shapes each shape may have a local rotation and offset. Maybe one shape is a polygon and another is a circle - so its a combined thing. Each of that has its local offset to some extend - so that its not on the body center anymore. When i for example want to draw a polygon in world space with all the transformation applied i do it like this Mat2f localRotation0.05f Vec2f localOffset100 0 Mat2f worldRotation0.15f Vec2f worldPosition0 0 for int i 0 i lt numVerts i v2 p0 V2localVertices91i localRotation localOffset worldRotation worldPosition v2 p1 V2localVertices91i lt numVerts - 1 i 1 0 localRotation localOffset worldRotation worldPosition drawLinep0 p1 But what about circle shapes They will change the position when the local offset is not zero. Mat2f localRotation0f Circles dont have a local rotation at all Vec2f localOffset-100 0 Mat2f worldRotation0.15f Vec2f worldPosition0 0 Vec2f pos V2localOffset worldRotation worldPosition drawCirclepos radius This seems to be a totally different way than the implementation above. Is there a nice way to change the polygon drawing to use this way - so that it uses a rotated position and of course includes the vertex rotation as well It must be really easy but right now i dont see it at all...

UE4 RTS StarCraft 2 Movement - Link Tue, 20 Oct 2015 19:51:54

Hey Everyone I was hoping to get a little bit of advice. I am playing around with UE4 and I am trying to control a group of characters. UE4 uses Recast Navigation for its NavMesh and you have the option for using DetourCrowds for avoidance. I am trying to get more familiar with recast navigation so its a bit difficult for me still. Anyway the problem I am trying to solve is that I want to prevent units from fighting for a spot when they are being moved. The solution that I like a lot is how StarCraft 2 handles it. When a group of units moves through a stationary group the stationary group moves out of the way of the moving units and allows them to pass through seamlessly. Does anyone know what I can do to get information on how to implement this style of movement in UE4 Thanks

Java AWT Image not Appearing - Link Tue, 20 Oct 2015 18:38:41

Not too sure this was the right place for this. Code Repo Here Im writing under the WorldReconfiguration branch. Im refactoring and rewriting bits of code for someone else. They were originally using AWT for their rendering basis. Ive taken their code and mostly abstracted it so that I can start moving things over to LWJGL or LibGDX painlessly in the near future. Couple issues left there but I think its mostly working. Anyways I almost finished the basis to the AWTRenderer but have run into an issue. Im attempting to render an image onto the panel though its not appearing. The code is running not throwing any errors but I cant figure out why its not actually drawing. The code in question is this couple of lines located here Graphics l_Graphics AWTRenderer p_Renderer.getGraphics l_Graphics.drawImage this.m_Image p_XCoord p_YCoord GameOptions.TILE_SIZE GameOptions.TILE_SIZE null Whenever I currently go to draw a scene I tell the current GameScreen to draw which calls the AWTRenderer and it repaints which should tell the GameScreen to start drawing everything with the reference to the Renderer. The GameScreen tells the World to do its drawing which currently passes the reference to a TileRegion which passes the Reference to each Tile. The Tile then gets its GraphicsComponent and tells it to draw which gets the associated GraphicsAsset and tells it to finally draw using the original reference to the Renderer. Bit convoluted in my opinion but this is my first time doing this stuff. Tried my first implementation of a CBES too. At this point Ive verified that l_Graphics is not null that the code is running and earlier up the call branch I can draw a rectangle which appears and should be using the same Graphics reference. Google hasnt really given me any answers though Ive always been bad at search strings. Also tried drawing a rectangle inside that function but it doesnt appear either. The issue as far as I can tell is with the Graphics. I dont have a solid understanding of AWT and wasnt planning on it since I want to move librariesAPIs soon. I think it may be related to AWT paint function being called by what I think is a different thread when repaint is called. Before Im told to move to an engine or different library entirely Id like to just get this working.

Unable to view log info in LogCat with Android app - Link Tue, 20 Oct 2015 17:35:40

Im trying to send log messages so that I can see the output in LogCat via Eclipse. I tried it with the Android and SDL call but nothing shows up in Log Cat. I set the filter to verbos or debug but none of the information is displayed. Is there a trick to this or am I doing something wrong. Had to apply a fix to Eclipse so that it would show all the LogCat tabs so I do see all the info. void CStatCounterIncCycle SDL_Window m_pWindow These counters are incremeented each game loop cycle so they can be placed here in this function because this function is also called each game loop cycle m_elapsedFPSCounter CHighResTimerInstance.GetFPS m_cycleCounter update the stats every 500 miliseconds if m_statsDisplayTimer.ExpiredCTimerRESTART_ON_EXPIRE Show the output if defined__ANDROID__ __android_log_printANDROID_LOG_DEBUG Lap Cat Games s Test Message else if CSettingsInstance.GetFullScreen SDL_SetWindowTitle m_pWindow GetStatString.c_str endif Now that the stats are displayed we can reset out counters. ResetCounters HasCycleCompleted or void CStatCounterIncCycle SDL_Window m_pWindow These counters are incremeented each game loop cycle so they can be placed here in this function because this function is also called each game loop cycle m_elapsedFPSCounter CHighResTimerInstance.GetFPS m_cycleCounter update the stats every 500 miliseconds if m_statsDisplayTimer.ExpiredCTimerRESTART_ON_EXPIRE Show the output if defined__IPHONEOS__ defined__ANDROID__ SDL_LogDebug SDL_LOG_CATEGORY_RENDER s GetStatString.c_str else if CSettingsInstance.GetFullScreen SDL_SetWindowTitle m_pWindow GetStatString.c_str endif Now that the stats are displayed we can reset out counters. ResetCounters HasCycleCompleted

Which game-engine to I use - Link Tue, 20 Oct 2015 13:07:03

I have an idea of an First-person RPG. Its supposed to be a fantasy-based RPG with the selection of multiple characters at the same time with very basic old-fashioned graphics. Dialogue stats and inventory items like armor gauntlets boots etc. Imagine Might Magic-series if you can. - Which engine would be the best to approach this task - Where is the best place to search for tutorials and learning the basics I have understood that C is a very usefull programming-language to know but I am unsure of which engine would be the best for this kind of thing.

Code for legacy openGL but still compatible with new openGL - Link Tue, 20 Oct 2015 09:38:56

I am developing a tool that need to support as a wish the old legacy openGL but I still would like to make the things easy to be used with new openGL using minimal switches and code reuse The thing I need to develop dont need special features just show triangles simple color materials normals maybe textures. It would be something that can be done with legacy openGL but I would like to still be able to use to extended in future to use some more features from shaders.. Could you suggest some tutorials or way that I can achieve this goal

C Float text format in other countries - Link Tue, 20 Oct 2015 09:00:11

I have a problem that a tool I have written is outputting floats incorrectly for the game in various countries. Specifically when I use a textwriter to output floats I typically get 1000 when the game is expecting 1.000 At the moment they are having to do a global find and replace on comma replacing it with . dot but thats not really very good. When I am reading the data I can use .. float.Parsenparts910 System.Globalization.CultureInfo.InvariantCulture However when writing the data I cannot see the same interface anywhere. Of course this problem has popped up when the tool is just about complete and contains close to half a million lines of code. Anybody know a way of setting the culture for text output Hopefully in a global way so I dont have to search the entire code base for .Write

34No match for call to34 error help please - Link Tue, 20 Oct 2015 03:36:27

Hi So Ive been trying to compile this code but it always results in an error menuhandler.cpp18error no match for call to stdvectorltGuiElemgt Button I was trying to create a simple menu system... Heres the code menuhandler.hpp pragma once class GuiElem public static stdvectorltGuiElemgt guiElems float PosX float PosY float Width float Height float Rot bool SetPosfloat newX float newY bool SetWidthfloat newWidth bool SetHeightfloat newHeight bool SetRotfloat newRot class Button public GuiElem public sfString textDisplay ButtonsfString name float x float y float width float height bool newButtonsfString name float x float y float width float height bool isClicked bool isMouseIn menuhandler.cpp include ltSFMLGraphics.hppgt include ltvectorgt include menuhandler.hpp ButtonButtonsfString name float x float y float width float height textDisplay name PosX x PosY y Width width Height height bool ButtonnewButtonsfString name float x float y float width float height try GuiElemguiElemsButtonname x y width height return true catch... return false Thanks in advance...

Tessellation and Bullet Decals - Link Tue, 20 Oct 2015 03:30:04

Since tesellation is a screen space effect and it is texture based I was thinking of how decals might be implemented. Lets assume the thing you are shooting is pretty bumpy up close and far away just the flat wall. If you intersect the lowest point on the wall while tessellated performing some kind of raycast to find the actual value it would hit up close and tessellated you would be either above or below the flat surface of the wall depending on if your displacement is outward or inward for the height map. So then the decal at some point is either floating or has disappeared. Any ideas

This should be simple for someone to help me with ADDING SOUND IN - Link Tue, 20 Oct 2015 01:33:16

Im about to throw my computer through a wall. This is a very very simple game. The code below explains the balls health and when the ball gets below a certain level the audio will say GAME OVER. The sound is not playing I have no idea what else to do and I get no errors. pragma strict var MaxFallDistance -10 private var IsRestarting false var GameOver AudioClip function Update if transform.position.y lt MaxFallDistance if IsRestarting false RestartLevel function RestartLevel IsRestarting true GetComponent.ltAudioSourcegt.clip GameOver GetComponent.ltAudioSourcegt.Play yield WaitForSeconds GetComponent.ltAudioSourcegt.clip.length Application.LoadLevelgame

Update FixedUpdate - Link Tue, 20 Oct 2015 01:28:58

Hi Is it worth to have two virtual Update and FixedUpdate or only have the Update using fixed time step is enough Any situation where both is a good option Thanks

Predictive aim with a parable in Tower defense game - Link Mon, 19 Oct 2015 20:55:12

Im developing a tower defense so ive got this archer tower that shoots arrows in a parable. Ive got the method that calculates the needed parable to get from the tower to any ponint. Ive got the enemy speed in x and y and position. The problem cames when i need to do the predictive aim. I used the following equations to make it and im really close because it works sometimes but i dont know why it doesnt work always. Ptarget impact Ptarget now t vtarget Pshot impact Pplayer t vshot Ptarget impact Pshot impact Ptarget now t vtarget Pplayer t vshot Ptarget now - Pplayer t vshot - t vtarget t vshot - vtarget Ptarget now - Pplayer t Ptarget now - Pplayer vshot - vtarget t position velocity Ptarget impact Ptarget now position velocity vtarget I think the problem is on vshot because i move the arrow like this ifobjectiveOnFront xPos xPos - Time.deltaTimespeed else xPos xPos Time.deltaTimespeed transform.position new Vector3xPos ParableYxPostransform.position.z So i dont know how to express vshot in x and y. Can somebody help me Thanks in advance

Ray-triangle intersection on scaled model - Link Mon, 19 Oct 2015 20:19:32

Hi. I faced with one issue while make test on intersection of ray with triangles. It works quite well with non-scaled model but with scaled - ray intersection returns false. Does anyone know which additional manipulations with the ray I must do to have fully correct results with scaled models In general even without code. I beleive it must be quite common thing that I am missing.

Gaming News Headlines - Yahoo News - Link Fri, 23 Oct 2015 05:42:00

ltpgtlta 30 height86 altPlayStation Store Has a New Wishlist Feature alignleft titlePlayStation Store Has a New Wishlist Feature border0 gtltagtWeb version of the store now lets you keep track of games and movies you want.ltpgtltbr clearallgt

PlayStation Store Has a New Wishlist Feature - Link Thu, 22 Oct 2015 20:00:04

ltpgtlta srchttpl1.yimg.combtapires1.2Myk4UD6jAykPIvvqowLrHA--YXBwaWQ9eW5ld3NfbGVnbztmaT1maWxsO2g9ODY7cT03NTt3PTEzMA--httpmedia.zenfs.comen-UShomerunpolygon.vox.coma5de63e4c5fbb8b6da29d465d1b6f33a 30 height86 altPlayStation Store adds wishlist function alignleft titlePlayStation Store adds wishlist function border0 gtltagtOn the web anyway.ltpgtltbr clearallgt

PlayStation Store adds wishlist function - Link Thu, 22 Oct 2015 19:30:02

ltpgtlta srchttpl2.yimg.combtapires1.2.t1yAt9QYgdXPhC_L9z74A--YXBwaWQ9eW5ld3NfbGVnbztmaT1maWxsO2g9ODY7cT03NTt3PTEzMA--httpmedia.zenfs.comen-UShomerunpolygon.vox.com5747437a5f0cd525572a90086a10025a 30 height86 altSony offers sneak peek at whatamp039s coming to PlayStation Experience 2015 alignleft titleSony offers sneak peek at whatamp039s coming to PlayStation Experience 2015 border0 gtltagtMore than 25 major publishers and developers will attend this yearamp039s PlayStation Experience in December Sony Computer Entertainment confirmed on thePlayStation Blog today. In a post outlining this yearamp039s PlayStation fan gathering Sony also revealed a list of games 49 of them to be exact that will be playable at the event. Companies attending PlayStation Experience 2015 include Bungie Capcom EA Square Enix and Warner Bros. as well as Sonyamp039s own studios Naughty Dog Santa Monica Studios Media Molecule and SCE Japan Studios.ltpgtltbr clearallgt

Sony offers sneak peek at whats coming to PlayStation Experience 2015 - Link Thu, 22 Oct 2015 19:25:58

The day one patch for Halo 5 Guardians hit the Xbox Onetoday at 1200 pm ET and in celebration Imgoing to live stream a few matches of Arena and Warzone if Ican find enough people on the servers to play with. DONT MISSHalo 5 gameplay videos Watch us play through the first 3 campaign missions Right now there are only two playlists in order to ensure that pre-release players have plenty of other players to match up with but those playlists include a mix of the best team-based game types and maps for Arena so hopefully well get a nice sample of everything Arena has to offer. Illbe starting the broadcast at around 730 and playing until I go cross-eyed.Or

Watch us play Halo 5 Guardians multiplayer live on Xbox One at 730 p.m - Link Thu, 22 Oct 2015 19:00:02

ltpgtlta srchttpl1.yimg.combtapires1.2QBQGSNOyl9szjwYNSVO.Ng--YXBwaWQ9eW5ld3NfbGVnbztmaT1maWxsO2g9ODY7cT03NTt3PTEzMA--httpmedia.zenfs.comen-UShomerunpolygon.vox.com1ca7d465cc5d4a34dc544a420c245471 30 height86 altXboxamp039s Elite controller Activision Blizzardamp039s new eSports and whoops Rock Band 4 alignleft titleXboxamp039s Elite controller Activision Blizzardamp039s new eSports and whoops Rock Band 4 border0 gtltagtWelcome to Polygon Minimap a podcast about the biggest gaming entertainment and pop culture news of the day.ltpgtltbr clearallgt

Xboxs Elite controller Activision Blizzards new eSports and whoops - Link Thu, 22 Oct 2015 18:30:01

ltpgtlta srchttpl.yimg.combtapires1.2CBb_XjswAE7HssIwwLIkFA--YXBwaWQ9eW5ld3NfbGVnbztmaT1maWxsO2g9ODY7cT03NTt3PTEzMA--httpmedia.zenfs.comen-UShomerunpolygon.vox.com472c3441e397e8138bca6f2b6b88bbbc 30 height86 altHalo 5 digital pre-orders could have a borked download so check your Xbox One alignleft titleHalo 5 digital pre-orders could have a borked download so check your Xbox One border0 gtltagtHalo 5 Guardians is a massive game in terms of itshard drive footprint so it helps that people who pre-ordered a digital copy from the Xbox Games Store can download the title ahead of time. The issue applies to some individuals who pre-ordered Halo 5 before Sept. 21 and who have disabled their Xbox Oneamp039s ampquotInstant Onampquot power mode aka the mode that supports Kinectamp039s ampquotXbox onampquot voice command. If the Halo 5 installation takes up more than 40 GB you have the correct version of the game and youamp039ll be able to download further updates as they become available.ltpgtltbr clearallgt

Halo 5 digital pre-orders could have a borked download so check your - Link Thu, 22 Oct 2015 17:04:00

ltpgtlta 30 height86 altXbox Game Sales and Xbox Live Users Rise But Hardware Sales Fall alignleft titleXbox Game Sales and Xbox Live Users Rise But Hardware Sales Fall border0 gtltagtHereamp039s what you need to know from Microsoftamp039s earnings release today.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