« first day (1476 days earlier)      last day (3534 days later) » 

user92578
3:02 PM
@MickLH Also my "assumption" was based on a comment I read on a page that I trust. So my assumption wasn't actually an assumption, since I actually didn't know a thing about atoi.
 
How does it make any sense at all that your assumption is not an assumption... because you assumed it?
 
user92578
I did not assume anything, I went to that question about converting const char* to int in C++. Then I found a comment saying atoi is not a good solution.
 
Also if you don't feel comfortable or like this is friendly, then lets step away
 
user92578
That might be a good idea
 
I feel comfortable and friendly, but I can sense that I'm probably the only one
@Tyyppi_77 That comment most likely says it's bad, because it never throws exceptions. So if you give it a bad string, you get undefined behavior.
 
user92578
3:05 PM
What's actually the thing with not throwing exceptions but letting (or forcing) the user to check for errors?
 
User checking is the "C way" and exceptions are the "C++ way"
 
@Tyyppi_77 if both atoi and the stringstream give you the result you need, it doesn't matter what you choose. Chances are that you will need to get more text input to parse, need better error handling or other features, and then you'll have to go back and expand your input parsing.
 
The C++ elitist assholes will always talk bad about anything which is not the "C++ way", so take ANYTHING you read online or hear from anyone with a grain of salt
 
Man, setting up the scripting for a CCG is really difficult
 
I feel like, Mick would make a nice graduate professor.
 
3:06 PM
Actually better put: Humans suck, take everything with a grain of salt.
 
Knowledgable and Helpful enough, while also effortlessly condescending :p
 
:D
I don't feel superior, I just feel experienced
 
ok back, it's much happier
 
Yeah, it doesn't come off as trying to put people down. It seems more like, completely confidence that you are correct - and limited (or faraway) experience not being correct.
 
@Tyyppi_77 I assume that you're still working on your settings code, so if the number you're trying to parse was generated from a float before, you're probably on the safe side unless the file gets corrupted or it's actually NaN
not float, int it is
 
user92578
3:08 PM
I don't plan on using floats
 
user92578
I'll probably stick with integers
 
the point is the same
 
@Noctrine well I have a habit of only talking about what I know, and even though I know it I have a habit of always checking the documentation before I insist it.
 
user image
5
 
@BlueBug looks fucking awesome!
 
3:09 PM
i like your blue bug logo
 
:D @MickLH ty <3 @Almo >A< ty me too luv the logo. I like butterflies.
 
I don't understand the avoid the red comment and then you smash into red things
But the presentation is great
 
Pip
agreed
 
hahaha yeah. My little brother cousin pointed that out as well. "Why would you say avoid them when you break them?"
 
looks like you can destroy the red things when they have a certain orientation
 
3:10 PM
I think I get whats happening
 
I think it means, avoid gettting killed by the red, kill them first
 
user4704
@BlueBug Reminds me of an iOS roguelike I played once.
 
user4704
And holy shit it makes my browser chug.
 
my bad my bad, next time I will upload lower resolution.
It is indeed copy of a mobile game, let me find the original.
 
no need, just don't onebox it
also, if you upload to gfycat instead, the filesize will be a LOT smaller
 
user4704
3:12 PM
Yeah, I'm not sure why it's so chuggy.
 
user4704
oh
 
user4704
that maybe ;P
 
@BlueBug maybe you could put some kind of trim on the dangerous side so it's easy to see where you can attack them?
 
or is it just that whoever attacks destroys the other?
 
3:13 PM
@MickLH good idea, good idea. Indeed the original creator of this game implemented that. I should add that as well.
 
:17245718
@BlueBug Im back
 
#Christoph Whoever attacks first gets the kill, @PsychOPhobiA hey :)
 
user4704
Man, I hate sending "I'm quitting" emails.
 
@Christoph well the 2nd stage had flat sides that bounce you away if you go too close, but the player won when colliding from any other side
 
I didn't like it either
 
3:14 PM
lol we could ask @BlueBug
 
@BlueBug thanks for clarifying
 
@BlueBug Can you make a game in C# without using XNA?
 
sure
Unity
 
you can make a game in your head without using anything
 
