When SDL_RenderCopy() gets called, it fails and SDL_GetError()returns the error "Invalid texture".
Here's my code:
main.cpp
#include "Game.cpp"
#include <iostream>
using namespace std;
int main(int argc, char* args[]) {
try {
Game game("Test", 1280, 720, 60);
GameObjec...
Like here I am fairly sure that the issue is not understanding how C++'s reference/value semantics work, which is something that feels more suitable for SO, however it's not instantly obvious from the question...
I am looking for books or to state of the art papers about current the development trends for a strong-AI.
Please, do not include opinions about the books, just refer the book with a brief description. To emphasize, I am not looking for books on applied AI (e.g. neural networks or the book by No...
In this particular case, though, the "programming questions" that we get here would likely be downvoted a lot if they were asked on SO. Answering them here makes it so that they don't need to suffer SO's down arrow.
At some point though you realize there is nothing you can do. The rules are not meant for people like me, so the only winning move is not to play. It still feels bad.
I almost want to suggest them the C++ Q&A room, but we would do a poor job of teaching C++.
And I don't know how to say "Learn C++ first" without it sounding offensive.
@Vaillancourt I think the real issue is that answering duplicates is highly encouraged while closing them is not.
Hmm, I don't think there is ill-will in that scenario, so I wouldn't call that toxic.
It feels more like I'm trying to play Rummy at the Poker table and they keep yelling at me for doing it wrong.
The thing is that I refuse to play correctly.
I was actually told the rules. You camp the front page with your tags, open a question, if you can answer it within 30 seconds you drop an answer, otherwise move on. Easy 200 rep per day, doesn't take long either. Unfortunately I hate that game.
"Jungle-ish" sounds like "confusing" to me. It's not confusing, the rules are clear. I just disagree with them. "Poorly designed" or "bad mechanics" would fit in my opinion, but I don't think that is what you mean.
Eh, I don't feel like that is a huge problem. You answered the fastest and OP had their problem solved? You deserve the checkmark and the rep that comes with it.
I don't know how to fix it either. Giving rep for closing questions as duplicates and removing rep gained through answering duplicates is the obvious answer, but the details are complicated. Answering a question to then not get the rep because 5 years ago the question was already asked feels bad. Also disagreement on if similar questions count as dupes which would get worse than it is now.
The original idea was to create a compendium of questions and answers that would be of high quality. SO seems to have given up on that idea. Just answer the same questions by new students every year and call that engagement aka money.
Hi everyone, saw that you were discussing the question that I posted. Sorry if it wasn't appropriate to post it here. @Vaillancourt thank you anyway for helping me out :)
@Gian No worries, the line is something blurry between "game" and "programming, should be asked on SO". We try to answer in comments in cases like this :)
@nwp Yes, and un/fortunately, SO is still the best Q&A site I've seen around.
@Vaillancourt if I gotta be honest, I admit that I preferred posting it here instead of SO because I've got a couple of bad experiences asking newbie questions on there lol
@Gian And if you're relatively new to both game dev & a language, it's extra hard to know where the problem comes from. It was an honest mistake & you weren't a jerk about it, so no worries in my opinion.
In many ways, I wonder if SO is a victim of its own success / popularity. The volume is just so high & constant that it's less people oriented & more of a system than a community.
@Gian FWIW, I was fluent in C++, but move to other than languages & didn't keep tabs on its evolution & I'm not sure how modern C++ works these days. Case in point, I was brought up using new.
@nwp having learned OOP with Java, I didn't even questioned the use of that keyword lol I actually didn't even know until today that you can instantiate objects on the stack.
@Gian Also, chat isn't always this populated - but don't let that stop you from dropping in & saying something. It seems like a number of us (myself included) sort of keep tabs on it but don't necessarily hang out. If you have something to say/share/ask, just post.
@Gian Coming from Java to C++ tends to be especially tricky. Most of the keywords and concepts are the same, however, the keywords mean different things and you favor different concepts. Arguably having Java experience makes it more difficult to learn C++.
Naturally Java and C++ programmers don't get along well :D
Python lost a lot of appeal to me when I traced an error to the fact that my script had a mix of tabs & spaces & said code seemed like it was vertically aligned correctly.
btw I got into this game development stuff again because I was reading an interesting book about game programming design patterns written by Robert Nystrom and wanted to try out what I was reading about. Do any of you know about that book? What do you think about it?
@nwp I actually new about this rivalry lol
I was never particularly fond of Java, but I just assumed that all OOP programming was more or less like that
@Gian I like the game patterns book. Personally I find it more more approachable than the original "gang of four" patterns book. The author occasionally posts here.
but i knew that it isn't very well seen by many. For example, I know that most C++ programmer don't like to hide class attributes and the use of getters and setters. I actually don't know which side to take on this issue
@Gian Yeah, I read that. It is a pretty good read. I still use some of the concepts I read about. I would also recommend: schellgames.com/art-of-game-design
@brug I read several years ago, actually, I've got the second edition I think. It was a really interesting read. I read a couple of books like that one, but that's the best one I know about
@Gian Another common suggestion for Java-programmers dipping into C++ is to not use non-private inheritance unless you really really have to. It turns out that you generally don't need it and save yourself a lot of headaches.
@brug I liked the book. Still refer back to it from time to time. I don't have the cards, but the app (which I think is free) works as an an okay stand in for the cards. Personally I think I would like physical cards more, but I have too much physical stuff.
Yeah. I am sitting here thinking about it. I feel like I would lose the cards. But I would also be more likely to use them, especially in fun and creative ways.
I started making a game today with my son. He sat with me completely fascinated as I set up the project and built the basic architecture of the app. I am really looking forward to making it with him.
@Gian Got it on my shelf! I like to cite it in answers. Very accessible examples, does a good job of motivating the considerations and problems each pattern addresses.
Hey guys for my combat system, should I make it so when the player is hit he bounces backwards slightly or should I make it so he has temporarily immunity to all attacks?