Page:38 - News Archived: 3437

Title Date
How can I saveflush the offline data to disk and start it from there - Link Mon, 07 Sep 2015 12:54:13

I need to generate a large amount of map data from my game editor offline. But the generation takes more than 6 hours to complete. If the end of the day is reached you know you need to stop working and some sort. You need to flush the data to disk. But How can I start it next time from the check point What variables do I need to save for next time commencing I dont want to calculate everything from the start. What strategy is good for this kind of data dumping Thanks Jack

Precalculate lightmap and specular reflection - Link Mon, 07 Sep 2015 04:52:29

Im new to computer graphics and I got some questions about lightmap. This is the rendering equation and if I use BRDF with I got From my understanding the diffuse part is view independent so it could be precalculated. But the specular part is viewdependent IBL could be used to handle indirect specularhttpsseblagarde.wordpress.com20110817hello-world but how about direct specular. could they be precomputed in practice Here lists some of my ideas. 1. The lightmap could store indirect light all the direct light are computed from punctual light sources at runtime. 2. Store main light direction in the lightmap use that direction to calulatespecular reflection. 3. Store light source in the cubemapIBL not sure how to do that.

SFML C Bullet angle problem - Link Mon, 07 Sep 2015 04:43:51

So I have a top down game but as cool as it looks when I press and hold the mouse all the bullets will travel to that new position... Not really sure how else to handle this really so any input would be great. this-gtmouse window.mapPixelToCoordssfMousegetPositionwindow float a player.playerPosition.x - mouse.x float b player.playerPosition.y - mouse.y Shoot the projectile if sfMouseisButtonPressedsfMouseLeft proj.rect.setPositionplayer.playerSprite.getPosition mouseAngle atan2b a 180 PI projArray.push_backproj proj.bulletLifetime if proj.bulletLifetime gt proj.lifeTime proj.destroy true Handle bullet destroy projCounter 0 Iterate over the projectile for iter projArray.begin iter projArray.end iter projArray91projCounter.rect.movestdcosPI mouseAngle 180.f 8.0f -1 stdsinPI mouseAngle 180.f 8.0f -1 window.drawprojArray91projCounter.rect projCounter gifhttpsgyazo.com5978b9b9e538f1a803a2ae4f883db7c1

Popular languages for networking for games - Link Mon, 07 Sep 2015 03:35:07

I am extremely surprised that every time I tried searching for game networking I literally see no useful results at all. Its like a topic that none ever talks about. I want to know what are the most commonly used languages as far as networking a game goes. I am a intermediateadvanced programmer with C and Java experience. I have concluded that Javascript and Java are both popular for game networking. Is this true If I am using Java with LibGDX would you say that using Java for the server-side is more appropriate than using Javascript Is there a difference in performance really Opinions

how to install lua on yosemite - Link Mon, 07 Sep 2015 03:19:39

how do i install lua 5.3.1 on yosemite

Switching Algebra Question - Link Sun, 06 Sep 2015 23:59:25

Hello all Ive ran into some problems with switching algebra. The professor teaching this course didnt run through any examples at all. And the ones in the book are fairly useless so far. I am just going to list a few to help me along to solve the rest of the problems. Simplify fwxyz x xyz xyz wx wx xy Use this theorem to simplify the following problem. Theorem a ab a b aa b ab X XABC BC Use Consensus to simplify X Y Z W VW V Y Z W

strange problem different colors on different devices - Link Sun, 06 Sep 2015 20:48:30

since i cant take good image of the result in ogles 2.0 which is what i target i post similar result in es 2.0 emulator. now problem is in shaders but i am not quite sure why has anybody encoutered similar problem how to fix this what may cause such behavior vertex shader Spoiler attribute vec3 Vpos attribute vec2 Vtexcoord attribute vec3 Vnormal attribute vec4 Vcolor uniform vec4 MVP1 uniform vec4 MVP2 uniform vec4 MVP3 uniform vec4 MVP4 vec4 vertexClip varying vec3 vertex_position varying vec3 v_normal varying vec2 texcoord float dp43vec4 matrow vec3 p return matrow.xp.x matrow.yp.y matrow.zp.z matrow.w void main texcoord Vtexcoord vertexClip.x dp43MVP1 Vpos vertexClip.y dp43MVP2 Vpos vertexClip.z dp43MVP3 Vpos vertexClip.w dp43MVP4 Vpos v_normal Vnormal vertex_position Vpos gl_Position vertexClip Spoiler const float Eta 0.15 varying vec3 vertex_position varying vec3 v_normal varying vec2 texcoord uniform vec3 u_cameraPosition uniform vec3 LPOS uniform sampler2D normal_tex uniform sampler2D height_tex uniform float min_height uniform float height_length uniform float time uniform vec3 sky_color uniform vec3 sun_color vec3 vectorABvec3 A vec3 B return vec3B.x-A.x B.y-A.y B.z-A.z vec3 vectorcrossvec3 v1 vec3 v2 vec3 crossproduct crossproduct.x v1.yv2.z-v1.zv2.y crossproduct.y v1.zv2.x-v1.xv2.z crossproduct.z v1.xv2.y-v1.yv2.x return crossproduct vec3 Normalvec3 p1 vec3 p2 vec3 p3 vec3 v1 vectorABp2 p1 vec3 v2 vectorABp3 p1 return normalize crossv1 v2 float PhongReflectionvec3 DirFromVertToLight vec3 surfnormal vec3 PerfectlyReflectedDir vec3 DirVertexCam float eep dotPerfectlyReflectedDir DirVertexCam float sign 1.0 if eep lt 0.0 sign -1.0 return 0.5dotDirFromVertToLightsurfnormal 0.8signpoweep 7.0 vec3 return_colorvec3 worldNormal vec3 lightDir normalizevectorABLPOS vertex_position vec3 refraction refractlightDir worldNormal Eta vec3 reflection_vec reflectlightDir worldNormal vec3 cam_vert normalize vectorAB u_cameraPosition vertex_position float REFLECTIONi max0.0 -dotcam_vert reflection_vec float REFRACTIONi max0.0 1.0-dotcam_vert refraction vec3 refractionColor sky_color REFRACTIONi vec3 reflectionColor sun_color REFLECTIONi float fresnel Eta 1.0 - Eta powmax0.6 1.0 - dot-lightDir worldNormal 5.0 vec3 ambient_light vec30.0 0.0 0.3 vec3 vert_light normalize vectorABvertex_position LPOS vec3 vert_cam normalize vectorAB vertex_position u_cameraPosition float phong_r PhongReflectionvert_light worldNormal reflection_vec vert_cam if isnanphong_r phong_r 0.0 phong_r max phong_r 0.0 phong_r clamp phong_r 0.0 256.0 phong_r clamp phong_r 0.0 1.0 float intensity min1.0 max0.0 fresnelphong_r vec3 res_color mixrefractionColor reflectionColor intensity vec3 sth sky_color res_color sth clampsth 0.0 1.0 return sth float n3ddistancevec3 first_point vec3 second_point float x first_point.x-second_point.x float y first_point.y-second_point.y float z first_point.z-second_point.z float val xx yy zz return sqrtval void main vec3 finalColor vec3 adot vectorABu_cameraPosition vertex_position float dst sqrtdotadotadot float mipmapintens dst320.0 if n3ddistanceu_cameraPosition vertex_position gt 660.0 gl_FragColor vec40.0 0.0 0.0 1.0 else float4 relfectColor cubeTexture.SampleSampleType reflectnnormal nviewdirection vec3 nnormal texture2Dnormal_tex texcoord .rgb2.0 - 1.0 vec3 vertex_color return_colorv_normal vec3 texture_color return_colornnormal finalColor vertex_color texture_color 2.0 tutaj mozna by bylo zrobic jeszcze rozjasnianie float intens 1.0 - dst500.0 finalColor finalColor intens 1.0-intenssky_color gl_FragColor vec4finalColor 1.0 note that strange things happen invec3 return_colorvec3 worldNormal input normal data which are parameters for that function call are the same for both well i used eyes to verify that can be sure if this is precision problem or what normals seem to be the same sane for light position camera position here i post again but only the code of that function Spoiler vec3 return_colorvec3 worldNormal vec3 lightDir normalizevectorABLPOS vertex_position vec3 refraction refractlightDir worldNormal Eta vec3 reflection_vec reflectlightDir worldNormal vec3 cam_vert normalize vectorAB u_cameraPosition vertex_position float REFLECTIONi max0.0 -dotcam_vert reflection_vec float REFRACTIONi max0.0 1.0-dotcam_vert refraction vec3 refractionColor sky_color REFRACTIONi vec3 reflectionColor sun_color REFLECTIONi float fresnel Eta 1.0 - Eta powmax0.6 1.0 - dot-lightDir worldNormal 5.0 vec3 ambient_light vec30.0 0.0 0.3 vec3 vert_light normalize vectorABvertex_position LPOS vec3 vert_cam normalize vectorAB vertex_position u_cameraPosition float phong_r PhongReflectionvert_light worldNormal reflection_vec vert_cam if isnanphong_r phong_r 0.0 phong_r max phong_r 0.0 phong_r clamp phong_r 0.0 256.0 phong_r clamp phong_r 0.0 1.0 float intensity min1.0 max0.0 fresnelphong_r vec3 res_color mixrefractionColor reflectionColor intensity vec3 sth sky_color res_color sth clampsth 0.0 1.0 return sth

Procedural terrain texture generation - Link Sun, 06 Sep 2015 19:52:27

I have a hexagonal grid of fields each field has a certain terrain type. I assign every vertex of hexagon with terrain type and pass it as attribute to vertex and then fragment shader. Then I use the extrapolated value to blend terrain textures together. For instance 1 is grassy 2 is desert. Vertex shader varying vec2 vUv attribute float terrainType varying float vTerrainType void main vUv uv vTerrainType terrainType vec4 mvPosition mvPosition modelViewMatrix vec4 position 1.0 gl_Position projectionMatrix mvPosition Fragment shader uniform vec3 diffuse uniform float opacity varying vec2 vUv varying float vTerrainType uniform sampler2D map uniform sampler2D map1 void main gl_FragColor vec4 diffuse opacity vec4 texelColor texture2D map vUv 2.0 - vTerrainType texture2D map1 vUv vTerrainType - 1.0 gl_FragColor gl_FragColor texelColor Implementation is WebGL if it makes any difference. The result looks really unnatural so is there any way to make it smoother and rounder

Topographical mapping librariesC - Link Sun, 06 Sep 2015 19:11:33

Im seeking advice concerning approaches to terrain representation and mapping far a wargame application. Im at the beginning design stages of what is in effect a real-time strategy game that realistically depicts ground warfare at the entity i.e. individual vehicles and soldiers scale. At present I intend to create a strictly 2D simulation played entirely from a 2D overhead map view of the battlefield specifically a topographical map with 2D military symbology superimposed. I also intend to create the application using QtC and the QT Creator IDE. I consider myself to be an intermediate-level C programmer. This project while obviously complex is just a non-commercial open-ended labor of love with which I intend to keep myself busy with interesting sub-projects and to experiment with AI later on down the road. The basic parameters are as follows. gt Windows desktop app only gt Simulation to run in pause-able real-time or accelerated real-time. gt Terrain representation consists of digital terrain elevation data plus overlay data containing things like vegetation coverage and waterways man-made objects like roads buildings minefields etc. gt Efficient LOS pathfinding and tactical planning are essential that statement is probably mostly superfluous in the FPSRTSwargaming context. gt As far as rough order of magnitude a given mission might feature as many as 200 vehicles and several hundred individual soldiers and the high end with typical missions containing half or less of that. gt Not an MMORPG but 100 participants on all sides should be at least theoretically possible with 4 to 25 being the most common number of participants. gtPresently I have neither the intention nor the desire to create a 3D simulation. To the extent I can get the necessary infrastructure to do so at little or no cost either my development time or runtime performance at some point in the future however I suppose it makes sense. Id like to find an open-source mapping library that I can integrate with a minimum of fuss. Ideally a library that can 1 read and write digital terrain elevation data files 2 generate contour map images 3 determine the slope of terrain at any point on the terrain surface and 4 perform line-of-sight calculations. Ive done some preliminary digging but am a bit bewildered at this point being a complete neophyte when it comes to geospatial information systems. For example I know there are 3D frameworks like Unity3D Delta3D and Ogre3D but it seems like there would be a significant effort to master these systems in order to use just a small segment of their functionality. Ive read a little about ArcGIS but it also seems like a heavy-duty solution to a simpler problem. Can anyone advise

Spherical Harmonics Cubemap - Link Sun, 06 Sep 2015 18:59:01

I am working on generating a spherical harmonics irradiance environment map for diffuse lighting. Ive read various papers on the topic 1 2 3 4 and Ive set to work implementing the process as a set of compute shaders. Im struggling with getting the right result. Ive iterated over an input cubemap and generated 9 coefficients each for R G and B. I have a function to evaluate the coefficients for a direction. When generating the output cubemap do I just store this evaluation at each texel or do I store the evaluation multiplied by the corresponding texel read from the input cubemap

Scrut Hut Network Protocol Version 2 - Link Sun, 06 Sep 2015 18:46:16

