# DevBlazer

Member

10

118 Neutral

• Rank
Member

• Interests
Design
Production
Programming

## Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

1. ## Need help with gas and liquid, physics for a game

cool tx, I pm'ed
2. ## Some questions about fluid mechanics

Hi all, I am currently playing around with making a 2D underwater survival game (pet project, not too serious) but I need someone I can sit with for like an hour or so, to help me flesh out some reasonable mechanics for the behavior of liquids and gases in relation to gravity, pressure, etc. (Sorry guys I totally failed science class and have no intention of studying it now). There obviously has to be a balance between what I'm willing to code for and realism and then assistance with understanding some mechanics and how their formulas, etc would work. Some additional info, I am making the game in javascript (web browser) and dont plan on using any physics related engines or libraries. Also my first interests (as a starting point) for development lie in managing water vs oxygen vs immobile material in terms of gravity, weight, flow and pressure, both individually and against each other. The game will naturally use a basic 2D block/grid system similar to what you would see in a game like oxygen not included. If a voice chat not going to be so practical, then here are some of my starting questions: Water has weight and is therefore pulled down by gravity, I know this. I have also heard that water does not compress well, so I probably don't have to worry about deeper water having a higher density due to large amounts of water weight above it. So assuming some constant or formula for gravity and water weight, if you have one tile filled with water, and nothing underneath it, it all falls straight down (not caring much about atmospheric interference). But if you have solid mass underneath, then the water should probably fill tiles to the sides instead. Im guessing a good way of doing this will be to multiply your chosen flow rate by the difference between the fuller tile and the more empty tile or something like that in order to calculate change over time? There should probably also be something else at play here, as the liquid tile falling straight down would be very fast surely vs the 'flowing' into a neighboring tile or am I wrong? Another consideration is how do you handle the concept whereby I believe the water would flow downwards (gravity) first before attempting to flow to neighboring tiles (or am I just being naive here)? Also does gas or high pressure gas have any noticeable effect on any of the 'flow rates'?
3. ## Need help with gas and liquid, physics for a game

Hi all, I am currently playing around with making a 2D underwater survival game (pet project, not too serious) but I need someone I can sit with for like an hour or so, to help me flesh out some reasonable mechanics for the behavior of liquids and gases in relation to gravity, pressure, etc. (Sorry guys I totally failed science class and have no intention of studying it now). There obviously has to be a balance between what I'm willing to code for and realism and then assistance with understanding some mechanics and how their formulas, etc would work. Again, I'm not trying to recruit anyone here, just looking for someone knowledgeable to have a friendly chat with for a little while.
4. ## View Matrix required for eye tracking

Hi all, I am busy working on a small project where by I wont to use a webcam to track a users 'eye position' (vector from persons eye position relative to the center of the screen) and use this 'camera angle' to manipulate a threeJS scene (or maybe just straight webGL) such that it looks like the screen itself is a 'window' into a 3d environment. Too accomplish this I believe all that is required (assuming you already have the 'eye camera angle') is to manipulate the view matrix. For instance the image on the left would be a typical view frustum for a standard view matrix given a straight camera angle. The image on the right would be the ideal matrix and resulting view frustum if the 'eye camera position' were moved upwards. Is this as simple as swapping out the standard view matrix used? What would said matrix look like. Please bare in mind when answering, that I know as much about linear algebra as a first grader. Also for further details, this project will be browser based using webGl and javascript.

7. ## Looking for WebGL projects to join

Hi Andrew, to answer your question, I was originally using threejs for the engine, but when dealing with this level of data I obviously had to be creating models on the fly for sections of map in visible range for sake of load/bandwidth/javascript speed, and it turned out to handle dynamic content like that very poorly despite trying a few different methods.   I threw it out and now use raw webgl so that I have a much greater level of control over the rendering pipeline and most importantly memory, as the true cause of my issues turned out to be due to the browsers having a large time reallocating large array buffers. I now use mainly one large fixed array buffer for building vertex data to eliminate these issues, just keep reusing it. To manage the enormous amount of data required for maps of that kind of size, even in chrome, I use a multi tiered system. Actually what is generated is a custom compressed data format that stores the map data in 8x8x8 sized chunks As you move through the map the data for chunks in your region is decompressed and stored in full size in memory Then as you move the camera, the chunks that are in your visible range, get models built for them (vertex data) and stored for display every tick So its a three tiered system.
8. ## Looking for WebGL projects to join

Sorry for late reply, i didnt receive any email notification. That mapgen is set to 64x64x64 at the moment, but the browser can handle upto 1024x1024x1024 but that takes several weeks to generate, not very feesable.  I am busy working on serverside prerendered maps upto 512x512x512, that will then simply be downloaded and stored in localstorage of browser (starting a new map will be as simple as downloading a 200mb map file at that point. You can hit me up on skype if you want: aroux@impactradius.com
9. ## Looking for WebGL projects to join

Hi there, I run a few interesting webgl projects in my sparetime, but time is always limited so I am always looking for help, but there are not that many people in this field of things. Let me know if you interested, here is one example of my work.   You can see some of my work in this tech demo: (browser based minecraft clone with gamepad and vr support)  http://test.elemental.co.za/samples/digger_vr If you load it up on a pc you will see a minecraft ish clone (awsd, space for jump and lmb to dig). If you load it up on an android phone you will need a bluetooth gamepad and a google cardboard and then you can experience the same thing in vr.  Please note: - this is a tech demo and only supports chrome browser on windows or android (will not work on mac/iphone) - when you load it up it will remain black for a few minutes while it generates the world

11. ## Is there a website for sharing shaders

Hi all, is there a website where one can upload and share pixel/vertex shader scripts with others.  It does not necessarily have to be a website dedicated to it, at least just a site where such code is appropriate.  Some kind of community thing.
×

## Important Information

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!