or many other possible solutions
 
user92578
3:15 PM
I'm getting error (one of more multiply defined symbols found) because I'm defining specialized C++ method templates in the header file. What's wrong?
 
:O @JoshPetrie You're no longer making Halo and not afraid of anything?
 
yah unity
 
user4704
@Noctrine Not after August 27th.
 
I mean nothing
 
user4704
@PsychOPhobiA Depends what you mean by "nothing."
 
3:15 PM
@Tyyppi_77 linker errors? inline your inline functions
 
Staying in the games industry?
 
Like using a PictureBox and making pictures move and stuff...
 
user92578
@JoshPetrie Mind if I ask why?
 
can you tell us where you're going yet?
 
user92578
@MickLH Linker
 
user4704
3:15 PM
You can't make a game in any language without some kind of runtime / support libraries.
 
user4704
@Tyyppi_77 Not happy here.
 
user92578
@MickLH Not inline, after the class declaration.
 
fight!
 
user4704
@Almo Undead Labs.
 
Head First C# said you can
 
user4704
3:16 PM
@PsychOPhobiA The BCL is a support library.
 
But I am asking you guys to make sure it is valid of course.
 
user4704
Again, it depends what you mean by "nothing."
 
@PsychOPhobiA PictureBox is still using the System.Windows.Forms library
 
@JoshPetrie Oh okay
 
user4704
You don't have to use XNA, you could use Windows Forms.
 
user4704
3:16 PM
Or SlimDX / SharpDX.
 
user4704
Or some OpenGL wrapper.
 
Here original game which I based on : robotacid.com/flash/ending
 
@JoshPetrie have fun that. just looked at their site :)
 
user4704
Et cetera.
 
@JoshPetrie I mean nothing - like no game engine stuff.
 
3:17 PM
it will make your life unnecessarily difficult
 
user4704
@PsychOPhobiA None of those libraries are "game engines."
 
Yeah I know, I should have put it all together
 
XNA isn't a game engine.
 
and it doesn't have an acronym
 
3:18 PM
Let me look that up
 
user4704
XNA is more like a framework.
 
user4704
Unity is more like an engine.
 
^
 
user4704
(Both terms are pretty loosely-defined though.)
 
"Why XNA is not considered a game engine"
 
3:18 PM
I just call everything a framework to avoid that argument, lol
 
I think that from now on, when people say they want to do things the hardest way possible. I'm going to say "Cool" and move on.
7
 
Guess you guys were right.
 
> A game engine is a software framework designed for the creation and development of video games.
 
@Tyyppi_77 I mean that using the inline keyword will let the function live in every object code file it touches, with a link once flag so they don't collide
 
user4704
@Almo It is composed of a lot of former ArenaNet employees, and they sought me out.
 
3:19 PM
> software framework
> framework
 
@JoshPetrie Sounds like they are smart. Hope that works out well. :)
 
yeah, engine is a subset of framework
 
They have the most practical jobs page I've ever seen out of a game company (and most other companies). So wtg!
 
hm...
 
3:19 PM
@JoshPetrie wat, switching jobs?
not liking Microsoft anymore?
 
user92578
@MickLH Adding inline to the declaration did not solve the error
 
user4704
@PsychOPhobiA "Game engines" are often more than just libraries and APIs for writing code (like XNA is). They often include a lot of supporting tools, and a more unified, holistic pipeline for content creation, et cetera. Less flexible in general in exchange for more ability to do things faster.
 
user4704
It's sort of complicated.
 
user4704
@AlexM. Never really did. Tolerated it for working at 343, but after a few months became unhappy at 343 itself.
 
@Tyyppi_77 what? why "include"
 
user4704
3:21 PM
And at the end of the day it's a waste of time to worry too much about the distinction.
 
@JoshPetrie isn't that actually a suite formed by the engine and accompanying tools?
 
user92578
@MickLH whoops
 
@AlexM. Unity isn't a "suite"
 
user4704
@AlexM. Could look at it that way, lots of people do. Lots of people take the other approach as well.
 
Or I don't consider it a suite anyway
 
user4704
3:22 PM
@Tyyppi_77 What code are we looking at?
 
