Ok I Am A Noob. How Can I Contribute To Development Games Software And


Actually, I think the runtime libraries are JUST for runtime. You need the headers, too.

http://www.libsdl.org/download-1.2.php
Yeah, now that I look at it, programmers need the "development libraries", not the "runtime libraries".
 
lulzfish said:
Actually, I think the runtime libraries are JUST for runtime. You need the headers, too.

http://www.libsdl.org/download-1.2.php
Yeah, now that I look at it, programmers need the "development libraries", not the "runtime libraries".

Yup, I'm following Lazy Foo's tutorial and now I've got all the files needed :D

Thanks for the help! :)

EDIT: Oh my word I'm getting frustrated <_<
Can anyone help me with step 10 of this tutorial? :Link
I have no clue about how to add that source file code thing :p

Thanks to anyone who can help :)
 
Last edited by a moderator:
You just create a new empty file (File -> new -> Empty file or just click the new file icon located right under the file menu )
Now it will ask you to name the file, name it something like myfistapp.cpp or the all time favorite main.cpp :)
And there you go.
 
Dimacus said:
You just create a new empty file (File -> new -> Empty file or just click the new file icon located right under the file menu )
Now it will ask you to name the file, name it something like myfistapp.cpp or the all time favorite main.cpp :)
And there you go.

But what about step ten, when after I've created a new empty file, it says :

Add a new source file to the project with the following code:
#include "SDL/SDL.h" int main( int argc, char* args[] ) { //Start SDL SDL_Init( SDL_INIT_EVERYTHING ); //Quit SDL SDL_Quit(); return 0; }
Save the source and compile your project. If there are no errors, you're done. Otherwise go back and make sure everything is done. Double check that you have SDL.dll in the same directory as your exe or system32.

I don't know where to add that code into.
 
Last edited by a moderator:
Well, it should have asked you if you wanted to include the new empty file into your project when you tried to create it.
After you had decided on the name and saved it, a box popped up, asking you to which 'targets' the new file should belong to.
You had two boxes which you could check a couple of buttons on the side and a OK and a Cancel button at the bottom.
You should have checked both boxes and then pressed OK.

At this point the file should be open in the main window of code blocks, and you would just have to copy-paste
Code:
#include "SDL/SDL.h" 
int main( int argc, char* args[] ) { 
      //Start SDL 
   SDL_Init( SDL_INIT_EVERYTHING );
      //Quit 
   SDL SDL_Quit(); 
   return 0; 
}

into that window.

There, now you have added a source file with program code in it.
And it should look like this:

cb.png


If you did not check both boxes but none of them, you need to add the file to the project.
You do this by right-clicking on your project (in the window to the left named Management, your project's name should appear, this is your project, in the image above, it's "abab") and select "Add files..." and add your file.
 
Dimacus said:
Well, it should have asked you if you wanted to include the new empty file into your project when you tried to create it.
After you had decided on the name and saved it, a box popped up, asking you to which 'targets' the new file should belong to.
You had two boxes which you could check a couple of buttons on the side and a OK and a Cancel button at the bottom.
You should have checked both boxes and then pressed OK.

At this point the file should be open in the main window of code blocks, and you would just have to copy-paste
Code:
#include "SDL/SDL.h" 
int main( int argc, char* args[] ) { 
      //Start SDL 
   SDL_Init( SDL_INIT_EVERYTHING );
      //Quit 
   SDL SDL_Quit(); 
   return 0; 
}

into that window.

There, now you have added a source file with program code in it.
And it should look like this:

cb.png


If you did not check both boxes but none of them, you need to add the file to the project.
You do this by right-clicking on your project (in the window to the left named Management, your project's name should appear, this is your project, in the image above, it's "abab") and select "Add files..." and add your file.

Thank you so much :) I did'nt check the two boxes but now I have and got the code up on it :)

But I noticed the folder sources and the file called "untitled 1". Is that just a text document with the code? (again I'm probably being really stupid right now :/ )

But thanks again so much for the help!
 
Last edited by a moderator:
Oh, cool thank you :)

Also I can't debug, it tells me to go to settings/compiler and debugger, and go to the "programs" tab...I can't find it.

EDIT: Ok I found the tab, but I still can't debug nor can I compile...It says my project is using an invalid compiler, and then skips the process.
 
You can try this open source game creation software: http://www.scirra.com/

Don't know if it is able to create games which run on the pandora.
 
In Compiler and debugger, how does your Toolchain tab look?
Dose it look somewhat like this?
cb2.png


or are the text fields just blank?

What file did you download to install codeblocks?
Was it something like codeblocks-8.02mingw-setup.exe ?
Or didn't it have the mingw part in the filename?

If it did have the mingw part in it, and above mentioned text fields are blank, try to remember where you installed codeblocks, and write that path into the text field that contains 'C:\Program Files\CodeBlocks\MinGW' in the picture, then press autodetect.

if it didn't have the mingw part in the filename, you need to download the correct one http://prdownload.berlios.de/codeblocks/codeblocks-8.02mingw-setup.exe and re install codeblocks.

If you however have windows vista, they (the creators of codeblocks) advice that it may not work, and if that is the case you could try to install a newer mingw.
You can do that by running this http://downloads.sourceforge.net/project/mingw/Automated%20MinGW%20Installer/MinGW%205.1.6/MinGW-5.1.6.exe?use_mirror=freefr installer.

