Beginner programmer looking for advice/introduction
I want to write applications for Linux, Windows, Mac, Android, and iOS. For the time being, I'm writing applications for my platform of choice, Linux, because that's what I run, and that's what I'm testing on. What I'm saying is that I'm not going to install Windows, just so that I can write applications for a platform I'm not going to use, using tools I'm not going to use.
cplusplus.com has the best forums for c++ code issues. They are usually pretty quick to answer you too. Correct me if I am wrong, but I think that they are trying to say that there is no easy way to make things cross-platform for a beginner. There is no perfect solution which is why people either just create for one platform or code each one separately. You will still need a mac and windows os to test run your stuff though (as painful as it may be). There are some engines that will do all the work for you, but you need to have some big $$ to get them.
This kind of looks promising to start with: http://www.developer.com/net/cplus/article.php/3532786/Cross-Platform-Game-Development-for-C-Developers-Part-IV-ClanLib-SDK.htm
This kind of looks promising to start with: http://www.developer.com/net/cplus/article.php/3532786/Cross-Platform-Game-Development-for-C-Developers-Part-IV-ClanLib-SDK.htm
This post isn't exactly related to the questions asked, but for the OP, I highly recommend that you find yourself some sort of naming convention for the C++ and you should do it as fast as possible. The non-capital class-name makes the code a lot harder to read, and so on. It saves some possible errors in the future aswell, if you name the class variables with some naming convention. So you wont have the problem of having; this->height = height + 2, and later on you use the wrong variable on your calculations. Lot of people use underscore in front of variable names, when its inside a class.
Thanks for the tip Randi. I am however, willing to put in the extra effort to create cross-platform games. At this point, it's as easy as recompiling for the other system, though in the future I'm sure it will require os checks, and running specific code for each platform, when os-dependant code is required.
And I appreciate the advice Hiiri, I'm working on a naming convention, but it's difficult to do so when I don't fully understand the language. In Game Maker I used obj_* for objects, and spr_* for sprites. I should probably do something similar in C++, cl_* for classes maybe.
And I found the issue with my code in post #9, thanks to Tank on the SFML IRC. As it turns out the class player is outside of the main scope, so when it looks for "App", it finds the variable that was initialized in line 3, but never used.
Here's my new code. http://codepad.org/5mHlwSnt
And I appreciate the advice Hiiri, I'm working on a naming convention, but it's difficult to do so when I don't fully understand the language. In Game Maker I used obj_* for objects, and spr_* for sprites. I should probably do something similar in C++, cl_* for classes maybe.
And I found the issue with my code in post #9, thanks to Tank on the SFML IRC. As it turns out the class player is outside of the main scope, so when it looks for "App", it finds the variable that was initialized in line 3, but never used.
Here's my new code. http://codepad.org/5mHlwSnt
I'm loving C++ so far in that it's complex, but logical. With other languages I memorized functions, but with C++, it's not just memory, each time I practice writing code in it, I get a better understanding of what I'm doing.
Last night I spent the entire night playing with classes, trying to figure out inheritance of subclasses, and such. I wanted to make it so that every object was a subclass to a superclass, and is given an id upon creation. (So that multiple objects of a single class could be distinguished.) I'm sure there are several ways to do this. I'm bound to figure something out sooner or later
Last night I spent the entire night playing with classes, trying to figure out inheritance of subclasses, and such. I wanted to make it so that every object was a subclass to a superclass, and is given an id upon creation. (So that multiple objects of a single class could be distinguished.) I'm sure there are several ways to do this. I'm bound to figure something out sooner or later
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement