Search found 80 matches
- May 20th, 2020, 5:33 pm
- Forum: Everything
- Topic: map::emplace with multiple parameter constructor ?
- Replies: 12
- Views: 9178
Re: map::emplace with multiple parameter constructor ?
Doesn't the emplace function perform a move? Don't think there are any copies performed here. If you think a move is still expensive for your object you could always store a pointer (preferably unique_ptr) rather than the object itself, then construct the object using new.
- May 16th, 2020, 12:58 pm
- Forum: Everything
- Topic: I'm Back?
- Replies: 4
- Views: 2494
Re: I'm Back?
Like this: Red
- May 14th, 2020, 1:06 pm
- Forum: Everything
- Topic: Z divide fundemental question
- Replies: 12
- Views: 6166
Re: Z divide fundemental question
The short answer is that more precision being at near plane is a "natural" byproduct, but the 1/z relationship is by design. Now for the long answer... Here's a nice image that made things very clear for me: https://developer.nvidia.com/sites/default/files/akamai/gameworks/blog/Depthprecision/graph1...
- May 11th, 2020, 5:38 pm
- Forum: Everything
- Topic: local static or not ?
- Replies: 5
- Views: 3290
Re: local static or not ?
If it's recursive then static might not work the way you want it to in that example as it overwrites changes of the previous call. That being said, it usually isn't worth doing this kind of thing it but there is some merit to avoiding common dynamic allocations. For objects like std::string (where S...
- May 1st, 2020, 7:23 pm
- Forum: Everything
- Topic: Workaround for Mac
- Replies: 2
- Views: 2067
Re: Workaround for Mac
FinalL made a fork thats been ported to OpenGL/glfw/glad: https://github.com/FinalL/chili_framework
Supposedly works on Linux, I'm guessing would also work on Mac.
Worth giving that a try.
Supposedly works on Linux, I'm guessing would also work on Mac.
Worth giving that a try.
- April 29th, 2020, 4:27 am
- Forum: Everything
- Topic: My first release!
- Replies: 9
- Views: 4642
Re: My first release!
Amazing work :o The game looks extremely polished. The art and sound effects are great, and I love the little camera movements when you do an attack. The game mechanics are also fast paced and exciting, exactly my type of game :D Some things I think you could improve: - I think you could pick a bett...
- April 14th, 2020, 4:54 pm
- Forum: Everything
- Topic: std::exception details ?
- Replies: 4
- Views: 2148
Re: std::exception details ?
My usual approach is to just step through in debugger for exceptions I don't throw myself to figure out where they're thrown. As for exceptions that I throw myself, I usually use a macro that triggers a breakpoint in debug builds. Example: #ifdef _DEBUG #define ERROR(msg) __debugbreak() #else #defin...
- April 12th, 2020, 3:04 pm
- Forum: Everything
- Topic: IS_DEBUG
- Replies: 5
- Views: 2681
Re: IS_DEBUG
Just define it yourself in project properties.
While having debug configuration selected in properties window:
C/C++ > Preprocessor > Preprocessor Definitions > Add in IS_DEBUG
While having debug configuration selected in properties window:
C/C++ > Preprocessor > Preprocessor Definitions > Add in IS_DEBUG
- April 10th, 2020, 6:01 pm
- Forum: Everything
- Topic: Wstring ? international chars ?
- Replies: 27
- Views: 10392
Re: Wstring ? international chars ?
You should watch Chili's vids on smart pointers, they explain everything in depth. It's all based on the concept of ownership. To answer your questions briefly: Can I use the same smart pointer in one container AND in another container at the same time ? Kind of, it depends what kind of relationship...
- April 9th, 2020, 3:26 pm
- Forum: Everything
- Topic: Wstring ? international chars ?
- Replies: 27
- Views: 10392
Re: Wstring ? international chars ?
Game looks sweet :O
You should definitely post a demo once it's playable
Your scripting language has some interesting syntactic choices with everything being function-like, kind of reminds me of Lisp.
You should definitely post a demo once it's playable
Your scripting language has some interesting syntactic choices with everything being function-like, kind of reminds me of Lisp.