@Tyyppi_77 Well you can show the actual error if you want :P
 
But it lets me create animations, scripts, materials, etc.
 
I mean
 
Aww man, Moonrise looks awesome. I need to get back to coding the things after I finish doing very close to nothing at work today :(
 
you could develop alternative tools to interact with the engine itself and to replace the original ones
 
user92578
3:22 PM
error LNK1169: one or more multiply defined symbols found
 
which kinda separates the engine itself from the tools
 
@PsychOPhobiA. there's no virtue in doing things "raw" or without high level libraries. if you're not using libraries, you'll just have to recreate them. however those libraries were created by people with decades more experience than you, who were (usually) paid specifically to research and create the the library in the best way possible. you're not going to do it better than them.
well, not unless you identify something specific you think you can improve, before you even start
 
@Tyyppi_77 did you make all implementations of the function linkonce, and do a clean rebuild?
 
user92578
Do I need to declare template spesializations in the class declaration?
 
user4704
@Tyyppi_77 C++ has this concept of the "one definition rule." That, in conjunction with the way that C++ compilers work (each translation unit is compiled on its own and then linked together) can lead to that error.
 
user4704
3:24 PM
@Tyyppi_77 Why don't you pastebin your current code?
 
user92578
Great idea
 
@IcyDefiance Interesting. So how would anyone create a libary? I mean they use some kind of language but then to make libaries do specific things is a challenge
 
user4704
@PsychOPhobiA You build on top of other libraries.
 
user4704
Which are in turn built, at some level, on top of the OS.
 
user4704
3:25 PM
(and drivers)
 
@Tyyppi_77 you mixed together inline style and translation unit style
 
user92578
So the inline needs to leave?
 
Move the specialized version into it's own C++ file, or move it into the original definition
 
@Noctrine Moonrise does look cool. Could possibly fill the Digimon World void but not the Monster Rancher one :(
 
user92578
But you can't template in .cpp files, right?
 
user4704
3:26 PM
You can.
 
user4704
But it depends what you need the template to do / where you need it to be used.
 
@Tyyppi_77 you can define the specialized template as existing in the header, and then implement it in a source
 
@JoshPetrie So it would take some level of understanding from computers and programming and math I assume right?
 
or you can implement it, with inline in the header directly
 
Maybe I'll make a Monster rancher game and since I can't art I'll just have all the monsters be meme's until I come up with something better
 
user4704
3:27 PM
@PsychOPhobiA Most software engineering does.
 
:|
@SpartanDonut heh :p
 
user4704
@Tyyppi_77 .h files don't mean anything to a compiler; most compilers never end up seeing them.
 
PsychO have you made a few games yet?
 
user4704
(FWIW)
 
3:28 PM
Here @Tyyppi_77, I think this is what you want
 
@SpartanDonut We've actually had some awesome advances with putting that particular title out, but I still need to find the right 3D Modeler and Animator to make it work :(
 
user92578
For some reason I thought that you need to template in headers.
 
Hearing all this talk about API's makes me want to make an API for my toaster.
 
user4704
@Tyyppi_77 Specializations of templates are a more advanced concept with slightly different rules.
 
GetBread();
MakeToast();
Fly();
 
3:30 PM
@Tyyppi_77 headers don't exist, maybe to prove it to your mind you could copy paste all the headers into one giant C++ file with NO includes at all, and see it's the same.
 
Pip
lol
 
user92578
I added the spesialization declarations to the class declaration and moved the methods to the .cpp file. Now the complier rewarded me with unresolved external errors.
 
user4704
Generally, the definition of a template must be available to all scopes that wish to use it.
 
@Blue Internet of Things Toaster
 
user4704
This means that in practice, you have to put it in a header file.
 
3:30 PM
but only to make your life easier!
 
user4704
(but you could just put it in a .cpp if you don't want to use it outside of that .cpp; remember, headers are not seen by the compiler)
 
1193
Q: Why does Windows think that my wireless keyboard is a toaster?

ydaetskcoRI've inherited an old PC from my girlfriend's dad and when setting up the printer I got a bit of a surprise: Two questions spring to mind here: Why does Windows think my wireless keyboard is a toaster? Why does Windows even have an icon for a toaster in the devices menu?

 
user4704
The compiler only sees a "translation unit," which is basically the result of the preprocessor running to resolve all #define macros and #includes into a single giant source file.
 
user92578
Now why am I getting unresolved external errors when I call the methods I specialized?
 
lol @Noctrine thats hilarious
 
user4704
3:32 PM
Pastebin your code again.
 
user4704
(the new current code)
 
derp, not thinking
 
first thing that came to my mind; 1193.... so much reputation SO MUCH!
 
@Noctrine exciting but sounds a long ways off yet D:
 
3:34 PM
@Noctrine hows the UE4 been going?
 
@BlueBug only 3k max, actually, because of the 200/day rep limit
 
awwww
 
also this is the 3rd time that question has been starred here in those 15 days, lol
 
@SpartanDonut I know :( people are expensive.
 
Pip
@Wardy hey man
can I talk to you in the skype chat?
 
3:36 PM
oh, @SpartanDonut, I meant to say: meme ranch sounds kinda hilarious
 
@SpartanDonut Pretty nice, although I've had to neglect it a bit. I just upgraded to 4.4.0 so that I can use Mixamo's animation packs, so that lets me get a lot more worked on. Still nothing real though, all the little mostly irrelevant details have been what I've ben filling my time with because I don't have much time.
 
@Pip dude im online you dont have to ask lol
 
related to "so much rep", how the hell did this become the answer to get me the nice answer badge? gamedev.stackexchange.com/questions/82156/…
 
Pip
you didn't respond :P
 
this is the kind of math you learn in the first week of gamedev
 
3:37 PM
I'd play Meme Rancher
 
does anyone wanna see something i find interesting but completely unrelated to game programming?
I'm building a new aquarium to replace my old one
 
The problem is I don't think anyone could take Meme Rancher seriously lol
 
100 gallons :)
 
But it would certainly work for prototyping
 
user4704
@Tyyppi_77 Only class templates, not function templates, may be partially-specialized.
 
3:39 PM
@Wardy looks good so far man!
 
user92578
Meaning that I'll have to use typeof(T) to determine the type of the result wanted in the one and only templated method?
 
@Wardy my family used to have a tank about that size, just a little longer. then my dad washed it with bleach and when he put the fish back in they all died.
 
user4704
24
Q: explicit specialization of template class member function

ledokolI need to specialize template member function for some type (let's say double). It works fine while class X itself is not a template class, but when I make it template GCC starts giving compile-time errors. #include <iostream> #include <cmath> template <class C> class X { public: template <c...

 
ouch @IcyDefiance
poor fish
thats a 5ft tank
would be thousands in stock in there
I'm building a reef
 
user4704
You are honestly better off writing these methods as GetIntValue and GetStringValue and such and avoiding the template entirely.
 
user4704
3:40 PM
It's not getting you any benefit here.
 
user4704
Also:
 
user92578
I just thought that I'd go a bit different road, and learn something new and amazing from C++. And this time that thing is that you can't do this.
 
user4704
Ew, singletons (you're getting judged anyway). You shouldn't "throw valueElement," that's not useful at all. If you are not using C++11 you should be passing your strings by const &.
 
user92578
Life's full of disapointments
 
user4704
Making your destructor private is generally a bad idea.
 
3:42 PM
rofl
 
lol I love how nobody is flaming about that he's trying to specialize template members to implement a singleton
 
user92578
@JoshPetrie But since it's a singleton, it cann't be destroyed anywhere outside the class.
 
it's like cliche C++ drama clusterfuck
 
I love singletons.
 
user4704
@Tyyppi_77 Doesn't matter, still bad practice (and will bite you when you realize it was dumb to make this a singleton).
 
3:43 PM
They make life easier until you actually start building more into the project, then you wish you never knew them.
 
user92578
@MickLH I'm not specializing template members to implement a singleton. I'm templating members in a singleton class
 
user92578
@JoshPetrie How about the constructor?
 
user4704
That's fine.
 
user92578
Okay
 
user4704
Since you do not provide a way to publically construct an instance of GameSettings, and you never expose an existing instance except via a pointer, making the destructor public does not allow anybody to do anything with it.
 
user92578
3:44 PM
Advice taken, and applied :)
 
user4704
It does help you prevent odd cases where you try to hold the type in question in utility wrapper types.
 
I personally am an optimist, and like to look on the bright side, that theoretically an instance of a friend class in the global scope could automatically clean up the singleton after the app exits :P
 
user4704
There are times when a private destructor is warranted but this really isn't one of them.
 
user4704
So, if you want to learn something new and interesting about C++, you might consider learning about implementation-hiding techniques.
 
user4704
Since they relate to your (apparent) lack of understanding of the C++ compilation model (header and source files).
 
user92578
3:46 PM
So what would you recommend doing when no `valueElement` is found? Just return NULL?
    	tinyxml2::XMLElement* valueElement = GetXMLElementWithTagName(settingsName);
    	if (!valueElement)
    	{
    	}
 
user4704
@Tyyppi_77 You can throw (I'd throw).
 
user4704
Just don't throw valueElement.
 
user92578
0?
 
user4704
You just determined valueElement is null, so all you are throwing is a null pointer.
 
lol...
 
user4704
3:47 PM
Which is useless -- when you catch that, you can't tell what happened or do anything useful with it.
 
user4704
You should always throw std::exception (or some subclass thereof). It's stupid that C++ lets you throw arbitrary stuff. Pretend it doesn't.
 
user92578
@JoshPetrie I'm kinda new to these errors... it seems a bid odd to actually throw errors in your own code :)
 
user4704
@Tyyppi_77 No different than returning something like null.
 
sorry, it's just so ironic, you're coming full circle onto the atoi thing
 
user4704
What you are saying when you throw an exception is that "an error happened, this code does not know what to do with it, hopefully somebody else will"
 
user92578
3:48 PM
@MickLH Yeah, I get that
 
user4704
Then, you catch that exception elsewhere (higher up in the abstraction of your program) where you can better understand what to do with it.
 
user4704
The more information you can give to that higher-level abstraction, the better it may be able to deal with (possibly even recover from) the failure.
 
user4704
If you give it basically no information, there's basically nothing it can do.
 
user4704
So a general rule of thumb should be to throw the most-specific exception type that makes sense for a given failure.
 
user92578
Thanks a lot @JoshPetrie and everyone else who helped me today, I'll now go and watch an episode of House if Cards. Bye and good night!
 
user4704
3:51 PM
Bye.
 
@Tyyppi_77 peace, maybe drink water for like 5 minutes first? :P
 
user4704
This needs more visibility:
 
user4704
0
Q: Are questions asking how to find where game engines have the code for different things on-topic?

David StarkeyFor example: where is the code in Unreal Engine that deals with the player picking up a weapon? Is this an acceptable type of question? What about a more general version: how can I find the code for different systems in CryEngine?

 
user92578
@MickLH What?
 
or drink water for like 8 seconds, and then stand for like 4 minutes and 52 seconds
before subjecting your brain to TV-wave radiation
 
3:52 PM
@JoshPetrie What, you mean I can't just Try Catch my Main(string[] args) and just have a mile long switch statement to handle all the errors ever...
Damn.
 
user92578
Do I need my folio-hat, or should I leave it for the computer time?
 
@JoshPetrie yeah, I saw that, and decided I don't have a fully formed opinion on the subject
 
user4704
@Blue Can't switch on strings in C++. :P
 
user4704
And C# doesn't let you throw strings.
 
user4704
So... no. You can't. :P
 
3:53 PM
Double damn.
 
@Blue don't worry. You can just swallow all the exceptions. No big deal.
 
Heh, swallow.
 
do not do this, it's a joke (one that might piss alex off) fuckit just dereference the null pointer, cross platform break to debugger in zero bytes of code :P
 
user4704
@SpartanDonut Rageface.
 
Alternatively, just output all errors to a hidden label in an offscreen win32 form.
Sorted.
 
3:56 PM
I've honestly worked with an API where you couldn't check if something existed... you just had to try to get the item and if it didn't exist the API threw an exception.
 
NO NULLS FOR YOU.
 
So a horrible exception swallowing extension method was born -_-
 

« first day (1476 days earlier)      last day (3534 days later) »