How does this protocol look at first glances. It uses tokens encoded by objects serialized and passed on the stream basic system functionality can be controlled by using token streams. I have one token stream per kernel in my system and one per module supporting intermodular communication. I am attempting to pipe the kernel streams from networked machines to allow a single workspace where all machines act as if they are running as a single application. Just needs to be expanded for user based support more organized system and chat support with file transfer support. I plan to develop a webserver with http protocol and load in a module where the web server can link to my game servers this way server stats can be displayed on my webpage. But webserver would most likey provide a server side script done in house instead of php or anything. Just a project... Tokens - Null Token 0x00 KernelToken - Generally Active Behavior KernelSetStateToken - Active only KernelGetStateToken - Active or Passive KernelLoadModuleToken - Active only KernelUnloadModuleToken - Active only KernelLinkStreamToken - Active only KernelUnlinkStreamToken - Active only KernelVariableSendToken - Active only KernelVariableRequestToken - Active or Passive KernelVariableRemoveToken - Active only GloablToken - Either Active or Passive communication GlobalHandshakeToken - Active only GlobalTerminateToken - Active or Passive GlobalAcknowledgementToken - Passive only GlobalSuccessToken - Active only GlobalSynchronizeToken - Active or Passive GlobalPendingToken - Passive only GlobalFlushToken - Active only Module - Generally Active Behavior ModuleRequestObjectToken - Active only ModuleCollectGarbageToken - Active or Passive ModuleReapObjectsToken - Active or Passive ModuleCloseLibrary - Active only ModuleCreateObjectToken - Active only ModuleDestroyObjectToken - Active only ModuleSendCommandToken - Active only ModuleListenCommandToken - Active only ExecutableResourceToken - Generally Active Behavior LinkScrutByteCodeToken - Active only UnlinkScrutByteCodeToken - Active only ExecuteScrutByteCodeToken - Active only SendScrutByteCodeToken - Active only TranslateScriptToken - Active only LoadScriptToken - Active only UnloadScriptToken - Active only SendScribbleToken - Active only SendScrasmToken - Active only ExecuteScriptToken - Active only PauseScriptToken - Active only ObjectToken - Active or Passive Behavior ObjectNullToken - Active or Passive only ObjectPointerToken - Active or Passive only ObjectReferenceToken - Active or Passive only ObjectSerializedToken - Active or Passive only StreamToken - Generally Active Behavior StreamRewindToken - Active only StreamFlushToken - Active only StreamNullToken - Active or Passive ----------------------------------------------------------------------- Machine 1 - Active Connection host Machine 2 - Passive Connection client Remember which machine is Active and Passive Connection. A Passive connection can never request to send executable resources to the Active connection this eliminates the possibility of the client taken control of the host. Not all request are appropriate and process successfully depending on Connection Status. Begin Communication Connection via handshake and confirmed success Machine 1 gtgt Machine 2 -gt GlobalHandshakeToken Machine 2 gtgt Machine 1 -gt GlobalAcknowledgementToken Machine 1 gtgt Machine 2 -gt GlobalSuccessToken --- pass tokens within this block for proper communication --- End Communication Connection passed handshake will now terminate Machine 1 gtgt Machine 2 -gt GlobalTerminateToken Machine 2 gtgt Machine 1 -gt GlobalAcknowledgementToken Machine 1 gtgt Machine 2 -gt GlobalSuccessToken ----------------------------------------------------------------------- Example Blocks of Communication Send program then translation execution and delete on target machine Machine 1 gtgt Machine 2 -gt SendScribbleToken Machine 2 gtgt Machine 1 -gt GlobalPendingToken Machine 1 gtgt Machine 2 -gt ObjectSerializedToken Machine 1 gtgt Machine 2 -gt GlobalAcknowledgementToken Machine 2 gtgt Machine 1 -gt GlobalSuccessToken Machine 1 gtgt Machine 2 -gt TranslateScriptToken Machine 2 gtgt Machine 1 -gt GlobalSuccessToken Machine 1 gtgt Machine 2 -gt GlobalAcknowledgement Machine 1 gtgt Machine 2 -gt ExecuteScrutByteCodeToken Machine 2 gtgt Machine 1 -gt GlobalAcknowledgement Machine 1 gtgt Machine 2 -gt GlobalSuccessToken Machine 1 gtgt Machine 2 -gt UnlinkScrutByteCodeToken Machine 2 gtgt Machine 1 -gt GlobalAcknowledgement Machine 1 gtgt Machine 2 -gt GlobalSuccessToken Request object from machine Machine 1 gtgt Machine 2 -gt ModuleRequestObjectToken Machine 2 gtgt Machine 1 -gt GlobalAcknowledgementToken Machine 1 gtgt Machine 2 -gt GlobalPendingToken Machine 2 gtgt Machine 1 -gt ObjectSerializedToken Machine 1 gtgt Machine 2 -gt GlobalAcknowledgementToken Machine 2 gtgt Machine 1 -gt GlobalSuccessToken

Can one access one class field by another class field - Link Sun, 06 Sep 2015 15:32:20

Lets say there is a class foo that has a variable of another class call it C. Is is possible to access C members by a field of foo EDIT I forgot to mention that it should be without any additional memory or significant performance loss like with using references - mem loss. class C public float t class foo public C c float x this should access c.t f float Tf.x returns foo.c.t f.x5f The similar example was given by Alvaro however it regards an access between two fields of one class struct vector3 float x y z float operator91int index assertindex gt 0 index lt 3 return this-gtmembers91index float operator91int index const assertindex gt 0 index lt 3 return this-gtmembers91index static float vector3 const members913 float vector3 const vector3members913 vector3x vector3y vector3z

Stop HLSL from optimizing out unused textures - Link Sun, 06 Sep 2015 15:05:42

Say I have a shader that uses 4 textures as input. For debugging purposes I just want to check whats in the 4th texture so I comment out the majority of the shader and just sample that one. I get all black because apparently the shader has optimized that texture to slot t0 instead of t3 where i declared it. Im compiling withD3DCOMPILE_DEBUG D3DCOMPILE_SKIP_OPTIMIZATION and yet this optimization still happens. Is there a way to disable it for debug builds Its not a problem I cant work around but its a nuisance.

getting specular on wrong side of tree trunks - Link Sun, 06 Sep 2015 15:05:26

dx9 fixed function lighting system i just noticed im getting specular reflection on the wrong side of tree trunks. its most noticeable during night scenes lit only by moonlight a single directional white diffuse light of low intensity. due to the complexity of the lighting equation used i opted to use almost no overall ambient and use a single diffuse directional light for sunlight or moonlight. then i use materials to control the lighting of various things plants ground rocks etc. so a fair amount of time was spent tweaking the specular for the plant material so moonlight would reflect off of leaves just right. but for some reason it also does a specular reflection on the back side of tree trunks which use the same material. this makes no sense. the triangles are backfacing to the directional light. or does the lighting not take backfacing into account and it does specular whenever the angles are right irregardless and i have to create and use a non-specular tree trunk material to get rid of it

Unreal morp animation collision - Link Sun, 06 Sep 2015 12:22:34

Hi any ideas on how to have collision with a morph animation in Unreal Player swim on oceanwaves. Many thanks

How can I speed up my PythonPygame game - Link Sun, 06 Sep 2015 09:21:48

Ive created a game in PythonPygame but on some older computers its running very slow. The code is on Github. How can I speed up the game

IFFT compute shader - Link Sun, 06 Sep 2015 09:17:53

Hi Have been trying to implement the tessendorf ocean without any success. So basically I have the ht computed in a texture image2D and I need to transform that back from frequency domain. I have attached my ht texture as spectrum.png. The trouble I have been having is implementing FFT with compute shader. I understand that I have to perform a 2D FFT essentially one FFT for horizontal direction and another FFT for vertical direction. For the butterfly algorithm I would have to precompute a butterfly texture for storing the index and weights to perform the addition. The butterfly algorithm also has multiple stages and in my case I have 8 stages as I use a 256x256 image. And within each stage the output becomes the input of the next stage. Similarly the output from FFTX would be the input for FFTY. This is done using two ping pong textures and we switch them before we dispatch compute shader. for int i 0 i lt m_iNumOfPasses i m_pFFTXComputeShader-gtSetPassi m_pFFTXComputeShader-gtCompute for int i 0 i lt m_iNumOfPasses i m_pFFTYComputeShader-gtSetPassi m_pFFTYComputeShader-gtCompute And my compute shader looks like this version 430 layout local_size_x 1 local_size_y 1 local_size_z 1 in layoutlocation 0 rgba16f uniform image2D inputTex layoutlocation 1 rgba16f uniform image2D butterflyTex layoutlocation 2 rgba16f uniform image2D destTex uniform int pass vec2 FFTivec2 pos vec2 index vec2 weight get the two inputs we perform butterfly operation on vec2 input1 imageLoadinputTex ivec2index.x pos.y.xy vec2 input2 imageLoadinputTex ivec2index.y pos.y.xy get the weighted input2 vec2 weighted2 weighted2.x weight.x input2.x - weight.y input2.y weighted2.y weight.y input2.x weight.x input2.y add everything together vec2 complex input1 weighted2 return complex void main const ivec2 thread_xy ivec2gl_GlobalInvocationID vec4 indexAndWeight imageLoadbutterflyTex ivec2thread_xy.x pass vec2 index indexAndWeight.xy vec2 weight vec2 result FFTthread_xy index weight imageStoredestTex thread_xy vec4result 0.0 1.0 My FFT for vertical looks very similar to this shader but with different lookup coordinates for the images. Is there anything anyone can see I have got conceptually mistaken Im getting a black texture for my displacement texture see ifft.png. To be honest Im not quite sure what to expect the texture to look like at the stages of FFT I think it does look partially right with the butterfly structure similar to some images Ive seen online. Any help would be appreciated thanks Please pardon anything strange you see in the compute shader Ive only just begun playing with compute shaders and I have no idea why its so slow at the moment 9 ms for the FFT must be the slowest GPU FFT anyone has written but I am just trying to go for the correctness first. Attached Thumbnails

Generating and initializing content for a text RPG - Link Sun, 06 Sep 2015 02:31:07

