• Content count

  • Joined

  • Last visited

Community Reputation

12077 Excellent

1 Follower

About Nypyren

  • Rank

Personal Information

  • Interests
  1. Does violence stem from video games

    What makes it unhealthy? Isn't this just applying an arbitrary ideal onto other people? I don't see any inherent problem with escapism if it doesn't cause anyone to suffer. But you never qualified it in that way.
  2. Are you sure the 12 is an integer? If it's being promoted to a float, then I might be able to explain why edit and continue is choking: The assembly code to deal with integer constants can just use an 'immediate' operand - these are values embedded with the GPR instructions themselves. However, floating point's FLD instruction doesn't have an immediate version. They load from memory addresses. There are also a handful of load-common-constant instructions (0, 1, pi, etc), but none of those matter for your case. What I've seen the compiler do with float constants is it bakes them into the static initialized data region of the EXE/DLL. I'm not sure whether it considers the floating point constant table to be a data structure of its own, but if it does that may explain why you're getting that error message.
  3. The callstack is already mentioned, but ANY pointer to that memory would be a problem. C++ object virtual table pointers. First class functions/lambdas/etc in a variety of languages. There's also the possibility that something points to the DLL's static data, not just code. It would be theoretically possible when loading the new DLL to rewrite all of the existing 'lingering' pointers to point at the appropriate place in the new DLL, but that would require tracking all of those pointers somehow, as well as having some way of identifying the symbol and offset they're pointing to (which may always not be available). You also have to worry about the possibility that the new DLL removed a function/static variable, or rewrote some data types. This is probably the reason why .Net's AppDomain and Assembly unloading is also so cumbersome to use for this kind of thing.
  4. What code is the best for game development?

    The best code delete[]s your enemies, DrawPrimitive()s them driven before you, and PlaySound()s the lamentations of their women.
  5. When you get crashes that you don't have the source code for, usually one of the following is true: The call stack will have one of your functions which called the code that you don't have source for. Double click on your function in the stack to go "back" to that function, then examine anything there which you have debug information for. The crashed code might be on a different thread and doesn't have any of your code on the callstack. You might get some useful information from the Debug -> Windows -> Parallel Stacks window, depending on what kind of thread synchronization is being used. " I know the error is that i try to do operations (change frequency/volume) on a null-sound (an null pointer, not a valid loaded sample)" So don't do that
  6. How to define a function for a problem?

    Since car physics are approximately reversible, I would start by pretending the car is in the final parked position, and determine the path it will take to get out of the parking spot. Let's create points: The point in the street where you drive forward to before beginning to back up and turn. The point where you need to begin reversing your car's rotation to get parallel with the curb. The point where you're parallel with the curb between the two other parked cars, but you're too close to the one behind you. The point after you've pulled forward a bit to center yourself between the blockers. Let's find these points in reverse by simulating your vehicle's normal driving physics: 4. You want your car to be approximately the same distance between the car in front and in back. 3. Starting from the final parked position, back up until you're almost touching the car behind you. 2. Crank the steering wheel as far as it goes towards the street (left if you're driving in America, right if you're driving in the UK, etc). Drive the car forward while turning until both front corners of your car are further away from the curb than the rear corners of the forward blocker. 1. Crank the steering wheel the opposite direction and drive forward until you're parallel to the street lane. To park, drive to these points in order 1->4. To leave, drive in order 4->1.
  7. How to define a function for a problem?

    The correct way is the same as always: Input the values you know already, and output the values you want but don't know yet. But more seriously, you haven't provided us with enough information to solve the problem. What is your vehicle? How does it behave? What properties of the vehicle can you control? What are the properties of blockers? What is the purpose of the 2 other positions? What are your "some other constraints"?
  8. The code snippets inside the article are full of > < instead of angle brackets
  9. Is Sublime Text a valid option for C++ development?

    Yeah, all the tools people use are eventually just running the compiler one way or another. You can do it via a makefile, or actually invoking the compiler executable by hand if you want.
  10. Is there a way to combine 2 methods?

    Make a public function in your script which takes an int parameter. Link your MainScript component to the OnClick handler. Your function in MainScript should then show up in the selectable functions in the UI Button's OnClick list. Use the same function for both buttons but provide 1 for counting up and -1 for counting down. Then you can have just one function like what you have already, and does 'count = count + parameter;' See about 2 minutes into this video for what I'm referring to. He does it with a string argument but you should be able to do it with int, float, bool as well.
  11. You don't need to pass parameters with 'ref' if (you don't need to reassign that variable at the call site) && (are not doing it to match a virtual function signature) && (the type is not a large value type that you're trying to prevent pass-by-value from copying the whole thing).
  12. I'm not sure if the actual defaults can be changed, but you have several options for making your own defaults: You can set one text object up the way you want it, then duplicate it for all your other text. You can make a prefab out of it if you intend to programmatically instantiate it. You can create your own special MenuItems that set up new text objects the way you want, and use that instead of Unity's own GameObject/UI/Text menu item. To do this, make a public static function in an Editor script (a script that's in a folder with the name 'Editor' as part of its path), and put a [MenuItem("GameObject/UI/Your Custom Text")] attribute on the function.
  13. MMORPG, some ideas...

    Have you tried ARK?
  14. I recommend learning the UI system. It becomes trivial once you run through a few tutorials. If you don't want a UI, you can use Input.inputString to get the string of characters that have been pressed since the last frame, and append those to a StringBuilder until the enter key is pressed. I've used this for developer cheat codes (think of cheat codes from pre-Quake days) in a game I worked on.
  15. Prevent Camera Flip on [-90,90] rotation

    I looked at the documentation for the deviceorientation API. You won't be able to use gamma alone. I think you're going to have to use alpha, beta, AND gamma to construct complete rotation information. I found this which might help, if you understand the math he's using: https://stackoverflow.com/questions/36639182/html5-get-device-orientation-rotation-in-relative-coordinate