ferrous

Members
  • Content count

    1064
  • Joined

  • Last visited

Community Reputation

6137 Excellent

About ferrous

  • Rank
    Contributor

Personal Information

  • Interests
    Education
  1. Yup, its a preference thing, I'm in the var camp, mostly especially for the "Foo foo = new Foo()" case, that's my personal nit, as it's super obvious what foo is, you just declared it to be a new Foo(). (Exceptions for when you wanted BaseFoo as Nypyren stated.) It's more helpful of course when it's List<Foo, Dictionary<Bar, MyKey>> foo = new List<Foo, DIctionary<Bar, MyKey>> instead of just Foo. I'm also in agreement that four bools, that should be an enum, especially if you can't have a spiral line circle. In addition, it's best to make structs immutable.
  2. R&D is a thing?

    That's a good point, though I consider Engine positions to fall under jpetrie's description of, "Do some R&D, but not all R&D", as engine positions are going to be doing a lot of non-R&D work.
  3. R&D is a thing?

    Yup, a lot of taking an existing white paper and academic code and turning it into actual production code.
  4. It's pretty common in windows api and directx https://msdn.microsoft.com/en-us/library/windows/desktop/bb172588(v=vs.85).aspx was my first random google =)
  5. Do all those members really need to be public? I'm a big believer in only exposing to the consumer of your code the bare minimum, and having them modify things through methods instead. For example, what if in a later implementation, you find that you want to reset the spawnTimer when someone disables the spawner. In your current implementation, that would be a painful retrofit, as you'd have to track down all the places where people are mucking with the internals of your class. Other things just seem unnecessary to expose, like timeDelta. Why is that public? And finally, whats up with all the hard coded numbers? 500? 800? Without even a comment as to what they are. Those should be named constants, or exposed so that users of the Spawner can set them to what they want.
  6. That's good, I've mucked with units that are rectangular and have a turn radius. It gets expensive very fast.
  7. DX11 Basic HLSL texture question

    I'm not sure if you interpreted what he was saying correctly, if you wanted to swap your textures, you can do that via the API calls: // Your original context->PSSetSamplers( 0, 1, samplerA ); context->PSSetSamplers( 1, 1, samplerB ); // just swap'em context->PSSetSamplers( 0, 1, samplerB ); context->PSSetSamplers( 1, 1, samplerA );
  8. You might be able to fudge it and pretend it's a grid based path. You might get funny results now and then, but it might do a good enough job at avoiding horribly slow tiles and staying on fast tiles. Would require testing. Otherwise, you probably have to do something like what Kylotan said, get the tiles under the line, find how much of the line is under each tile, do a cost * length calculation for each tile. Hopefully your units aren't super thick, or it becomes more like casting a rectangle / capsule and doing tiles under that, which gets uglier. If you're a city builder and it's tiny little people, you can probably get away with a single ray.
  9. Trump and Russia (take 2)

    Trying to threaten China with a full trade embargo is like trying to threaten that you'll cut off your own legs. Embargoing China would destroy the US economy.
  10. That and many games, unless they were to add drastic amounts of new content, would cease to be fun. Take your Halo example. Fighting the same three or four alien types over a course of a 15 hour adventure. Okay. Fighting the same three or four alien types over a 60 hour adventure, that's a boring slog. Also, if a developer / publisher can already get millions to buy a game with an 8 hour single player campaign, I'm not sure what the incentive is to make that campaign 10 times as long? That's what DLC is for. It's less upfront risk, more reward.
  11. Something to mention is that Jump Point Search only works on Uniform cost grids. So if you have mud tiles that cost more to traverse than road tiles, or whatever, it won't work.
  12. Improving Interrupts

    Nice, yeah, the problem with the X-coms, Jagged Aliance, and Xenonauts was always the complete lack of knowledge. Even a percentage chance being displayed would've been better than nothing. XCOM, the remake, swapped it to always happening, but only once, and every single person would respond at once, making it mostly useless. (Especially combined with it's lack of unit facings) Your method sounds fairly clever. Is it the number of action points spent, or the number of tiles moved? I could see advantages in both methods.
  13. C++ Well-defined shifts

    I could see adding some asserts, do the shifts assert? I can't remember the last time I passed a bad parameter to a shift.
  14. Bioware RPGs? Maybe. Divinity Original Sin? I have a soft spot for the early Star Ocean games. Do you want only real time? Shadowrun's got fairly quick turn based combat, being a bit of XCOM lite.
  15. What methods are you using to load and unload the slides?