Point me in the right direction please So Ive got a basic albeit over engineered text-RPG system down. Rooms with characters inside of them and items inside of those. Characters can move interact get items etc. Theres a class that parses player-input-commands and is imported by the main game loopso the basics are there.Now that I have all the basic systems down Id like to start creating and storing the world but am at somewhat of a loss as to how to do this. Im using C and can think of several things Hardcoding the creation of each object and its containers in C. For testing purposes this is working for now but its not a long-term solution An SQL database - which I really want to use just because I think itd be a good learning experience. This would require learning a C interface for SQL or maybe a non-SQL database like MongoDB. Im looking at SQLite now. Text files - which I dont want to use but might be easier. Id do something like have a Rooms file a Characters file and an Items file or something. Id then have to figure out a way of getting C to read the appropriate lines from these files and use them to instantiate the respective objects JSON XML etc. - which I dont fully understand but think its something that turns strings into numbers for easy storage and recalling. Might it be the interface through which Rooms will probably have to be hard coded at first until I get to random-room generation Items and characters i.e. - monsters Id like to randomly generate. So what do you guys use and how do you useimplement it

Wanting to make games for android - Link Sun, 06 Sep 2015 02:06:45

Hi I dont know if this question has been asked but Im interested in making some games for android but Im not too sure where to start. I plan on using unreal game engine and android studio. I dont know if I should learn java c c or all three and if I should learnuse flash as well. This is all I know I dont know anything else I need to learn or other programs I need to have. I want to make 2d 2.5d and 3d games there are a few of particular 2.5d games called dungeon fighter online castle crashers and double neon dragon that I would like to make in that type of basic structure and a 3d game like how hydro thunder hurricane was basically structured as well.

Need to be taught to make a 3D MMORPG - Link Sat, 05 Sep 2015 21:43:45

Hello me and my friend are up and coming Indie Game Devs We need someone or a course of some kind to teach us to make an 3D MMORPG we have been planning. We need to be taught to use programs like unity and modeling programs like 3DS Max and to implement models into the game.. We also need to be taught to a programming language such as C or C. So all in all we need to be taught to make a 3D mmorpg. The reason I think just me and my friend can make with possibly some others but is not likely is because there will be no quests dungeons and but will have a complex levelingcombat system and a complex weapon making system. Also will have low-poly graphics. So that being said spare me the criticism saying that 2 people cant make a 3D mmorpg alone and just tell me a way to learn how to make an mmorpg besides an online college I would like it to be free or sort of cheap. Thanks.

SOLVED - dx flashes backbuffer before exit - Link Sat, 05 Sep 2015 17:31:44

weve all seen it you exit a fullscreen directx windows title and the screen flashes some junk just before the desktop appears. a final present or some such thing. to avoid this i display a Closing Caveman... message on a black screen twice in a row clear render and present twice to make sure both buffers contain that screen. seemed to work ok at first but now im getting the last screenshot taken or the last 3d scene rendered. it flashes just once after confirming quit to desktop and before the desktop appears. these are the present parameters im using void Zsetparamsint wint h ZeroMemoryZparamssizeofD3DPRESENT_PARAMETERS Zparams.AutoDepthStencilFormat D3DFMT_D24X8 Zparams.BackBufferCount1 Zparams.BackBufferFormat D3DFMT_A8R8G8B8 set the back buffer format to 32-bit turn these on for fullscreen Zparams.BackBufferWidth unsignedw width set the width of the buffer Zparams.BackBufferHeight unsignedh height set the height of the buffer Zparams.EnableAutoDepthStencil TRUE automatically run the z-buffer for us Zparams.Flags0 Zparams.FullScreen_RefreshRateInHzD3DPRESENT_INTERVAL_DEFAULT Zparams.hDeviceWindowZprogram_window_handle Zparams.MultiSampleQuality0 Zparams.MultiSampleTypeD3DMULTISAMPLE_NONE Zparams.PresentationIntervalD3DPRESENT_INTERVAL_DEFAULT Zparams.SwapEffect D3DSWAPEFFECT_COPY D3DSWAPEFFECT_DISCARD Zparams.Windowed FALSE TRUE for windowed FALSE for fullscreen

Tile-based room spawning Unity3d - Link Sat, 05 Sep 2015 17:09:23

The title mostly says it. Hello Im attempting to make a tile-based room spawner for my mini game. The idea is to spawn the room in tiles so right now I have a simple room spawner that actually spawns a room by randomly choosing a number for the length and the width of the room and also height but ill save that for later. Currently it is spawning it like it should but my goal is to have randomly generating rooms with either columns and stuff Maybe ill show a picture as a picture says a thousand words. httpswww.dropbox.coms1szm5a1btbgm695awfulPic.jpgdl0 That picture explains my ideal goal now how can I do dis Heres my current code. pragma strict var floorBoundary GameObject var wallBoundary GameObject var tileOffest float 0.0f var wallOffest float 0.0f var maxRoomSize int 10 function Start var width GameObject new GameObjectWidth width.tag width Random.seed Random.value 500 var roomWSizer int Random.Range1 maxRoomSize var roomLSizer int Random.Range0 maxRoomSize forvar i int 0 i lt roomWSizer i width var posW Vector3tileOffest i 0.0f 0.0f var floorBoundW GameObject InstantiatefloorBoundary posW transform.rotation var RoofBoundW GameObject InstantiatefloorBoundary Vector3posW.x 9.4f posW.z transform.rotation floorBoundW.transform.SetParentwidth.transform RoofBoundW.transform.SetParentwidth.transform RoofBoundW.transform.localScale.y -1 forvar j int 0 j lt roomLSizer j length var posL Vector30.0f 0.0f tileOffest j tileOffest var roomL GameObject Instantiatewidth posL transform.rotation var roomWidth int roomWSizer roomWSizer var roomLength int roomLSizer 1 2 var wFindG GameObject GameObject.FindGameObjectWithTagwidth var wFindA GameObject wFindG.transform. forvar w1 int 0 w1 lt roomWidth w1 wall width 1 var wall1pos Vector3tileOffest2 w1 - 6 wallOffest -tileOffest2 var wall1rot Quaternion.Euler9000 var wall1bound GameObject InstantiatewallBoundary wall1pos wall1rot wall1bound.transform.SetParentwidth.transform forvar l1 int 0 l1 lt roomLength l1 wall width 1 var wall3pos Vector3 -tileOffest2 wallOffest tileOffest2 l1 - 6 var wall3rot Quaternion.Euler90900 var wall3bound GameObject InstantiatewallBoundary wall3pos wall3rot wall3bound.transform.SetParentwidth.transform forvar l2 int 0 l2 lt roomLength l2 wall width 1 var wall4pos Vector3 tileOffest2 roomLength2 wallOffest tileOffest2 l2 - 6 var wall4rot Quaternion.Euler90-900 var wall4bound GameObject InstantiatewallBoundary wall4pos wall4rot wall4bound.transform.SetParentwidth.transform

Perlin noise to cloud alike look texture - Link Sat, 05 Sep 2015 15:50:07