If that is the case, install it into a subdirectory in the codeblocks directory called mingw.
When the installer asks you which parts you want to install select "MinGW base tools", "g++ compiler" and "MinGW make".

Now, go back to the compiler and debugger settings and the toolchain tab and fill in the path to where you installed mingw and press autodetect.
 
Dimacus said:
In Compiler and debugger, how does your Toolchain tab look?
Dose it look somewhat like this?
cb2.png


or are the text fields just blank?

What file did you download to install codeblocks?
Was it something like codeblocks-8.02mingw-setup.exe ?
Or didn't it have the mingw part in the filename?

If it did have the mingw part in it, and above mentioned text fields are blank, try to remember where you installed codeblocks, and write that path into the text field that contains 'C:\Program Files\CodeBlocks\MinGW' in the picture, then press autodetect.

if it didn't have the mingw part in the filename, you need to download the correct one http://prdownload.berlios.de/codeblocks/codeblocks-8.02mingw-setup.exe and re install codeblocks.

If you however have windows vista, they (the creators of codeblocks) advice that it may not work, and if that is the case you could try to install a newer mingw.
You can do that by running this http://downloads.sourceforge.net/project/mingw/Automated%20MinGW%20Installer/MinGW%205.1.6/MinGW-5.1.6.exe?use_mirror=freefr installer.

If that is the case, install it into a subdirectory in the codeblocks directory called mingw.
When the installer asks you which parts you want to install select "MinGW base tools", "g++ compiler" and "MinGW make".

Now, go back to the compiler and debugger settings and the toolchain tab and fill in the path to where you installed mingw and press autodetect.

Dimacus...


You are God B)
 
Last edited by a moderator:
rohezal said:
You can try this open source game creation software: http://www.scirra.com/

Don't know if it is able to create games which run on the pandora.

Clicking learn more on their home page will give you the answer. In fact, it's the very first sentence:
"Construct is a free, DirectX 9 game creator for Windows," I'll stop there, as that says it all. Sorry, but Scirra Construct will not work for you if you plan on developing for the Pandora.
 
Last edited by a moderator:
I didn't realize Allegro was a wrapper for SDL. I thought it was a substitute for it. I've stayed away from it because SDL seemed more flexible. But if they're related, maybe I'll check it out.

@ Wade-newb: You say you are a photographer. A visual arts background would be helpful if you wanted to create assets for video games.
 
Wade-newb said:
I'm probably going towards C++ without even knowing it. Any recommendations?
Nevermind, that'll be fine. Now that I've thought about it, it's probably a good place to start. Finding examples should be cake and it should do a good job of teaching you to pay attention to details. For example, the difference between a working program and one with a segmentation fault can be as simple as writing "=" instead of "==". It probably took me a half hour to find that one, last time. The best part is that the compiler can't catch that for you.

Anyways, have fun! :lol:
 
Last edited by a moderator:
Mr.Confuzed said:
The best part is that the compiler can't catch that for you.
Well, there's a "best practices" thing that says that you should declare every variable you can as const. This makes it almost impossible to get an error like the one you described. I never use non-const variables except in loops and for by-reference parameters.
 
Last edited by a moderator:
Mr.Confuzed said:
(quote)

Nevermind, that'll be fine. Now that I've thought about it, it's probably a good place to start. Finding examples should be cake and it should do a good job of teaching you to pay attention to details. For example, the difference between a working program and one with a segmentation fault can be as simple as writing "=" instead of "==". It probably took me a half hour to find that one, last time. The best part is that the compiler can't catch that for you.

Anyways, have fun! :lol:

Thanks for everything man :)

and @ Gerix: Thank you as well, that's a very interesting and appealing suggestion :D
 
Last edited by a moderator:
dflemstr said:
Well, there's a "best practices" thing that says that you should declare every variable you can as const. This makes it almost impossible to get an error like the one you described. I never use non-const variables except in loops and for by-reference parameters.
Code:
if (Texture == NULL)
I suppose you could turn that into this:

Code:
if (const bool condition = Texture == NULL)
But that's just ridonkulous!

Thanks for the tip though, I'll try to remember that. :)
 
Last edited by a moderator:
Mr.Confuzed said:
Code:
if (const bool condition = Texture == NULL)
But that's just ridonkulous!
Well yes, but I think he was more talking about making function parameters constant and all local variables (in case they are not used for loops), like this
Code:
void function DoSomething(const int index; const string param) 
   {
      const int MAX_INDEX = 10;
      for (int I = MAX_INDEX; i != index; --I)
      {
         cout << param << endl;
      }
   }
(Note this code makes no sense, apart from showing the point of constants)
As you can see the passed parameters index and param are declared const as they don't need to be changed in the function (as is MAX_INDEX). The loop variable I on the other hand must not be const (for obvious reasons).

Another good practice is to not use any constants (which are not declared somewhere) apart from 1 and 0 (well... you don't have to be that strict), so you don't write
Code:
if (param <= 100)
but
Code:
const int MAX_INDEX = 100; 
// or
#define MAX_INDEX 100
[...]
if (param <= MAX_INDEX)
That way boolean checks get more readable for external coders (as the name of the varaibles shows what is actally checked) and in case you have to do the same check multiple times, you can easily tweak the value when you want to increase the limit for example - you don't have to search your code for these checks and change each value individually.


foxblock out
 
Last edited by a moderator:
Back
Top