Jump to content
  • Advertisement

Bregma

GDNet+
  • Content Count

    3060
  • Joined

  • Last visited

  • Days Won

    1

Bregma last won the day on April 22

Bregma had the most liked content!

Community Reputation

9322 Excellent

1 Follower

About Bregma

  • Rank
    Curmudgeon

Recent Profile Visitors

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

  1. Bregma

    Symbol lookup error on Linux

    Try playing with adding -Wl,--whole-archive to the LDFLAGS when building the bullet DSO. You're only doing partial linking when you're building your plugin, and the linker doesn't see the static object being used outside the library so it gets left behind in the static library. You need to tell the linker to put all of what's in the archive into the dynamic library. Creating shared libraries from static archives is tricky, that's why most build tools are a little goofy when dealing with that.
  2. Seems to me you changed your project from "multi-threaded" to "multi-threaded DLL" and now you need to change all the DLL binaries you supply to match, otherwise the linker will ignore them. No one ever said Microsoft Windows was easy on developers (and was telling the truth). All the binaries you link together in Microsoft Windows have to have the same [debug|multi-threaded|DLL] settings or you will get failure.
  3. Bregma

    calculating normal vectors

    Yes. It says the equation for the surface of the thing is f(p), and the equation for the normal to the surface f(p) is perpendiculart to grad f(p). The upside-down triangle thingie (nabla) is the symbol used to represent the gradient operator, and it refers to a vector-valued derivative. In other words it expresses how the normal is a parametric function of the surface equation in three variables in about as simple and precise a way as possible, in a way that only a mathematician would love.
  4. If you XOR the string with itself byte--by-byte, it will consist of only 0 bytes. Since it's all a known length of zeroes, you just need to store the length. Then, at runtime, you just need to allocate the length amount of space on the stack and XOR it once again with the original string, and voila, no need to store the string in the DATA segment, it can go in the BSS segment instead. It's called the "turtles all the way down" method.
  5. Bregma

    Programming and Higher Mathematics

    All of it.
  6. How to reinvent virtual dispatch using C++? There are many ways, all of them wrong. Perhaps you should just simplify instead. Have an Item class. Store objects of the Item class in your inventory. Give items properties, such as `is_wearable` and `melee_damage`. Use them as appropriate. RInse and repeat.
  7. Bregma

    Overengeneering Modularity

    Of course, rewriting is an opportunity to learn from experience and make things better in many ways. Just be aware of second system syndrome. Don't worry too much though, your third attempt is usually that much better again.
  8. Maybe it's because you're using a GUI, but you seem to be overcomplicating things. Git was made by a very lazy developer for what he considered idiots; don't second guess it. If you were on the command line, you would use two commands. First, add a remote repo named 'github'. git remote add github https://www.github.com/Joshei/MyGolfRepo.git. Them push to it. git push github master The git command line is verb-object-subject, which is a little confusing for native English speakers, but these days is fairly consistent. Other than setting your name and email, you generally never have to mess with git internals, like anything using 'git config'. I guess you'll have to spend a lot of time playing with the GUI to figure out which 1000 words of picture it takes to do the action of two command, though. Good luck.
  9. Bregma

    Size of enum class? (c++)

    QFE. If you care at all about size, offset, or marshalling/unmarshalling, an enum is inappropriate. You need an integer of known fixed size, and you need to be able to convert between the two. I've just been dealing with a customer who lost a (multi-million-dollar-valued) safety certification because they thought they knew what they were doing by using enums in a hardware interface (this is obviously not in the game development industry). Do not treat enums as integers. If you treat enums as integers, you don't know what you're doing. If you don't know what you;re doing when you're writing software, you're going to end up sad sooner or later.
  10. Bregma

    Is this OpenGL Modern Enough?

    Another data point to consider is that OpenGL 3 is not API-compatible with OpenGL ES. OpenGL ES is considerably more widespread: it's used on mobile and embedded devices rather than Linux PCs and a few Microsoft Windows PCs. OpenGL ES 3 is pretty much a proper subset of OpenGL 4, so your best bet for a "modern" OpenGL is to learn OpenGL ES 3 -- but that said, starting with OpenGL 3 tutorials will not hurt because it sets up the programmable-pipeline concept. It's mostly that the API to set up the data transfer between CPU and GPU, and how the shader receives and processes those data, became much more generic with the newer versions.
  11. Great. Now I have the Gnomoria theme song running through my head. Again. Anyway, I would take a look at what they did in that game, see what they got right (most stuff) and what could be improved on (cursor control, more than cursor location). Have the current selection anchor stick to the "surface" of the current view and follow the cursor as a view-cursor-taget projection -- the "surface" may be the top of the current Z-slice in cutaway mode. Have the selection anchor glow around the edges of the square for feedback. I don't think people today have a lower IQ or are generally more incapable of grasping ideas than folks of years gone by. Why do you think they'd be confused by an isometric view? Heck, if there's a sustainable market for Dwarf Fortress and its UI (and there apparently is; I know I've gratefully sent them my money), you may want to revise your judgement of humanity.
  12. Bregma

    How common are non competes?

    In most jurisdictions these have repeatedly been thrown out by the courts based on the notion that you have a right to earn a living with your skills and knowledge (note: this is not the "right to work" popular in some places). Of course if you sign such a promise, they'd have to take you to court to enforce the contract and you'd end up paying out of pocket even if you'd inevitably win. On the other hand, companies with deep enough pockets to sue tend to know the case law and not bother with such an unenforceable clause in a contract. What's easier to enforce is the idea that you can't take your work with you. That means client lists (for salepeople) or skunkworks/hobby projects developed while an employee (if you're a developer). There are plenty of precedents where an engineer left to hit the ground running with a startup and their former employer claimed ownership and won in court. Declarations of interests in existing intellectual property protect everyone, not just the employer.
  13. Bregma

    How much longer can Trump/Trumpism last?

    Well, I live in a country with first-past-the-post electoral system and traditionally multiple significant political parties. All I need is a single counter-example to disprove the proposition that first-past-the-post always leads to two parties. I had the opportunity last weekend to view some US television. I was aghast. My observation is that there is definitely a pathological culture at the heart of the current political situation. I don't know if it's been intelligently designed that way or it simply evolved, but there's definitely a life-threatening disease at play. I mean, all the ads were either weight-loss-related targeted at (always young and slim appearing) women, hair loss prevention for men, medications to ask your doctor for, or insurance of some description or another. If I were to be bombarded with that every day, I'd believe the sky is falling and I'll be too fat, bald, and undermedicated to do anything about it too. Then I switch to Fox News. Holy flocking sheep, I now understand why the press can sometimes be described as 'enemy of the people'. I don't know the solution, but it's definitely a symptom of an underlying pathology that gets expressed in the voting booth as well.
  14. Bregma

    C++ Common Runtime

    Interestingly, p-code systems like this were first implemented in the 1960s and OSes based on it became one of the competing alternatives to native compilation in the heady early days of the microcomputer (Microsoft's CP/M clone MS-DOS won that competition, but for non-technical reasons). The solution for the platform-portability problem has been resolved in recent implementations, such as Google's Go, by statically embedding the OS runtime in the application at final compile time so they can run alongside native applications on non-pcode OSes.
  15. Bregma

    Array arithmetic

    Nope. You stumbled onto pointer arithmetic and went into denial. In C and C++, arrays are really just pointers (with a few extra properties, not relevant to the discussion). Pointers are really just integers (with some extra properties, not relevant to the discussion). In the algebra of integers, addition is a commutative operation. Indexing an array using its operator[] is just adding an integer index to an integer pointer. It makes perfect sense that you can also add an integer pointer to an integer index and get the same result.
  • Advertisement
×

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!