So im trying to implement variation of perlin noise to get i am relating to this code httpsen.wikipedia.orgwikiPerlin_noise it doesnt actualy provide me with good result from the thing i understand i just need to divide coords by some value to get different results etc. so firs i used xy pow2.0 xy and i got then i saw that guy does xy 2 x 4 x 8 etc that gives me poor result so how do i do that to get something like that first picture ifndef perlin2dH define perlin2dH include DxcMath.h include math.h include logme.h include txtfilestringlist.h struct TPerlin2d vec2 Normalize2dvec2 v float magni vec2 result magni magnitudevec3v if magni lt 0.0 magni 1.0 result.x v.xmagni result.y v.ymagni return result Function to linearly interpolate between a0 and a1 Weight w should be in the range 910.0 1.0 float Perlin2d_lerpfloat a0 float a1 float w return 1.0 - wa0 wa1 float Perlin2d_RandomFloat return floatrand 100 100.0 vec2 Gradient int gradient_width int gradient_height void InitializePerlin2dint width int height gradient_width width gradient_height height Gradient new vec291width height for int i0 i lt widthheight i Gradient91i Normalize2d vec2Perlin2d_RandomFloat 2.0 - 1.0 Perlin2d_RandomFloat 2.0 - 1.0 TPerlin2d Gradient NULL InitializePerlin2d44 TPerlin2d if Gradient NULL delete 91 Gradient float bilinearInterpolationfloat x float y float table int ix intx int iy inty int ix1 ix int ix2 ix1 int iy1 iy int iy2 iy1 int cix2 ix2 int ciy2 iy2 ifcix2 gt gradient_width-1 cix2 0 ifciy2 gt gradient_height-1 ciy2 0 float FQ11 table91iy1 gradient_width ix1 float FQ21 table91iy1 gradient_width cix2 float FQ12 table91ciy2 gradient_width ix1 float FQ22 table91ciy2 gradient_width cix2 float x1 floatix1 float y1 floatiy1 float x2 floatix2 float y2 floatiy2 float fxy1 x2 - x x2 - x1 FQ11 x - x1 x2 - x1 FQ21 float fxy2 x2 - x x2 - x1 FQ12 x - x1 x2 - x1 FQ22 return y2 - y y2 - y1 fxy1 y - y1 y2 - y1 fxy2 float returnDotint x int y int ix gradient_width-1 - x int iy gradient_height-1 - y if ix lt 0 ix gradient_width - 1 if iy lt 0 iy gradient_height - 1 if ix gt gradient_width ix 0 if iy gt gradient_height iy 0 float dt Dotvec3 Gradient91iygradient_width ix vec3 Gradient91ygradient_width x float a LerpGradient91iygradient_width ix.x Gradient91ygradient_width x.x dt float b LerpGradient91iygradient_width ix.y Gradient91ygradient_width x.y dt return ab 2.0 Computes the dot product of the distance and gradient vectors. float Perlin2d_dotGridGradientint ix int iy float x float y Compute the distance vector float dx x - doubleix float dy y - doubleiy Compute the dot-product return dxGradient91iygradient_width ix.x dyGradient91iygradient_width ix.y Compute Perlin noise at coordinates x y float GetPerlinNoiseAtfloat x float y Determine grid cell coordinates int x0 x gt 0.0 intx intx - 1 int x1 x0 1 int y0 y gt 0.0 inty inty - 1 int y1 y0 1 Determine interpolation weights Could also use higher order polynomials-curve here float sx x - doublex0 float sy y - doubley0 Interpolate between grid point gradients float n0 n1 ix0 ix1 value n0 Perlin2d_dotGridGradientx0 y0 x y n1 Perlin2d_dotGridGradientx1 y0 x y ix0 Perlin2d_lerpn0 n1 sx n0 Perlin2d_dotGridGradientx0 y1 x y n1 Perlin2d_dotGridGradientx1 y1 x y ix1 Perlin2d_lerpn0 n1 sx value Perlin2d_lerpix0 ix1 sy return value0.50.5 endif usage TPerlin2d perlin perlin.InitializePerlin2d256 256 unsigned char pdata912562563 AnsiString tname appdirNOISE.TGA for int y0 y lt 256 y for int x0 x lt 256 x float a 0.0 int cnt 0 for int i1 i lt 20 ii2 a a perlin.GetPerlinNoiseAtfloatx floatipowf2.0 floati floaty floati powf2.0 floati cnt cnt 1 a a floatcnt255.0 pdata91y2563 x3 0 Bytea pdata91y2563 x3 1 Bytea pdata91y2563 x3 2 Bytea WriteTgatname.c_str25625624pdata

Ant Archive Tools - Link Sat, 05 Sep 2015 15:13:55

Hello I was making a game engine some time ago and because I didnt have much time I scrapped it and started to rewrite it however I wanted to share with you a library that I wrote for the engine. The engine was called Ant engine hence the name. This library allows you to collect all your game files in a single encoded archive. Here are some pros and consProsNo need to load the whole archive to view info about archivefiles.Can store info. that can be used by the user.Big file size limit if size_t type has a max value of 18446744073709551615 then the file max size is 18446744100 GB.ConsNo compression it may count as a pro because it improves performanceThe usage is simpleCreate an archive object specifying the path and the open modejust like in a fstreamAdd files specifying the paths.Use the write function to write the data to the archive.To extract just open the archive in IN mode and use the extract function.Support walletWMZ Z203276490655If you will like this library I may update itThe library wasnt tested much If you notice a bug then post it here and Ill do my best to fix itThis library uses Boost so you need to download itHow to buildExtract the archive.Enter the directory where you extracted it.Open the terminal there.Run cmake . With the dot.Run make.The library will be in the build direcoryThis wont work with windows because the visual studio compiler is quite outdated so on windows youll need to use MinGW with Cygwin Attached Files 8.8KB 19 downloads

How do i lock pointer to window or set pointer position - Link Sat, 05 Sep 2015 15:07:37

I have a UWP application in C Im using an independent input source for the SwapChainPanel not sure if thats relevant or not. But I cant work out how to either lock the mouse to the window or force the mouse position. This is for a first person mouse controller so i really need to stop the mouse from leaving the window because I lose mouse control. It may even be the case that i need to lock the mouse to the swap chain panel. I thought CoreIndependentInputSource.SetPointerCapture would do the trick but no. And i dont see any way to set the mouse position manually. Does anyone have experience with this

KwlKit - Link Sat, 05 Sep 2015 14:44:39

Hi guys just wanted to announce the my experimental lossy audio codec open source decoder httpgithub.comkmarKwlKit Encoder binaries can be found in in releases.

Single pixel holes in GBuffer - Link Sat, 05 Sep 2015 12:10:54

I recently added a sky to my application and while testing I simply wrote red pixels wherever the sky shader was invoked. When doing this I noticed that a few pixels inside solid geometry turned red and they vary depending on camera angle. The way I render the sky is that I render a fullscreen triangle at the far plane and use the depth buffer for early z-rejection only shading fragments where the far plane is visible i.e. no geometry has been rendered. This led me to believe that the depth buffer still contained its clear value at those texels. It turns out that the GBuffer have holes where a fragment has not been generated and these holes seem to appear where two triangle edges meet. This is the final image. Its quite dark but youre looking at a wall with two windows and a slanting roof above it see the image below for a clearer view as to where the roof begins. To the right is a pillar. Notice the few pixels in a row where the wall meets the roof between the two windows you might have to view the full images to see it clearly. Here are the normals of the GBuffer. Notice that the same erroneous texels are grey which is the clear value I clear to 0.5 because in 01 that corresponds to the zero vector in -11. I understand that a fragment is generated by the rasterizer if the center of the pixel is contained in the triangle and for this reason it seems that the center is inside neither of the triangles. Could this happen if due to precision problems the triangle edges are very close to the center of the pixel but not quite overlapping it Note that this is a very rare case with several pixels in a row usually its a few single pixels scattered all over the image at places where triangle edges meet. Has anyone else stumbled upon similar issues How could these holes be fixed If I have a dark indoor environment and a bright sky its a very annoying artifact when a few bright pixels appear and disappear at random locations when moving the camera.

C Frequency Modulation Synthesis Algorithms - Link Sat, 05 Sep 2015 11:24:48

