Advertisement Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

  • Days Won


Wyrframe last won the day on May 31 2018

Wyrframe had the most liked content!

Community Reputation

2467 Excellent

About Wyrframe

  • Rank

Personal Information

  • Role
  • Interests

Recent Profile Visitors

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

  1. ... did you have a question, other than "is 3D collision detection more realistic?" Because that question doesn't make sense in the context of what you've said. You seem to have laid out a series of assumptions and design decisions, about some kind of tile-based system, without any description of what you are trying to achieve, so no; we can't comment on a design in a vacuum. We need context, and I think you do too. Otherwise, this is all just rambling, with no reason to ever conclude.
  2. If you have access to OBSE, then you can call the function GetBoundingBox, which gives you the center and size of the bounding box. Testing if (Abs(PointX - BcenterX) <= BsizeX/2), and also the same for Y and Z, will give you whether the point is in the box.
  3. You should figure out if that assumption is correct. Check your settings, and profile the code, or at least enable any in-engine metrics for where the time is being spent. Figure out where the time sink is, and be dead certain you are using the renderer engine you think you are. Remember that the Serious Engine has OpenGL, DirectX, and software rendering modes, and the OpenGL & DirectX modes can both run with or without hardware Transform & Lighting (because it was written for an era where Voodoo/3Dfx cards were common, which mostly did not have T&L support, they were just accelerated drawing units).
  4. The open-source release of the Serious Engine has its DirectX mode disabled by default for a reason, mate. Try using its OpenGL mode instead. DirectX 8 has to be emulated, because no modern hardware supports it. Every call therefore to go through layers of software translation, including at least one in the driver, and driver authors have no compelling economic reason to sink vast amounts of time into optimizing the performance of old, officially-deprecated APIs.
  5. Git treats all files equally by default, regardless of their size. But its processing model isn't very good for massive files. All operations require RAM linear to the size of the largest file being "operated" on (committed, checked out, diff'd, etc) at any given time. Among other things, you want to look into Git LFS ("Large File Support"), which lets Git track just the metadata for large files, and defer responsibility for storing them to a second, parallel repository which is optimized for them. You need to opt files in to LFS use, using patterns just like in .gitignore, but otherwise it's quite easy.
  6. If you're looking for other inspirations, you should look up "RimWorld", and also look at "failed" Dwarf Fortress clones, like "Gnomoria".
  7. Your BiValue seems to implement what I was calling a "stripe" (on the metaphor that if you have N collections running in parallel left to right, you have an iterator which instead of pointing to one of them, points to a vertical stripe across all of them). Is that prototype working for you? It looks about right. I'll give it a scrub-down later.
  8. Your type, VectorPair<K,V>, should have an iterator which dereferences to a VectorPair<K,V>::Stripe. A Stripe is just a value-type struct which momentarily stands in for a position in each target vector (it ought to get optimized away, don't worry). It will respond to operator<(Stripe, Stripe) by comparing keys between Stripes, and it has an overload of std::swap() which defers to the *Key and *Value target vector iterators separately. Then, use standard std::sort-family methods to assert ordering upon the VectorPair<> after mutation. You'll also need < to work correctly when comparing K values against a Stripe, if you want std::binary_search to work correctly. Your call if it's worth extending to OuterTuple<A,...> for arbitrary width stripes between an arbitrary RandomAccessIterable collection type.
  9. Well, do some analysis yourself. Make a test program which emits the sizeof(), the address, the relative address of ::saveStart and the relative address of ::saveEnd... and compare the output in debug and release builds. And if they come out identical... be sure to post your test-program's code when you post your results here.
  10. Remember the sizeof() a struct/class includes some things you're not supposed to reason about as a user of the language, such as the VTable if the type (or any of its supertypes) have any virtual methods. You may need to re-do your serialization from scratch. If you are going to use C-isms like fwrite() and fread(), which means casting to/from void pointers, you must restrict yourself to serializing only structs/classes which contain no pointers, and have no virtual methods.
  11. Wyrframe

    Recommend a simple .net 2D library

    So... a web browser?
  12. Space Engineers ( ) is one of several games which does precisely this, for bodies as small as 50m asteroids, and as large as >100km-diameter planetoids.
  13. Wyrframe

    C++ Game Asteroid

    Placeholder values like 0xCD or 0xDEADBEEF are often used by debug builds to catch initialization errors like this. The error message in the first screen suggests to me that `Game::bullet_` is nonzero but also uninitialized; find out why. Are you sure you deserve the job, if you don't know C++ and debugging skills?
  14. You're always passing a Rect(0, 0, W/2, H/2) into the call to `subsurface()`. That means all cameras are going to use the same (0,0, W/2, H/2) sub-rectangle of the action_surface for their blitting. You'll want to vary the X,Y position of the rect for each camera if you want them to target separate areas. Also, in your update() method, you seem to be blitting each camera's surface to its portion of the main screen surface... why? If you're using subsurfaces of action_surface, you can just copy the entire action_surface over to the screen at once, saving you the overhead of multiple blit calls and position re-calculations.
  15. Here's another design pattern for you. This code has not been compiled, but the idea is roughly there. class ColorChannel : public Channelled<ColorChannel> { // ... float r, g, b; template<> ColorChannel mix(float tween, const ColorChannel& other) const { float inv = 1.0 - tween; return ColorChannel(r * tween + other.r * inv, g * tween + other.g * inv, b * tween + other.b * inv); } }; class ScalarChannel; class PositionChannel; template<class T> class Tuner { T& getChannel<T>(); }; class ColorRect : public Rect, public Tuner<ColorChannel> { // ... ColorChannel color; ColorChannel& getChannel() { return &color; } }; // ... template<class T, class V> class Animation { T * target; V from, to; float duration, position; void update(void) { float tween = MAX(0.0f, MIN(duration / position, 1.0f)); target.getChannel() = from.mix(tween, to); } }; // ... void main() { // ... Animation<ColorRect, ColorChannel> anim(&blueRect, blueColor, whiteColor, 4.0f); while(true) { // ... anim.position += deltaTime; anim.update(); blueRect.draw(); }; }
  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. 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!