Well, I was reading Patrick Wyatt's blog the past week and he cited an article from Gamasutra that list some Dirty Tricks that shipped some games.
I don't know how rude/good it is to post references to blogs here. But the things discussed there are pretty funny.
On this topic I will share one experience of mine from college:
We had to create a game in Assembly (our own Assembly language btw ) and apply it to a processor we created using hardware description language and run it on a FPGA board.
Me and my friend were developing a Treasure Hunt kind of game. I remember it clearly... I wrote the moveLeft "method", labeled it and tested.
It worked pretty well, so lets just copy/paste it as moveRight, moveDown, moveUp.
As soon I did this, moveLeft stopped working.
We spent hours trying to debug (there was not much code to debug) and we couldnt find out the problem.
I then had a brilliant idea... lets just swap the code position of moveLeft to moveRight, moveUp or moveDown. Just doing that made moveRight/moveUp/moveDown would break.
We couldn't believe this, the code was breaking because of a specific line (or block). That line, a thousand something, was on strike.
The solution we found: we created a method moveFu** (sorry for the obscenity... college kids) This code didn't do anything and was never called, but we inserted it at the "broken line position". Just like that the movement was fixed.
I honestly don't see why I should ever bother worrying about whether or not a particular set of functions can "see" each other, or whether or not I can make two functions with the same name.
This gets worse when you work on big projects. You can easily lose track of what each part of your code is responsible for and debugging becomes hell. You have to study OOP to understand. And by studying I mean really studying the paradigm, independent of a language. Looking at a language grammar and all its possible sentences you cannot see why something is useful or not, but when you study the concept behind it you start seeing the power each sentence has.
Why would I ever want more code obfuscation like that -- two functions with identical names that can do two completely different operations? Why on earth would I ever want such a thing?
That is your job as programmer to tell. You are the one that decided if overloading a function is necessary and what they will execute. Who said that different implementations of a function should be completely different?
I don't know any good books to teach Object Orientation (maybe someone can suggest one). I had to take a course on that at the university and I thank my teacher for teaching us the paradigm instead of Java or C++.
Note: I am not saying you should use OO on your projects. I am just saying that you should learn it to understand how it works. Knowledge is power in my opinion
I've started a topic on the Lounge a month or two back about the Freedom Engine Their purpose is that your game will be on the cloud, compiled there and then distributed to the right target.
Now, taking consideration what ApochiPiQ said, you can start by prototyping your game idea using Construct2. This is a game maker kind of tool. It is great, simple, powerful, quick and export to HTML5. If you like the tool you can even use it for the final game. But if your intentions are commercial, then you will have to buy the appropriate license.
This article has an example of how one could implemet slopes. And he exemplifies with Megaman as well.
How much I would have to change my now lacking physics
Physics in games is something that needs polish, always. Since you are using C or C++, give a look at Box2D.
Should I focus on something else or keep with the project trying to solve things I just can´t fathom?
You should work on your project until it is fun and you are still learning things. There is no use on battling against a project you don't like. While you do it as a hobby, I believe you have to enjoy what you are doing
If you already know that your game will be multiplayer, it is much simpler (and better) to design it multiplayer in the first place.
You have to organize your entities and relations in a way that makes sense in the multiplayer universe. Otherwise you will end up doing a lot of reengineering at the end, which is much more unpleasant.
Now, if you game features 2 modes -- a single player and multiplayer that are very different and independent -- you can start with a prototype of the single player mode just to test your concept.
Still, keep in mind what we learn in Software Engineering about prototypes: once the prototype is "finished" and tested, throw it away and start writing the game itself from ground zero.
First you have to make sure that when debugging within XCode it is working flawlessly. You said that only the first level is loading, and that is really strange. In my projects, I leave the assets/ folder inside MyApplication/MyApplication (where MyApplication is the name of your project) and it works fine. When building the project, the assets must be copied to the bundle. So make sure that in XCode: 1) Click the Project Name in the Navigation Bar 2) Go to Build Phases 3) Go to Copy Bundle Resources and check if all the resources are listed there. Otherwise click the plus button and add the folder there.
I have never tried using an external resource (except when pulling something from the web and when I was using objective-c). But I think here might be a start for you to look. This is objective-c though.
Now on to the Release build. 1) Check if your build settings are ok (architecture, etc.) 2) In Product -> Build for Archiving 3) If the above build is successful go to Product -> Archive 4) In the window that will pop up: 5) If you are going to release for App Store click the Validate... button 6) Otherwise you can directly click on Distribute and choose Direct Distribute 7) Choose Export As -> Application
That should work... I have tried this with SDL before but not with SFML
I have a hard time putting everything together to make a functional program.
Ha, that is what makes someone a good developer, and that every good developer is aiming.
On programming, reading a book about a language and its structures is easy and does not make you a programmer yet. To assemble all this knowledge in something functional is the tricky part.
So, prepare yourself to practice a lot. Create a lot of simple programs about every single topic you find: pointers, memory management, data structures (lists, stacks, trees...), classes, modifiers, etc. Then you can start assembling this stuff together.
Still, you won't have mastered any of those fields. You will have to learn how to assemble them in a way that is not harmful for your computer: does not leak resources, does not crash, etc.
There is a movie featuring Jackie Chan and Jet Lee where JC says to his apprentice "You have to empty your cup first". Programming is like that: when you think you mastered something (you filled your cup), you have to empty it because there is much more to learn
What L. Spiro tried to say is that if you spent 4+ years working and completing good projects, you will probably end up with a good portfolio that will make your resume' visible as well.
However I don't agree that a Bachelor degree is a waste of time because of that. In college I acquired discipline to study and work hard in areas I didn't have any interest and that gave me great knowledge and experience to deal with problems. In college I got to really work in groups and deal with different kind of people every day (this is a must). I also acquired many, many contacts (networking is a must).
But note this: I had all this wonderful experience because I wanted to. The university doesn't deliver alone all this knowledge/experience to you. You have to work hard, to join groups, to organize and attend different events and have to make those 4+ years of your live fit in more than one line of your resume.
I have applied for a position at Microsoft (US) recently and in their model of resume they had: - One line for you degree - One line for your GPA - A section for your Major School Projects - A section for your Awards and Leadership Those two sections will be filled pretty easily with your 4+ years of college experience.
A second note: At Valve, for example, many job positions (e.g. Software Engineer, System Engineer) have a requirement "Bachelor's degree in computer science, information technology or equivalent" or "Bachelor's degree in computer engineering or applied mathematics (or equivalent)". Positions like Web Designer and Level Designer do not require a BS.
Conclusion: you have to know what kinda of work you want in the job industry. If you want a artistic/designer role, maybe a BS in Computer Science is not the best option. But if you want to work in the systems and core engineering of companies/studios like Microsoft and Valve a BS may be a requirement
A static method has access to all parts of the class. What it doesn't have is a `this' pointer, but if it handles any instances of the class, it has full access to those instances, not only through the public interface. Think of the `dot' example that Lauris posted above.
Ah, I was just talking about basic (non-static) variables declared in the class. Like in the following example:
static int var2;
var1 = 1;
static void printVar()
printf("var1: %d\n", var1);
printf("var2: %d\n", var2);
int MyClass::var2 = 2;
int main(int argc, char *argv)
The first printf() inside the printVar static method refers to a non-static variable declared in the class. As result it yields the following error: error: invalid use of member 'MyClass::var1' in static member function
If you comment that line, it will work fine with the static variable var2.