Gday matesTo preface if you are unfamiliar with frequency modulation synthesis have a quick skim of this Wikipedia article httpsen.wikipedia.orgwikiFrequency_modulation_synthesisI have made this thread because I am trying to solve a difficult programming problem. Forgive me for not hastily getting to the pointmy question there is quite a lot of assumed knowledge of both C and audio synthesis in general that will be required to help me with my problem so I have written a detailed post covering the basics of frequency modulation before delving into the autistic guts of my problem. Even if you are unable to provide me with any assistance I hope you enjoy reading the thread because it was fun to write.Finally and before I begin if anyone is interested in audio synthesis and video game console sound chips in general have a look at this fun post I made some time ago on the TIGSource forums httpforums.tigsource.comindex.phptopic28653.msg795584msg795584Anyway I am working on a real-time audio synthesis library in C styled upon sound chips of the 16-bit video game console era Sega GenesisMega Drive Neo Geo etc.. I have a preference for the audio synthesis philosophy and methodology of Yamaha who are a major producer of sound chips and electronic keyboards most of which make use of frequency modulation synthesis.The primary key to understanding frequency modulation synthesis is the difference between carrier operators and modulation operators. An FM operator is in its simplest form an oscillator which in most cases generate a sine wave although my synthesizer defines 19 different types of wave forms which is more or less irrelevant in the present context and implements the ability to receive prerecorded wave data as well. An FM operator can be either a modulator carrier or both. A modulator is fed into other operators and adjusts their frequency regardless of whether or not the latter is a carrier or another modulator. Carrier operators are not fed into other operators but output the resulting wave data. Multiple carriers may be blended together to create the final output usually by simply averaging them together.This diagram conveys thedifference between carrier operators and modulation operatorsFM synthesizers require at least 2 operators one of which must be a carrier. A single operator which is inevitably a carrier cannot realistically be considered as frequency modulated synthesis because it is not modulated by anything unless it is being modulated by prerecorded wave data instead of another operator although that is besides the point.The secondary key to understanding frequency modulation synthesis the concept of algorithms. An FM algorithm defines the way that multiple operators carriers and modulators interact with one another. The number of operators that a particular FM synthesizer makes use of which has in the past been constantly defined depending on the design of the synthesizer or limitations of the hardware sets an upper limit to the number of possible algorithms. Similarly and historically the number of algorithms and their respective configurations have been constantly defined.The audio synthesis library I am developing differs from previous generations of FM synthesizers in that the number of operators number of algorithms and algorithm configurations are not constantly defined or restricted by hardware limitations i.e. they are defined by the user.The majority of video game console FM sound chips make use of 4 operators. Notably the Yamaha YM2612 sound chip famously incorporated into the Sega GenesisMega Drive defines 8 algorithms for its 4 operators which are displayed hereAlthough the YM2612 defines only 8 algorithms many more are possible. There is an upper limit to the number of possible algorithms based on 4 operators but I have not determined what it is and that is part of the problem I am trying to solve.More advanced FM synthesizers such as electronic keyboards and virtual instruments often make use of more than 4 operators. The number of possible algorithms to an FM synthesizer increases exponentially with each additional operator. Typically the designers of these FM synthesizers define a constant number of possible algorithms and fixed algorithm configurations based on a trial and error test case methodology to determine which algorithms output the most interesting and useful audio. That being said the upper limit of possible algorithm configurations in the case of higher numbers of operators can defy imagination.To convey exactly how mind-boggling the possibilities are here is a small subset of predefined algorithms to an electronic keyboard utilizing 6 operatorsNow that I have established the fundamentals of frequency modulation synthesis we can move on to the specifics of my code.I have yet to determine a method of mapping the possible algorithms based on the user defined number of operators in my synthesizer. I have already attempted to manually define all possible algorithms in the range of 1-5 operators yet being a mere human being makes me prone to error. There are far too many variables to take into consideration and with every additional operator I attempt to solve another dimension is opened that I am not able to comprehend.In the meantime I have declared a function pointer towards a function that calculates the output of a single frame iteration as sof32 voiceiterate_funcf32s32f32

Does anyone know which OpenGL state did I screw up - Link Sat, 05 Sep 2015 07:21:43

Hello Here comes a picture of the rendered output Attached Thumbnails

High Quality Light Trails - Link Sat, 05 Sep 2015 03:05:30

I was wondering if anyone knows how I can get fluid trails like in Infamous First Light. Ive found some references online on light trailshttpwww.gamedev.nettopic603950-light-trails but can simply spawning a few particles each frame create a good fluid particle effect like in Infamous Does anyone know any other methods to get High Quality fluid light trails

SFML C vector subscript out of range - Link Sat, 05 Sep 2015 02:26:57

Enemy projectile collide collideCounter 0 for iter2 projArray.begin iter2 projArray.end iter2 collideCounter2 0 for iter3 projArray.begin iter3 projArray.end iter3 if projArray91collideCounter.rect.getGlobalBounds.intersectsenemy.enemyArray91collideCounter2.enemySprite.getGlobalBounds stdcout ltlt COLLIDE ltlt stdendl collideCounter2 collideCounter Seems to be the 2nd for loop giving me the subscript out of range. I have no idea where to start looking it could be the amount of bullets that are being spawned because if I click my mouse fast it will only spawn a few bullets instead of like 8-10 so maybe its conflicting with the collision but Im not sure only this part of the code is giving me the error.

Random Math Questions - Link Sat, 05 Sep 2015 02:07:02

Hello Ive been reading some information on cos sin and tan. Im just wondering what the practical uses are. Theyre not clear on many of the sites Im reading yet. Just saying that its hypotenuseopposite or what have you. Im trying to see what the practical use of these are. The number given for an answer is usually a small random decimal that doesnt seem to be attached to the triangle anywhere. Im also wondering about location picking. How do I learn point picking and moving in odd directions. Say I want a sprite to move from point a to b but do it in a half circle. Where can I learn to graphcalculate these. I guess two things are keeping me from good game designing beyond event based stuff. Math knowledge and practical use. Im not even sure where to start when it come to picking points getting there in certain ways. Id be useless in designing anything but a simple platformer rpg or a eventmenu game... I dont mind that too much but really who doesnt want to get better at what they dont know The funny thing is Ive been here off and on for like 10 years lol. Sad to say most my programming efforts have crashed and burned but now Ive learned to accept Im not that great at it... except Ive got a nice web project coming along and a game in construct love this engine great for people like me who suffer the lesser intelligence of the ogs around here lol

Non-linear zoom for 2D - Link Fri, 04 Sep 2015 22:42:30

Hello quick question Im using zoom to show sprites in a big state 16.0f 1600 or even higher and then reduce the zoom down to 1.0f over time to get an effect of the sprite shrinking. However the problem with this is that for the first zoom that are being taking away the sprite appears to shrink very slowly while for the last few frames the zoom appears to speed up. This can easily be explained as in the range of 1.0f to say 2.0f the size nearly doubles while for like 100.0f to 101.0f its a mere 1 more size while it takes my linear zoom function the same time for both values. const float zoomX xLeft timeLeft dt const float zoomY yLeft timeLeft dt pZoom-gtx zoomX pZoom-gty zoomY xLeft - zoomX yLeft - zoomY timeLeft - dt So what Im looking for a formula that takes into account the actual amount of reduction in size so that 1.0f to 2.0f takes just as long as 2.0f to 4.0f as both result in the same relative reduction of size. It doesnt need to utilize the values about I actually have given before starting calculations - currenttarget zoom - duration of the zoom process If there is no good formula for this I already searched and tried to make somthing up my self but math Id be also glad with something that at least simulates a constant zoom speed I dont know if you guys can just imagine what it looks like currently if you need some visual hint let me know or some hint into how it could be done Any ideas

Per-pixel lighting asm point of view - Link Fri, 04 Sep 2015 21:16:47

Hi there I want to understand better how vertex and fragment programs talk to each other from asm shaders point of view on per-pixel lighting example. Suppose I want to draw a triangle with per-pixel lighting. In my vertex program I modify the verticies oHPOSmvpvOPOS and normals worldNormalmvvNRML worldPositionmvvOPOS Where worldPosition and worldNormal are not some vertex program output data. We need to store them and then give to the fragment program. After linear interpolation worldPosition will become actual fragment coordinate in 3d world. Then one needs to perform lighting calculations usually done with verticies. Several questions How worldPosition and worldNormal can move from vertex to fragment program Through unused texture coordinates primary and secondary vertex color Thanks in advance

