Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 17 Jul 2002
Offline Last Active Today, 04:15 PM

#5316525 Reading binary file in C++ skips 0s?

Posted by on Today, 04:01 PM

I would recommend brushing up on your bitwise arithmetic. Your understanding of shift operators seems incorrect, and your description of masking bytes is also incorrect.

#5315383 portfolio link on Resume?

Posted by on 15 October 2016 - 10:14 PM

I've had candidates bring in working copies of their games on phones/tablets. It's a nice way to demonstrate preparedness and also show off your work, IMO.

As for resume/CV links, I say put 'em on there. A lot of times all I see about an applicant is a resume, so if you can point me at more information about yourself, I'm very likely to take the time to check it out.

Frankly, if your resume leaves me "hungry for more", I don't consider that a great sign. Deliberately omitting valuable information is kinda lame if you ask me. Keep in mind you're likely to be working with people who are short on time, looking at dozens of competing applicants, and oftentimes digging for excuses to say "no thanks." Respect the time of these people. Respect their desire to know as much about your professional work as practical so they can make an informed hiring decision.

#5315285 Let's talk about octree compression ratio.

Posted by on 15 October 2016 - 12:37 AM

I'm... having a terrifically hard time parsing this post.

Are you actually using an octree? Because from your description of 4 planar directions, it sounds more like a quadtree.

Also I have no idea what compression ratios would mean in the context of a spatial partitioning structure. Do you mean you want to merge adjacent nodes into larger ones?

If so, have you looked at kd-trees instead? Octrees (and quadtrees for that matter) are based on regular subdivisions. They're not ideal for merging irregular areas/volumes.

#5315049 Why is visual studio giving me a bunch of false errors?

Posted by on 13 October 2016 - 02:54 PM

Definitely smells like circular #includes to me.

#5314606 Stack overflow for some inputs on the Simple Octree Project

Posted by on 10 October 2016 - 10:09 PM

Your post is missing crucial information.

#5314449 Running both server and client on one PC causes lag despite ping < 1 ms.

Posted by on 09 October 2016 - 02:22 PM

13 times a second is a bit slow, but not terrible; you might try tuning it to closer to 25 or 30 times a second and see if it feels better.

