Jump to content
  • Advertisement

Kaptein

Member
  • Content count

    504
  • Joined

  • Last visited

Community Reputation

2224 Excellent

1 Follower

About Kaptein

  • Rank
    Advanced Member

Personal Information

  • Industry Role
    Programmer
  • Interests
    Programming

Recent Profile Visitors

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

  1. Kaptein

    AVX2 support in Visual Studio

    You can detect support from CPUID and implement the AVX2 variant by detection if you really want to. If your compiler has multi-versioning support this is really easy (gcc, clang), otherwise I'm sure there are workarounds.
  2. Kaptein

    High Lua engine call rate

    For posterity: I ended up implementing a call that can clone an object N times. So for say 600 trees: Create one tree in Lua, ask engine to clone it 600 times and return a list of 600 ids. Then iterate in lua over IDs and move the new objects into place. It cut really deep into the loading time which is now at 11-13ms.
  3. Hello all. I'm currently mid developing a game with my engine. There is currently a stage during loading that takes 21ms, where the script is creating lots of objects by calling into the engine. I noticed that each extra call needed to fully define an object cost me around 3ms overall. I was prototyping using a lua table to model the whole object to reduce the number of calls, but its a slight pain to implement. Right now 21ms is not very noticeable. However as development progresses I will eventually reach that 3-digit millisecond number where its noticeable during loading. *** Entering 'treskott_village' (in maps/overworld) on start [18:36:48] INFO: Loaded map 64x64 (F= 2 L=6, 24576 tiles) -> Loading tiles took 1.77 milliseconds -> Adding MOD scripts took 1.13 milliseconds -> Adding MAP scripts took 0.09 milliseconds >> Player life delta=64 Tile scan callback took 0.031000.2 milliseconds Tile scan callback took 0.412000.2 milliseconds Tile scan callback took 0.102000.2 milliseconds Tile scan callback took 0.138000.2 milliseconds Tile scan callback took 15.023000.2 milliseconds Tile scan callback took 0.229000.2 milliseconds *** Tile scan objects created: 618 >> Map season is [18:36:48] WARNING: Image already loaded: bitmaps/npcs.png -> Calling entry functions took 18.14 milliseconds Loading map took 21.44 milliseconds How do you go about making it take less time? EDIT: I thought about some instancing-like behavior, but it still requires some calls to the engine to at least move the object. I guess that will greatly reduce the time compared to what is going on now. Does anyone have a ballpark number for when players really notice the loading time?
  4. Kaptein

    Object placement in O(1)

    This is for try-placing objects, so no searching is necessary. For each position (x, z) in the world, read a seamless pre-computed array of radius-values and compare lequal against radius of object you're trying to place. This was 5 years ago, but I don't remember the details unfortunately. I ended up finishing the poison-disc generator and now my objects are try-placed properly in O(1), and seamlessly wraps around on the arrays. One (singular) array can't be used with many objects of many sizes, though, but I'll live. The bottom line here is that I can't use my poisson-disc array to place both big and small objects interchangeably. Instead I would have to create two arrays to support two object sizes, or one array where the one object affects placements of other objects, which is also unwanted. The primary reason for having something like this is just being able to use the same array to place any kind of size object from a single array shared across all threads.
  5. Kaptein

    Object placement in O(1)

    Today I started implementing Poisson Disc generator, however halfway through the implementation I realized this was not what I was using 5 years ago. First off, while I can implement this with a min and max radius, it doesn't help me fill in the void (so to speak) if I should generate a wrappable array from this data. So, this is what I need to know the name of: 1. The algorithm probaby uses poisson-disc to start with 2. It then creates a power-of-2 sized array 3. It fills the array with radius-values, distanced so that if you access the array at any position modulo the array size, you can use lequal to know if you can place your object. An example row: [1, 2, 3, 2, 1, 2, 6, 2, 1, 2, ...] <-- if i remembered the specifics I wouldnt be asking 4. This is O(1) because an object can be try_placed with `array(wrap(x), wrap(y)) < radius` Anyone know the name of this procedure? Any help would be appreciated.
  6. I am currently implementing UBOs and Buffer Textures in an effort to go from using glUniforms which are quite decent performance to something more per-frame and per-world-transition. I have a few thousands of mesh chunks that are generated for coordinate (0, 0) so that I can translate them wherever I need. I'm now doing the translation with a glUniform call each time I make a draw call. I would like to transition away from this by using UBOs (once per frame to setup all per-frame stuff) and then using texture buffers to translate and get better control over chunks. 1. Is this new method much faster than before? If the answer is no, it might not be worth it for me 2. How do I make sure that a given mesh that knows nothing about itself can sample from the right index in the texture buffer? There might be a ray of hope here if each draw call could be numbered from 0 .... N-1. EDIT: I baked in a mesh ID in all meshes and used a vec3 buffer texture as translation to avoid setting any kind of uniform data at all. I didn't notice any performance improvements.
  7. Kaptein

    Noise derivatives

    Can anyone explain to me how to use analytical derivatives in noises for use in 3D terrain? I have made a very capable game engine but I'm unable to make any cool terrains due to not being good at math. I have looked around on the net but it seems terrain generation is just a creative art no one teaches. For starters, how about how to perturb the top portion of a density bubble so that we can increase the chance of unbroken terrain with overhangs, as opposed to disconnected terrain due to too much perturbation? http://www.iquilezles.org/www/articles/morenoise/morenoise.htm gives an introduction on the topic and shows that it can be useful (which I wasnt sure of beforehand)
  8. Hey all, this is mostly a thinking problem. I have terrains, all of which are placed on an N-dimensional graph/system which determines their wetness, temperature etc. The conversion from a biome coordinate/point to a terrain is done by simply finding the closest terrain point/coordinate in the system. Think voronoi diagram. Given that there are very few terrains (lets say 20), shouldn't I just be iterating over each point and determine which is closest? What would you prefer? I have implemented uniform voronoi cells myself for creating simple zones, but I feel like using a Voronoi diagram just for this is overcomplicating it.
  9. Kaptein

    The State of the Indie World

    For the record, I thought this was an article, so I'm sorry about that...   Anyways, I see your point. But is this provably a problem? If it is, then maybe that could be a debate itself, otherwise, I have to say I just didn't like the overall tone of the original er.. article   I think even if gaming is currently overall hurting because of the lowered barrier to game development, I trust that there will always be games that are worth more than $1. Of course, in the case of games that are incredibly popular, they could leverage prices as they see fit. You can't argue that Angry Birds is anything short of a really good and polished game, yet it costs almost nothing. They also created the Pigs machine (can't remember the exact name) game, which also was very fun to play.   Again, there is that elephant in the room though, the red line between any other industry and this. Such as other types of content creation (music/video), and so it may just boil down to availability (platforms) and visibility (coverage). Content is so accessible now that we are swimming in it. I won't pretend I know all the factors at play, but, take YouTube. Video content as a service. I subscribe to the channels I like, and that's pretty much my entire YouTube experience, with the occasional link from friends, just to see the new 'thing'. But if I wanted to I could watch just about anything, right now.   While producing a video game could take years, other content creation takes weeks or months, rarely years. A youtube video is typically watched only once, while music is something you can enjoy for weeks. Last, games are something you typically experience once, and then never again. It could take hours or just a few days to complete. So, I can agree to that games are undervalued severely in many cases. What or why, I couldn't tell you. Perhaps it is as you say, simply to get sales. But I think the hardest part is just to get coverage - ANY coverage. And that could very well be the root of the problem, and the difference between music & video content vs games.   For music you have services such as Spotify & Wimp. For videos you have youtube, and many others. For video games, what do you have? The closest seems to be Steam Greenlight.
  10. Kaptein

    The State of the Indie World

    Why was this article accepted?   There are indeed smaller game developers that try to make a living creating eg. apps. If people like their games, they will buy them. Conversely, if they didn't - they wouldn't. That's Economics 101.   Are game developers not allowed to try to work 9 to 5, even if that game isn't a masterpiece? What is this, kindergarten?   And what about using an easier/simpler toolbox is bad, in ANY situation? What happened here?   Just in case someone are still conflicted - there is "bad" everywhere, such as in metal (the musical genre). That doesn't mean bands can't put out the music they created. And guess what, they probably liked the music. They put it out there, because opinions are like the behind - split. I get it, this is an opinion piece, but GameDev is above this attack on other peoples tastes.
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!