How will a dedicated server help this game - Link Fri, 04 Sep 2015 16:48:34

Basically Rumble Fighter is 8 Player PVP fighting game. The network code for this game was created using a P2P infrastructure so everyone in a match is sendingreceiving packets to each other. But like every P2P game there is a lot of lag. So my question is how would a client based server or dedicated server help improve this game For a better understanding how the game looksworks heres a video.

Scaling UV Coords and clipping rectangle rounding error - Link Fri, 04 Sep 2015 13:46:56

Im currently working in OpenGL ES 2.0 and I came across a weird issue with my clipping rectangle. I have this texture atlas 159 x 48 And a clipping rectangle that is sized to get only the green square The clipping rectangle position sized is at X 32.0f Y 0.0f Width 7.0f Height 12.0f Now when I try to scale this up by 2 and offset the drawing location by the clipping rectangles center. In my current case Im drawing at 00 and offsetting by the clip rectangle center 3.5f 6.0f scaled by 2. Depending on the draw position or in my case -7.0f -12.0f 00 offset by the clip rectangles center my image sometimes has a weird artifact where extra pixels are included in the image that is rendered I guess the clip rectangle gets a little too big. Why is this happening Is this do to floating point errors Is it because I have a weird texture size 159 x 48 with a width that does not divide by 2 evenly This only happens when scaling up by certain values. For example scaling by 1 3 4 or 5 are totally fine. But when I scale by 2 or 14 the issue can be seen My data is placed into my VBO like this Position calculations topLeftX x topLeftY y botLeftX x botLeftY y clipRect.getHeight scale botRightX x clipRect.getWidth scale botRightY y clipRect.getHeight scale topRightX x clipRect.getWidth scale topRightY y Calc the UV Coords uvTopLeftX clipRect.getX texture.getWidth uvTopLeftY clipRect.getY texture.getHeight uvBotLeftX clipRect.getX texture.getWidth uvBotLeftY clipRect.getY clipRect.getHeight texture.getHeight uvBotRightX clipRect.getX clipRect.getWidth texture.getWidth uvBotRightY clipRect.getY clipRect.getHeight texture.getHeight uvTopRightX clipRect.getX clipRect.getWidth texture.getWidth uvTopRightY clipRect.getY texture.getHeight Code to place above calculations into the VBO buffer

Shader PS_3_0 Fails to Run returns black frame - Link Fri, 04 Sep 2015 04:26:01

I finally got a HLSL shader to run with DX9. This code is clean and works. At least with a PS_2_0 shader. httpsgithub.commysteryx93AviSynthShaderblobmasterVideoPresenterD3D9RenderImpl.cpp If I instead compile the shader with PS_3_0 however what I get is a black frame. I mentioned this before but back then the code wasnt working properly. Now the code works. What could be the issue here

How to go about a lobby based game. - Link Fri, 04 Sep 2015 02:30:43

Im making a multiplayer lobby based fighter game. I want there to be accounts and weapons bound to accounts. how should I go about this Skills I can use Unity. I know Ruby Javascript Python C and Java

Examples of win32 Gui code - Link Fri, 04 Sep 2015 01:53:53

Hi All Not sure if this is the right place for this. Apart from the Programming Windows book by Pretzold. Does anyone know of any sites or resources where I can find simple win32 programs and also their source code I am talking super simple like a window and maybe a File - Open tab. Maybe something that shows an example of opening a text file and displaying some text in a panel... Just things like that. Even full working programs that are simple enough to get your head around the code would be fine like stuff on github but i really have no idea where to look. Thanks

GameState is a bad method nowadays - Link Fri, 04 Sep 2015 01:48:14

Hi Im still using game state to have different state like menu and in-game for example. The modern way is to use only scene and code actor to do something for this actual scene. Is it a bad method nowadays to use game state Thanks

Tile picking with moving camera - Link Fri, 04 Sep 2015 00:38:51

Ive been working on a isometric tilemap engine. Everything has been working fine up until recently when I tried implementing a moving camera. The tile picking has been off if the camera is moved. Ive tried offsetting by the cameras displacement and its still not giving the desired results. If I only move the camera along the x-axis the tile picking works as intended if any y-axis movement is involved it doesnt behave correctly. Im not sure whats going on here. Any help would be appreciated. This method is called when a place on the game world is clicked. There is no correction for the camera in this method at the moment I took it out due to it not working correctly. Its simply the base method that worked before the moving camera was implemented. The first two lines of code give me the cameras displacement along a given axis. cam.viewportWidth2 is the default camera x coordinate. This is also applied to the Y-Axis. If you need any more information let me know and I can supply it. public void getTileAtOrthographicCamera cam Vector2 mouse camOffsetX cam.viewportWidth2-cam.position.x camOffsetY -cam.viewportHeight2-cam.position.y System.out.printlncamOffsetX camOffsetY mouse.x - X_OFFSET mouse.y Math.absmouse.y - Vector2 mp isoToCartmouse Vector2 coords new Vector2floatMath.floormp.x floatMath.floormp.y try Tile t new Tilecuberedcube.png layers.get0.setTileAtt intcoords.x intcoords.y System.out.printlncoords catchArrayIndexOutOfBoundsException e System.out.printlnCoords out of bounds

QR Decomposition using House Holder - Link Thu, 03 Sep 2015 23:55:15

Hi Im actually using a QR decomposition using Gram Schmidt but I always read House Holder is more stable numerically. Is it true using House Holder the result is more stable numerically House Holder method works good for affine transformation Thanks

How can I implement warmstart - Link Thu, 03 Sep 2015 23:40:19

Hi everybody I am making my own impulse based physics engine I noticed that when a body is standing on top of another body 2 boxes it slides to the left with no reason reading in this forum I read in a post with a similar problem that warmstart helped to mitigate this issue but I cant find a tutorial on warmstart or how to implement it. Can you help me with this

Bullet BoxShape landing...oddly - Link Thu, 03 Sep 2015 23:34:50

Hey all I started working with Bullet today and for my first little test to try and get my feet wet I decided to make some cubes and drop them and see what happens. I read through the Hello World project on the Bullet Wiki and I believe Ive implemented most of the code correctly but the cubes often land on edges after bouncing and dont seem to be under the full effects of gravity once they land. Heres what the end result looks like Spoiler The cube on the right has landed correctly but all other cubes have landed on edges and refuse to fall flat so to speak. Heres my very simple code Spoiler Create a broadphase to use broadphase new btDbvtBroadphase Create a collision configuration to be used by the collision dispatcher collisionConfiguration new btDefaultCollisionConfiguration dispatcher new btCollisionDispatchercollisionConfiguration Set the collision algorithm to use btGImpactCollisionAlgorithmregisterAlgorithmdispatcher Create a solver solver new btSequentialImpulseConstraintSolver Initialize the dynamics world dynamicsWorld new btDiscreteDynamicsWorlddispatcher broadphase solver collisionConfiguration Set gravity dynamicsWorld-gtsetGravitybtVector30 -9.8 0 Set the plane collision shape planeShape new btStaticPlaneShapebtVector30 1 0 1 Set the crate collision shape crateShape new btBoxShapebtVector30.375 0.375 0.375 ---------------------------------------------------------------------------------------------------- Create the rigid body associated with the mesh btDefaultMotionState planeMotionState new btDefaultMotionStatebtTransformbtQuaternion0 0 0 1 btVector30 -1 0 btRigidBodybtRigidBodyConstructionInfo planeRigidBodyCI0 planeMotionState physicsManager-gtgetPlaneShape btVector30 0 0 planeRigidBody new btRigidBodyplaneRigidBodyCI Add the plane rigid body to the dynamics world physicsManager-gtgetDynamicsWorld-gtaddRigidBodyplaneRigidBody ---------------------------------------------------------------------------------------------------- btDefaultMotionState crateMotionState new btDefaultMotionStatebtTransformbtQuaternion0 0 0 1 btVector3x 50 z btScalar mass 1.0f btVector3 crateInertia0 0 0 physicsManager-gtgetCrateShape-gtcalculateLocalInertiamass crateInertia btRigidBodybtRigidBodyConstructionInfo crateRigidBodyCImass crateMotionState physicsManager-gtgetCrateShape crateInertia crateRigidBodyCI.m_restitution 0.75f crateRigidBodyCI.m_friction 1.0f btRigidBody crateRigidBody new btRigidBodycrateRigidBodyCI physicsManager-gtgetDynamicsWorld-gtaddRigidBodycrateRigidBody After each simulation step I update the objects translation and rotation according to the bTransforms origin and rotation which returns a bQuaternion. I do have one idea as to what may be the problem. When I translate my object in 3D space I set the rotational matrix using Euler angles instead of quaternions. Would there be any sort of issue grabbing the quaternion rotations and plugging them into Euler rotations I feel like there would be but Im new to this If anyone has any ideas as to what I might be doing wrong the advice is much appreciated Thanks UPDATE My lack of knowledge regarding quaternions was my downfall After changing my 3D rotational transform function to using quaternions I cast the bQuaternion as a glmquat and I now have cubes that land flat. This change to quaternions seems to have affected my lighting system somehow and I will need to investigate but all is well with the Bullet issue I was having

