|
scissorman posted:I'm planning on using block-based terrain, with each block having individual properties, so I don't have any empty/homogenous space for quadtrees to take advantage of.
|
# ? Apr 26, 2013 17:07 |
|
|
# ? May 12, 2024 07:31 |
|
Orzo posted:And your blocks are all the same size and don't move? If so, you already have an implicit structure within the blocks themselves. You can just store them as a 2D array (or array-of-arrays) when you load them, and then you can index into that array to figure out which blocks are visible based on your camera. Wouldn't it be faster to have prepared vertex buffers for each chunk and just throw those at the graphics card and let it cull those that aren't on screen?
|
# ? Apr 26, 2013 17:20 |
|
scissorman posted:Do you mean that I should assemble the vertices etc. every frame based on what's visible?
|
# ? Apr 26, 2013 17:24 |
|
scissorman posted:Do you mean that I should assemble the vertices etc. every frame based on what's visible? The actual purpose of the algorithm is for huge view distances, and variable vertex density with smooth transitions between. If you ignore the layers beyond layer 0 and don't do the blending, though, shazam - it becomes a pretty fantastic algorithm for smoothly scrolling a window across a gigantic terrain. The gist is that you pan the logical zero point of the array around as you move through the world. By doing that, it makes it simple and logical to use the space left over from unloaded off-screen terrain as a spot to dump in new terrain data and stitch it in. You just set your VB to write-only.
|
# ? Apr 26, 2013 17:48 |
|
Orzo posted:Oh, I missed the part about how you're using chunks. Yeah your approach will probably work out nicely. By 'prepared' vertex buffers, that's the same as static vertex buffers right (sorry, I only know DirectX, and that's the term they use for vertex buffers you create not-every-frame)? Yeah, I'm talking about using static buffers.
|
# ? Apr 26, 2013 17:51 |
|
Suspicious Dish posted:BGM1-004.mp3 is your favorite song too? I can't get it out of my head! Apparently he took that screen while looking at my post in the Making Games Megathread: Has anyone here written a CRT / Scanline HLSL shader? I'm fairly new to shaders and I'm not 100% sure how to go about it, so I'm looking for resources on writing one. My game runs at a fairly low resolution so I figure a neat CRT effect would be a good way to upscale it (I'd leave nearest neighbor as an option for those who prefer it, though). Also any suggestions for retro / pixel art friendly scaling filters, really. I'd like to avoid stuff like 2xSai though, I think that'd make it feel too much like a poorly emulated game. Basically I just want to find a way to make my game look good on different screens while keeping it at the current resolution internally, and a scaling shader seems like a good option. I'm working in XNA with C#, for what it's worth.
|
# ? Apr 26, 2013 17:57 |
|
https://www.shadertoy.com/view/4sf3Dr Something stupid like this? Most of the work in that shader is because I can only use one fragment shader. If you were doing this for real, you'd do this as several post-processing effects by rendering each step to an FBO if possible. The effect is also exaggerated. You'd want to tone it down for the final product.
|
# ? Apr 26, 2013 18:55 |
|
Shalinor posted:There's actually a trick you can pull, if you want to stream the terrain in one chunk at a time but keep it in a single vert buf. Google "toroidal arrays," or just read up on Geometry Clip Maps. I'm sorry but could you elaborate on that? From what I read, you basically use a number of static buffers for the local (x,y) coordinates and get your global z from the elevation map. So what do you mean by dumping new terrain in the VB? Wouldn't you have to manipulate the elevation map instead?
|
# ? Apr 26, 2013 19:10 |
|
scissorman posted:I'm sorry but could you elaborate on that? ... and if this isn't making sense, I'd probably just suggest ignoring the algorithm. It's a cool optimization / data trick for large terrains, but practically speaking, I doubt you're doing anything that would require it. There's nothing wrong with a VB per terrain chunk and just loading them up as you reach them. That's effectively the Chunk LOD method of terrain rendering, incidentally.
|
# ? Apr 26, 2013 19:49 |
|
Suspicious Dish posted:https://www.shadertoy.com/view/4sf3Dr Your link doesn't work.
|
# ? Apr 26, 2013 20:43 |
|
Gah, it's my first time using this "share a GLSL snippet" site, and I might have hosed up the permissions. Try now.
|
# ? Apr 26, 2013 20:50 |
|
DeathBySpoon posted:Apparently he took that screen while looking at my post in the Making Games Megathread:
|
# ? Apr 26, 2013 22:14 |
|
Suspicious Dish posted:Why do you need substr? indexOf gets you the next space, then you use charAt to read the character after the space, and then do whatever you want with the data in between that and the next index. Perhaps you want to use a binary file format that you parse with ArrayBuffer? I don't know. Thanks though, charAt hopefully makes it a little bit less bad, and even better still is charCodeAt (which you couldn't have known since I hadn't specified what I wanted that clearly, but charAt reminded me, so thanks!) What I'm doing is parsing a dictionary file (word dictionary not programming-concept dictionary) into an 'object' (because that's Javascript's hash) for nice quick random access - the one character is my concession to cutting down the file size; I've converted the dictionary file from an alphabetical list of words into a sequence where, eg. "BANANA BANANAS BANGLE" would get encoded as "BANANA [chop0]S [chop4]GLE", with the "chop" markers being encoded as single characters. Turns out that encoding the dictionary this way turns it from over 3MB to just over 1MB, so quite the saving, even though it gets re-inflated in RAM. And yes, I realize that having a dictionary for word verification running client-side is weird in an HTML5 game. It only gets loaded for hotseat (or versus-AI) games, so that when the game is turned into an app it can work offline. For online games the server checks words with a mysql query.
|
# ? Apr 26, 2013 22:30 |
|
That's usually handled with a trie,
|
# ? Apr 26, 2013 22:36 |
|
scissorman posted:What's the advantage of using voxels? Sorry for the slow response, did not see your post. Since I rarely see voxels used, and do not use it myself, I will shamelessly provide you with this Google thing I found. About the top-down camera, I do not believe this engine will have any problem with it. What you should check for is if you can use skyboxes/planes/domes or such, as to get a nice background for it, otherwise just fill the entire screen with <insertyoursimulationhere>. Well all this engine really uses is blocks, so "all the additional stuff" (By which I suppose you mean the textures), is just added by: code:
DancingPenguin fucked around with this message at 22:55 on Apr 26, 2013 |
# ? Apr 26, 2013 22:52 |
|
Suspicious Dish posted:That's usually handled with a trie,
|
# ? Apr 26, 2013 22:54 |
|
DancingPenguin posted:About the top-down camera, I do not believe this engine will have any problem with it. I don't know how the game is structured but, since I wouldn't use all the gameplay code, it would just add unnecessary complexity.
|
# ? Apr 26, 2013 23:28 |
|
roomforthetuna posted:What I'm doing is parsing a dictionary file (word dictionary not programming-concept dictionary) into an 'object' (because that's Javascript's hash) for nice quick random access - the one character is my concession to cutting down the file size; I've converted the dictionary file from an alphabetical list of words into a sequence where, eg. "BANANA BANANAS BANGLE" would get encoded as "BANANA [chop0]S [chop4]GLE", with the "chop" markers being encoded as single characters. Surely there's a Javascript implementation of a real compression algorithm like gzip or whatever you can use instead of this hand-rolled thing?
|
# ? Apr 27, 2013 00:07 |
|
scissorman posted:With "additional stuff" I was mostly talking about Minecraft and its non-graphics related sub-systems. Check the "About" page, all of the extra stuff seems to be assets that are not there unless you download them. I believe that the actual gameplay code has to be created manually. Might I ask what kind of simulation we are talking about?
|
# ? Apr 27, 2013 00:42 |
|
I'm thinking of developing a game with Unity, and my current laptop (a HP G60 from 2009 ) really isn't cutting it anymore. So: Is there any specific recommended laptop to develop with Unity? If not, what laptop should I go for? I don't plan on going crazy on graphical effects, and I can't really afford the more gamey ones. Are there any laptops that comes with Windows 7 anymore? If not, how's Unity compatibility with Linux? I feel kinda silly asking this, but how's Unity compatibility with PS3 controllers on Windows (the MotionInJoy driver)?
|
# ? Apr 27, 2013 04:00 |
|
I think almost every single video or screenshot I've seen of a Unity developers desktop has been on a Mac. I develop on a beefy Windows desktop but take that for what you will. Unity can compile to a linux binary but the editor doesn't run in linux.
|
# ? Apr 27, 2013 04:16 |
|
HardDisk posted:I'm thinking of developing a game with Unity, and my current laptop (a HP G60 from 2009 ) really isn't cutting it anymore. Unity3D works perfectly on Windows 8 if you're worried about that too, I've been using it for months with no issue. Apart from the start menu you can ignore all the Metro/WinRT parts and use it exactly as you would Windows 7. Plus it still has downgrade rights to Windows 7 if you really want to do that.
|
# ? Apr 27, 2013 04:20 |
|
For anyone with any interest in pathfinding algorithms: http://qiao.github.io/PathFinding.js/visual/?buffer_share=3da1d I wasn't familiar with the Jump Point Search. What are the drawbacks to it? Because it seems quite fast.
|
# ? Apr 27, 2013 04:38 |
|
Azazel posted:I wasn't familiar with the Jump Point Search. What are the drawbacks to it? Because it seems quite fast. http://harablog.wordpress.com/2011/09/07/jump-point-search/ The drawback is that it only works on a uniform-cost grid.
|
# ? Apr 27, 2013 04:48 |
|
I also own a fairly beefy desktop, but I am barely home nowadays. I'm planning using the laptop to develop on the downtime I have while I wait for classes to start. Macbooks are out of my range for now, and those new processors will probably be out of my range as well. I don't know poo poo about laptop graphics adapters, if you could point me to a more specific one, it would be great. Knowing that I should look for OpenGL support helps a lot already. Are the Intel adapters still completely terrible? Thanks!
|
# ? Apr 27, 2013 05:02 |
|
HardDisk posted:I also own a fairly beefy desktop, but I am barely home nowadays. I'm planning using the laptop to develop on the downtime I have while I wait for classes to start. Intel GPUs are decent enough now as long as you're not aiming for bottom-of-the-barrel, like in netbooks. I don't know about ultrabooks but even those probably support OpenGL 3.2 now.
|
# ? Apr 27, 2013 06:31 |
|
DancingPenguin posted:Check the "About" page, all of the extra stuff seems to be assets that are not there unless you download them. I'm writing an artificial life simulation, starting with a simple predator-prey sim and expanding it from there. There are a couple things I want to try out, like adaption to a changing environment, maybe some learning and evolution.
|
# ? Apr 27, 2013 10:08 |
|
HardDisk posted:I also own a fairly beefy desktop, but I am barely home nowadays. I'm planning using the laptop to develop on the downtime I have while I wait for classes to start. Just for reference, Unity on windows actually runs in Direct3D, not OpenGL (as it does on Mac and Linux). It's kind of a moot point anyway, as I don't think anyone's made PC graphics cards/chips that don't support both in the past 15 years. From my experience with Unity (at least in 3.5, I've never made the transition to 4) it's basic graphical requirements are fairly low. I've even seen the editor running on a netbook with intel graphics (though not particularly well). Unity still runs decently on my 2009 mac mini which has a 9400M graphics chip (a high-middling laptop chipset at the time) but I do mostly work on 2D, or graphically simple 3D games. It might be a good idea to ask for recommendations on the Unity forums, as they're generally pretty helpful, and there should be a lot of people running different hardware setups.
|
# ? Apr 27, 2013 10:49 |
|
Is doing a replacement for coroutine waiting in c# like this common? I thought it was pretty clever but maybe that's because I do things the dumb way. Recently I was coding my spell targeting and when the spell gets used I hit up my main spell coroutine which then waits on another coroutine to pass along the mouse-pointer-to-world-point vector on mouse click or cancel on the escape key. Using his method I got rid of that nonsense and it was a lot cleaner.
|
# ? Apr 27, 2013 11:02 |
|
scissorman posted:I'm writing an artificial life simulation, starting with a simple predator-prey sim and expanding it from there. That just sounds like AI and random seed generation. (To change the environment) But mainly it seems like you want to focus on AI, and that can be done with almost any engine, so just go for whichever you might like. DancingPenguin fucked around with this message at 13:29 on Apr 27, 2013 |
# ? Apr 27, 2013 12:02 |
|
seiken posted:Surely there's a Javascript implementation of a real compression algorithm like gzip or whatever you can use instead of this hand-rolled thing? SOWPODS.txt.7z -> 549k dictionary.js (my quick-squashed version including the code to expand it) -> 1099k dictionary.js.7z -> 272k Which is to say, it's nice to do both! (I tested with 7z rather than gzip because it's just what happened to be convenient.) I also turned on quick single-pass gzip compression on the server, because apparently the Javascript implementation of the inflate algorithm is horrible and slow (for a single pass on load I'm sure it'd be not too bad really, but why bother when it can be done by the browser before javascript even sees it, and as a bonus be compressing all the html and other js files too).
|
# ? Apr 27, 2013 12:33 |
|
HardDisk posted:Is there any specific recommended laptop to develop with Unity? If not, what laptop should I go for? I don't plan on going crazy on graphical effects, and I can't really afford the more gamey ones. But it looks like they don't go as low as this any more. I got a 13 inch one for $800, but now the Alienware site starts at $1500 and at the Dell site starts at $1000 and 14 inch (the M14X). That's still not a bad price for a laptop with a gaming graphics card in it, but a shame they don't do the small one any more. (And the screen resolution is still the same as on the small one.)
|
# ? Apr 27, 2013 12:43 |
|
Torch Dexter posted:I don't think anyone's made PC graphics cards/chips that don't support both in the past 15 years. I mean, it still doesn't matter since Unity for Windows uses D3D, but if you develop a game using OpenGL right now, you are pretty much excluding Intel GPU users from your audience. The only reason it works as well as it does on MacOS is because the Mac OpenGL implementation is designed in a way that most of the functionality is handled by vendor-independent code written by Apple and what's exposed to the hardware is very low-level. OneEightHundred fucked around with this message at 17:00 on Apr 27, 2013 |
# ? Apr 27, 2013 16:57 |
|
Does anyone have or know where to get some sample bitmap fonts to use with Unity and Futile? BMFont is being completely broken for me and I don't want to buy a license for Glyph Designer, I just need some sample fonts I can throw into an atlas and mess around with.
|
# ? Apr 28, 2013 02:37 |
|
How is it being broken? Not that I can help, just wondering since I'm probably going to be toying with it in the next week or so.
|
# ? Apr 28, 2013 02:58 |
|
None of my settings are saving for some reason. I go and change the font, the size, the background color and then save and export and...it's the default lovely looking font at the default size on a black background. If I go into Font Settings or Export Options and change anything at all and hit okay everything is back to its default as soon as I open the menu again. I can't do anything with the program at all.
|
# ? Apr 28, 2013 03:01 |
|
Did you do this? From http://www.anbsoft.com/middleware/ezgui/docs/page28/page30/page30.htmlquote:From BMFont's Options menu save the configuration settings file (extension: .bmfc) by choosing Save configuration as... And then save the bitmapped font itself by choosing Save bitmap font as... If you ever need to tweak it again, load the .bmfc file to restore the same settings with which you've created the .fnt file. It's a good idea to name both files identically.
|
# ? Apr 28, 2013 03:07 |
|
Oh weird apparently now it's working. I was definitely following that page before, I'm not sure what went wrong. Ugh I'm way too tired.
|
# ? Apr 28, 2013 03:16 |
|
Picked up working on that old Haskell game I had; right now you can shoot at the blue 'chaser' objects, but there's no collision detection or anything. Only 250 lines, though, and I'm using bare OpenGL/GLFW.
|
# ? Apr 28, 2013 04:03 |
|
|
# ? May 12, 2024 07:31 |
|
yaoi prophet posted:Picked up working on that old Haskell game I had; right now you can shoot at the blue 'chaser' objects, but there's no collision detection or anything. Only 250 lines, though, and I'm using bare OpenGL/GLFW. Are you using OpenGL or OpenGLRaw? I've been playing with OpenGLRaw and the foreign function interface recently. It was a little bumpy in the beginning due to the lack of FFI examples out there, but now I'm enjoying it quite a bit.
|
# ? Apr 28, 2013 05:34 |