Generally speaking, testing over loopback addresses (like is going to yield less latency than testing over an actual network connection. On modern OSes the traffic doesn't go through the network drivers and instead is just a copy of memory from one process to another, so it's about as fast as you can get.

It sounds like there is a problem in the way you transmit data but without more details it's hard to pinpoint.

For what it's worth I can run a complete set of game and infrastructure servers and a handful of full game clients on the same PC without hitting excessive latency issues.

#5314056 My tool allocates more memory than Windows has available, how to warn user?

Posted by on 05 October 2016 - 07:25 PM

Imagine having a giant map and the tool was meant to show pathfinding data, but had to load only parts of the navmesh at a time. There are lots of paths you could find/see, but there are also some paths that couldn't be found/displayed. The results would still be useful but incomplete, and sometimes those missing pieces are what matters.

In this situation I would say that you need to use hierarchical pathfinding, as if you attempt to use a flat navmesh that takes more than several GB of memory to represent, you're in for a bad time.

If that's not your actual problem space, well, the advice still applies; you are looking at trying to brute-force a problem that almost assuredly has elegant algorithmic solutions that use far less resources and are amenable to streaming or other dynamically loaded setups.

#5313949 Your Opinion of Software Dev Resume assertion

Posted by on 04 October 2016 - 09:11 PM

Moving to Job Advice.

Assuming the excerpts are from your actual resume, I'd tend to agree that the wording is boring and flat. It probably wouldn't influence my opinion of your abilities much, but every little bit helps - lots of people read these things before they wind up in the hands of an engineering manager.

#5312909 Coding-Style Poll

Posted by on 27 September 2016 - 02:50 PM

Until we have prettifiers integrated in our version control systems, there will always be coding styles that people dislike.

You statistically cannot construct a style everyone will agree on unless there is just one person working on the code, and even then, that individual is subject to changing their mind over time.

The important conclusion is that you should not seek to eliminate the discomfort of working in someone else's style.

Instead, you should recruit people who are smart and empathetic enough not to be petty about what line the fucking brace goes on.

#5312893 target selection strategies

Posted by on 27 September 2016 - 01:11 PM

The way we handle this is to stratify the utility scores. Idles, ambient behavior, making tea, etc. get a score up to, say. 1.5 ceiling. Movement and tactics get a 2-3 range score. Using combat abilities get 3-4. Emergency stuff like evasion, yelling barks, and so on might be up to 5 or 6.

I think it's important to highlight that game AI in particular is not about mimicking human thought patterns. It's about providing an illusion of intentionality and rationality. If the behavior "makes sense" to the player, we have succeeded. The mechanics of choosing that behavior are almost always opaque to the player anyways (Sims games notwithstanding) so it's more important to look good than to be scientific.

#5312571 Visual studios 2010 debugger variable doesn't update

Posted by on 25 September 2016 - 05:11 PM

Are you debugging a Debug build or a Release build?

#5312568 target selection strategies

Posted by on 25 September 2016 - 05:06 PM

If you want to hard-code your decision process, don't use a system that's designed to make flexible decisions.

I don't understand what you gain by forcing a utility scoring system to basically turn into a decision tree.

#5312543 _CrtSetBreakAlloc() not breaking

Posted by on 25 September 2016 - 02:05 PM

If you want to get really filthy...


Just abuse the CRT init segment to run a function that sets up leak checking before static initializers/main runs. I think this is still subject to the initialization order fiasco so you probably will get flaky ordering behavior, but it's a thing you could try.

#5312348 target selection strategies

Posted by on 24 September 2016 - 05:32 PM

Survival is a nebulous goal. Often the best way to win is not to play, i.e. just flee the combat if you can and you've satisfied your survival condition.

It's very difficult to separate target selection from acting on the target. If you have a fireball, don't target the fire-resistant enemy. If you already committed to targeting the fire-resistant enemy, and none of your other abilities are available, well then you just fell into the Stupid Zone - the AI will do something stupid because the order of operations is wrong.

But if you pick the fireball first, you can still get the same stupid behavior if all enemies are behind cover except the fire-resistant one.

The most robust strategy is to consider all targets and all interactions, and pick the best combination. Utility systems are great for this. It helps to mix in "non-targeted" actions as well (running away, healing, etc.) so you can always have something semi-reasonable to do regardless of situation.

#5312198 Would you try a language if all you had to do was install a Visual Studio ext...

Posted by on 23 September 2016 - 08:32 PM

I don't agree - at least not in those broad of terms.

I think there is plenty of interest in languages and plenty of interest in moving to better ones. It's just limited to certain subsets of the programming world as a whole.

Looking to the web for a pulse on the general opinions of programmers is risky at best. The web hasn't been a reasonable ambassador of technological progress in 20 years.

Frankly I launched (and mostly kept) Epoch at GameDev.net and a few smaller game development circles for one major reason: I honestly believe that games are the best type of software we have today for pushing the boundaries of programming languages. This is especially true of realtime networked simulation games.

That may sound contradictory given that I've already stated I'm apathetic about making Epoch into a game development platform. But I don't think it is. Epoch should be able to use C and C++ libraries fluently, so that we can push the envelope without sacrificing premade tools. I started a BGFX integration project for exactly that reason, and it's motivated a lot of improvement to the language and tooling.

I think if you look back far enough in any successful language's history you'll find a very small number of highly motivated people. Maybe even an individual. Yes, the goal is important (and I have one, it's just... abstract!) and backing is a powerful force multiplier. But backing comes after the core people have decided to do something.

On the one hand, it would be a tragedy if programming languages stalled out and people were too lazy to learn new ones.

On the flip side, I don't think that's our destiny. I think what people miss is the familiarity of tools and libraries. If we make that transition less painful, I think plenty of programmers would be willing to learn a new language - maybe even eager to do so.

The majority of actually experienced C++ programmers I've talked to will (sometimes grudgingly) admit to wanting a better language. Maybe to them that's just C++20, or maybe it's Rust, or Go, or Haskell, or fuck it, maybe it's Epoch. But they're all just waiting for someone to lower the barrier to entry far enough that they can jump ship to a better technology.

In any event, I'm not doing Epoch for grand world-takeover schemes. I'm doing it because I want better languages and because I know what will scratch my own itch best. Nobody else is getting the same mix of ideas. So to me, there's room for more languages, even if it's a tiny niche.

Bottom line is I'm not all that concerned about dominating the PL field. I'd be thrilled for the language project to gain enough critical mass that other people could enjoy it besides me. But even if nobody ever does, even if nobody so much as looks, I'm doing this fundamentally because I want a language to code in that doesn't constantly make me wish I had been punched in the balls instead.