How to implement DLC - Link Thu, 03 Sep 2015 22:02:43

I want to know how I would go about implementing downloadable content DLC in a game I will be working on. Anybody have any idea how to do this

Passing Textures to HLSL Shader finally get it working - Link Thu, 03 Sep 2015 20:39:26

I almost got the DX9 version of the code to run a HLSL shader working. I reverted back to a version that was actually running the shader to figure out what had broken since cleaning up the code. This code DOES run the shader when running against the backbuffer. When I uncomment the line SetRenderTarget it stops working and now it makes sense why the RenderTarget is then both the source and the destination of the shader httpsgithub.commysteryx93AviSynthShaderblobmasterVideoPresenterD3D9RenderImpl.cpp Something is smelly in the order of the textures can you guys help me figure out how to straighten out the situation In function Present I copy the memory texture into the graphic card memory. HRm_pDevice-gtStretchRectm_InputTextures0.Memory NULL m_pRenderTargetSurface NULL D3DTEXF_POINT Then in CreateSchene I set that texture as the input of the shader. HRm_pDevice-gtSetTexture0 m_pRenderTarget If I copy from m_InputTextures0.Memory to m_InputTextures0.Surface for both of these calls it isnt working. But if I instead copy it to the rendertarget which is a texture created as a rendertarget but that hasnt been defined with SetRenderTarget and send that as the input of the shader then it somehow works. It doesnt feel right and might explain why it fails when that texture is the actual RenderTarget. What do I have to do to pass another texture as the shader input If I call StretchRect towards m_InputTextures0.Surface then it fails because that texture isnt a rendertarget. Does each shader input texture need to be created with the rendertarget flag What about the vectors in which textures do they need to be defined I believe if we can clarify this smelly mess it should then be working. Thanks Edit After investigating some more StretchRect is the only place that points to the RenderTarget so perhaps that has to be that way. For those who know the theory of this heres a very simple question if you have a shader that takes 3 input textures and outputs 1 texture SetTexture would have to be called 3 times. Do I need 1 or 3 StretchRect calls If only 1 which one of the 3 textures should it copy Perhaps it should be called for each input texture to copy them onto the graphic card memory but then where would be the call to draw onto the RenderTarget Edit2 Never mind got it figured out The RenderTarget gets filled automatically as the result of the scene so I dont need to reference it. StretchRect on each input texture and it works. Now it works with SetRenderTarget and Ill be able to use other pixel formats I should be good to go from there thanks for all your help

Gaming News Headlines - Yahoo News - Link Mon, 07 Sep 2015 13:36:20

ltpgtlta srchttpl.yimg.combtapires1.2hvZWXLpouhd_icGE8SppBQ--YXBwaWQ9eW5ld3NfbGVnbztmaT1maWxsO2g9ODY7cT03NTt3PTEzMA--httpmedia.zenfs.comen-UShomerunpolygon.vox.comde177a81e4a56a0c5ac9d2924992fec4 30 height86 altReport Metal Gear Solid 5 on PlayStation 4 crushes Xbox One sales in the UK alignleft titleReport Metal Gear Solid 5 on PlayStation 4 crushes Xbox One sales in the UK border0 gtltagtGfK Chart-Track a market research company that tracks sales of many forms of media in the U.K. and Ireland has announced that Metal Gear Solid 5 The Phantom Pain has the third-best first-week sales of any game in 2015 behind only Batman Arkham Knight and The Witcher 3 Wild Hunt. ampquotPS4 takes a commanding 72 share over Xbox One which has 22 while PS3 edges to a 3 share over Xbox 360 with just 2ampquot the companyamp039s blog post stated. Itamp039s important to remember that third-party companies such as GfK Chart-Track are extrapolating overall sales using imperfect information so we donamp039t know how PlayStation Network or Xbox Live sales would factor into the overall numbers.ltpgtltbr clearallgt

Report Metal Gear Solid 5 on PlayStation 4 crushes Xbox One sales in - Link Mon, 07 Sep 2015 12:49:00

ltpgtlta 30 height86 altGaming Deals 40 Witcher 3 42 Super Smash Bros. Wii U 42 Mario Kart 8 alignleft titleGaming Deals 40 Witcher 3 42 Super Smash Bros. Wii U 42 Mario Kart 8 border0 gtltagtBig PC summer sale continues Xbox One 100 gift card free Madden 16 with PS4 33 Super Smash Bros. 3DS and much more.ltpgtltbr clearallgt

Gaming Deals 40 Witcher 3 42 Super Smash Bros. Wii U 42 Mario Kart 8 - Link Mon, 07 Sep 2015 10:57:45

ltpgtlta srchttpl3.yimg.combtapires1.28JPL9Zj_yMC_aOf3chiiTQ--YXBwaWQ9eW5ld3NfbGVnbztmaT1maWxsO2g9ODY7cT03NTt3PTEzMA--httpmedia.zenfs.comen-UShomerunpolygon.vox.com90bf61dfbec4c140c28f711339bab0b4 30 height86 altNintendoamp039s Shigeru Miyamoto explaining World 1-1 is the best game design lesson of the week alignleft titleNintendoamp039s Shigeru Miyamoto explaining World 1-1 is the best game design lesson of the week border0 gtltagtThe level design of Mario games often seems simple while gradually and invisibly teaching the player what they should be doing and how they should be doing it. Nintendoamp039s Shigeru Miyamoto himself walks you through World 1-1 in this video and you get to see that design philosophy in action. This is possibly one of the most famous levels in the history of video games and hearing Miyamoto explain the thought process behind the placement of damned near every pixel is a great way to learn a bit about what great level design can achieve.ltpgtltbr clearallgt

Nintendos Shigeru Miyamoto explaining World 1-1 is the best game - Link Mon, 07 Sep 2015 06:09:00

ltpgtlta 30 height86 altXbox Oneamp039s Problems Were ampquotPredictable and Preventableampquot says Former Exec alignleft titleXbox Oneamp039s Problems Were ampquotPredictable and Preventableampquot says Former Exec border0 gtltagtRobbie Bach also praises Microsoft for getting console back on track and Xbox Liveamp039s momentum.ltpgtltbr clearallgt

Xbox Ones Problems Were Predictable and Preventable says Former Exec - Link Sun, 06 Sep 2015 22:27:00

ltpgtlta 30 height86 altAU New Releases Rugby League Live 3 Launches for Xbox One PS4 alignleft titleAU New Releases Rugby League Live 3 Launches for Xbox One PS4 border0 gtltagtPlayStation 3 and Xbox 360 versions delayed to later this month.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