|
Vidi44 |
Posted 26th Jan 2006 2:03am |
L4Y Member Post 553 / 668
 |
Irrlicht is used by including the header files in the Include directory, the dll in the Bin directory (have to go through appropriate subdirectory first), and the two (one for Linux) files in the Lib directory (you'll have to go through the appropriate subdirectory first). All you do is throw these files in the appropirate place (headers in the Include file of your compiler, dll in the bin directory of your compiler, and the lib files in the appropriate lib directory (I could tell you all the places for the files if you're using Dev-C++ or Sally -A Simple C++ IDE (coincidentally, Sally came out with an update about a month ago, somehow I missed it. If you have a version other than 2.5, you might want to upgrade to take advantage of Sally's new stability and GUI enhancements).
So far, L4Y's little Irrlicht community has posted nothing on using it, but we're still dissecting the source and examples. However, anything we learn will be used to create future programs, so in the end, it's all good.
I hope you know that professional game development can take years. By the time you're finished, you'll be about 18 and shouldn't have any trouble finding someone to host it for your (or point you to a cheap server. There are even free servers you can use, so long as your game doesn't become too popular ).
GamesBasic is this new thing I found awhile ago. I don't remember the link, but just google it. Its something similar to DarkBasic, except that its free and in beta still.
Perhaps we should make a separate section in L4Y for game development. We could combine the people from Irrlicht (many of whom have read this thread already, so that shouldn't be difficult), and we'd have a good 10 people interested in it. That's plenty for a small game to be made (so long as the GUI isn't too complicated, of course. Even so, some of the great RF mod creators (who are used to using Max) could chip in (I can't say much on other sections, as I don't frequent them)). |
"Don't go there. It's ugly, and it never stops being ugly."
"Naps are good" - Visual C++.NET for Dummies, page 1 |
|
|
modmaker91 |
Posted 26th Jan 2006 3:28pm |
L4Y Member Post 170 / 407
 |
Mbay L4Y should make a gaming section...I hope Garner reads this.
Mabey we could use my idea, a Lego GTA? |
Let those who don't understand me, fear me. Let those who understand me, fear themselves. |
|
|
Cptchaos |
Posted 27th Jan 2006 1:17am |
L4Y Member Post 102 / 104
 |
I would use C++ because I know that is easy. I am currently learning visual basic in one of my High School classes and it is extremely simple, then my friend showed me some stuff he has programmed in C++ and it's all basically the same, plus there are free C++ programs out there that you can use to write and learn programs. Also if you have or can buy FarCry it can be completely modded using C++, so you could start modding that game to learn it. |
|
Modified Jan 27th, 01:23am by Cptchaos |
|
redfac18 |
Posted 27th Jan 2006 1:22am |
L4Y Member Post 45 / 300
 |
Quoting modmaker91 | I am looking for anything really simple to create a C or C++ game. Which ever one is easier.
I am a complete n00b to anything coding. Don't even know what a compiler is. |
well I've heard it is almost impossible to use C++ without knowing the basics of C and the main differance is C++ is more organized by using a standard Libary like the <include>syntax.
You might also look here for starters. |
|
Vidi44 |
Posted 27th Jan 2006 1:34am |
L4Y Member Post 555 / 668
 |
C++ isn't really easy, per se. However, it isn't impossible. C++ is often called the "programmer's language" because it is incredibly cryptic and detailed. Fortunately, that description was written before ANSI 97, which was a major update to the C++ STL (standard library) and syntax. Now, it is managable for non-professionals to teach themselves, and there are more than plenty of tutorials online.
Further, with the sort-of new "Smartwin++" library, you can now create a Windows form-like object in C++. As soon as I get it fully integrated into Sally, I'll have fun (even without complete optimization, Smartwin++ is extremely spiffy and fun to use).
Visual Basic is pretty spiffy, and I don't know why people continue to mock it. Sure, it is simple, but it is also powerful. PC:CE is even being done in VB.NET, so if its good enough for me (and a game dedicated to Garner's great work), it should be good enough for a simple thing (not the Lego GTA that modmaker suggested, as that's pretty far outside of VB's simple-to-use scope (it is probably do-able, but would take so long it'd be pointless)).
I've never seen any C++ programs that teach you how to write in C++, although I wouldn't be surprised if there were (I learned some QBASIC off an interactive tutorial created in Q .
Learning C++ without knowing the basics of C is possible. The only difference between the two is the integration of classes and some advanced features in C++. Elsewise, they are the same save for the syntax (printf() for C, cout for C++; etc). C is actually easy to learn because it has a more natural syntax (instead of cout and cin, you have scanf() and printf()), however C++'s is workable so long as you realize that a lot of the keywords are acronyms and stuff (such as cout, which I speculate as "console out"; and cin, speculated as "console in").
If you'd like to learn C pretty quickly, Dev-C++ has an integrated C manual and tutorial in the help file. Its pretty good and quick-paced, so you can get creating quickly and learn the rest online. Its comparable to many beginner's books. |
"Don't go there. It's ugly, and it never stops being ugly."
"Naps are good" - Visual C++.NET for Dummies, page 1 |
|
|
modmaker91 |
Posted 27th Jan 2006 2:41am |
L4Y Member Post 176 / 407
 |
Ok so I guess I had better learn C before C++ just to make it easier. Does anyone know of any of those?
And I also need a free 3D mesh making file, similar to 3ds max. I searched for Gmax but it isn't supported anymore. I read something while browsing through the Halo forums about something called Milkshake? I dunno I just scanned through the topic, whatever it was. |
Let those who don't understand me, fear me. Let those who understand me, fear themselves. |
|
|
redfac18 |
Posted 27th Jan 2006 4:07am |
L4Y Member Post 47 / 300
 |
Go to this modeling page here for gmax, this is the official page. They don't support it but have it avalible to download. |
|
Vidi44 |
Posted 28th Jan 2006 1:37am |
L4Y Member Post 559 / 668
 |
Quoting modmaker91 | Ok so I guess I had better learn C before C++ just to make it easier. Does anyone know of any of those?
And I also need a free 3D mesh making file, similar to 3ds max. I searched for Gmax but it isn't supported anymore. I read something while browsing through the Halo forums about something called Milkshake? I dunno I just scanned through the topic, whatever it was. |
Know of any what? Tutorials? Just do a google search on "C programming" and you'll get a great number of tutorials. Like I said earlier, Dev-C++ has a great introduction to C programming in its help file, and you get a "free" IDE and compiler for it (rofl, why would someone download the IDE just for a help file? I can mail it to you if you'd like). |
"Don't go there. It's ugly, and it never stops being ugly."
"Naps are good" - Visual C++.NET for Dummies, page 1 |
|
|
cyrus5 |
Posted 28th Jan 2006 3:29pm |
[CP] Director L4Y Member Post 56 / 241
 |
It doesnt matter alot whether you start with C or just C++ as C is a subset of C++. Most of the time there is no great distiction between them, compilers do little to care what you throw at them. The syntax is exactly the same, all C++ really does is introduce templates (which you dont need to learn if you dont want to) and classes. There are a few more standard libraries. There is absolutely no reason why you cannot use the C standard libraries with c++ by the way, I routinely do it as the cout << "Hello world!" << endl; nonsense gets on my nerves and sometimes you need the printf style variable arguament lists. You can either just
include <stdio.h>
or if you want to do it the 'nice apparently C++ standard proper way':
include <cstdio>
Basicly I recommend:
1. Getting the hello world program running
2. play around with input, output
3. write simple functions, and then functions that pass references to variables ( the & symbol )
4. play around with control structures
if ... else if ... else
for loops
while loops
do ... while loops
switch statements
5. play with statically allocated arrays. ( int myarray[10] ). Get your head round the idea that they are indexed from 0 (ie myarray[0] gives you the first item, myarray[9] is the last item).
6. learn that doing myarray[10] is bad since you are reading data that you didnt allocate.
7. Try writing a recursive function to output the fibonacci series
8. Have a play with simple classes
9. Learn overloading
10. the canonical class form (each class write constructor, destructor, copy constructor, and the assignment and comparison operators)
11. learn pointers.
12. learn how to allocate and deallocate objects (classes).
13. learn what a linked list is and how to use it
14. learn how to use the standard template libraries vector and list classes and appreciate that these are better and safer than linked lists.
When you get all that done, then I would say you have a reasonably sound knowledge to start programming. For each stage, think up some sort of program you could make that uses those features. A club membership system is often a good one for learning classes since you will be demonstrating Object oriented design by makeing classes that represent real world objects. (ie a class that represents the club, a class that represents a member, etc).
The next steps after that are to learn what polymorphism is, and how to do it, why to do it, then write a program where you apply it to something.
One thing I will say is that you cannot learn to program in 24 hours like those dreaded books say you can. you can learn the syntax in 24 hours, but you will need to practice programming to really understand it. Set your self the plan of being able to type up a program from a blank text file without having to copy and paste (only needs to be a simple prog). but that will go along way in helping your understanding. when you can do that then the syntax is really comitted to memory and then you just have to think about what the program has to do, instead of what you have to type to make a function.
Best of luck with your learning, if you need any help just give us a PM or send us an email. If your not sure what any terms are, just google them or google (wiki [term]) you'll have no trouble finding stuff. 
/Alex |
Only the dead have seen the end of war - Plato
I think it would be a good idea. - Mahatma Gandhi, when asked what he thought of Western civilisation.
cyrus5.co.uk! |
Modified Jan 28th, 03:30pm by cyrus5 |
|
modmaker91 |
Posted 29th Jan 2006 6:08pm |
L4Y Member Post 178 / 407
 |
CENSORED ?
Mabye this stuff is too complicated for me.
In case you didn't read my first post:
I don't know ANYTHING about coding.
I hope that clears a few things up... |
Let those who don't understand me, fear me. Let those who understand me, fear themselves. |
|
|
cyrus5 |
Posted 30th Jan 2006 12:35pm |
[CP] Director L4Y Member Post 57 / 241
 |
Quoting modmaker91 | CENSORED ?
Mabye this stuff is too complicated for me.
In case you didn't read my first post:
I don't know ANYTHING about coding.
I hope that clears a few things up... |
Hence I gave you a list of things to look up to learn. Unfortunately we are not in the matrix so cannot instantly download stuff into our brains. This requires some effort on our part as a result.
Basicly start with 1. Get yourself a compiler and ide set up, like vidi suggested dev-c++ is a good one. search google for a basic c++ tutorial on how to do a hello world program. that will give you a taste of the c++ syntax and will produce a simple prog that just prints hello world onto the screen. Then the next step is to play with input and output, i dont know, input a number, do something to it and then output it. Then you can add in control structures and write something with some simple logic. Then move onto doing loops. they are all small steps that you should find easy enough to go through. they get harder towards the end, I dont expect you to know what polymorphism is now, but once you have learnt classes, look it up on the net and you will understand it. that list isnt going to happen overnight btw, thats the contents of an entire programming course, its just a logical progression of steps that will show you the way to go.
The first part of the message was aimed at vidi btw, since you dont know C or C++ I doubt you would know what the stuff meant.
I'll start you off. This is the world famous "Hello world" program:
C++
Code |
include <iostream>/* Input Output stream, reads and writes to console window*/
void main()
{
/* Read this line as send Hello world and an end line character to the console */
cout << "Hello World!" << endl;
}
|
Thats It!
How about a program that asks for your name?
Code |
include <iostream>/* Input Output stream, reads and writes to console window*/
void main()
{
char name[255]; /* A variable containing 255 characters */
cout << "What Is Your Name? ";
cin >>name;
cout << "Hello " << name << " Nice to meet you!" << endl;
}
|
I didnt mean to confuse you, was only trying to help! Hence I offered for you to email me if there is anything I can help you with! Feel free to take me up on the offer! |
Only the dead have seen the end of war - Plato
I think it would be a good idea. - Mahatma Gandhi, when asked what he thought of Western civilisation.
cyrus5.co.uk! |
|
|
modmaker91 |
Posted 30th Jan 2006 1:24pm |
L4Y Member Post 179 / 407
 |
Oh ok now I understand. |
Let those who don't understand me, fear me. Let those who understand me, fear themselves. |
|
|
loser |
Posted 31st Jan 2006 3:19am |
L4Y Member Post 13 / 39
 |
Hi Guys. I have been programming PHP for a couple of years now and found the cross over to C++ relatively easy. I started C++ about a week ago after reading this thread. One thing I would like to point out is that the internet is a very bad place for learning good code. In most of the tutorials I tracked down for C++, I found myself debugging them so that they would compile. I too downloaded and am using Bloodshed's Dev-C++.
What I would like to do is offer up some of the elementary C++ code mentioned above - mainly so that you do not go through the mess I had to go through to get things working. Like I said - I am new to C++ and some of the 'easy' concepts still have me asking questions. Hopefully some of the seasoned programmers will able to point out what is infact happening when need be. 
If you have sorted out the HelloWorld I guess it would be time to move onto an If Statement...
If Statements
Code |
// Include a standard library header file
// iostream.h is the name of the header file containing the library
// It has been convention that all inclusion files have a name that
// ends with '.h'. I think the draft standard has abolished this
// and the '.h' is simply left off
include <iostream>// For using cin and cout
// I need more clarification on the std namespace
// but assume it is for using the C/C++ standard library
// From memory I had trouble compiling without 'using a namespace'.
using namespace std;
// All C++ programs must contain a main() function.
// When the program is run, execution will begin in this function.
// The empty parenthesis indicate it is a funciton with no parameters
int main()
{
// a variable
int age;
// asks for age
cout<<"Please input your age: ";
// the input is put into the variable age
cin>>age;
// ignore the Enter keypress
cin.ignore();
// the if statement
if ( age < 100 )
{
cout<<"You are young!\n";
}
else if ( age == 100 )
{
cout<<"You are old!\n";
}
else
{
cout<<"You are really old!\n";
}
// Exits the program on Enter
cin.get();
}
|
I keep losing all my formatting in the forum 'code' tags. Check out Cyrus' code for indenting lines. |
"Sometimes you kick, sometimes you get kicked." - Hutchence |
Modified Jan 31st, 03:24am by loser |
|
cyrus5 |
Posted 31st Jan 2006 12:12pm |
[CP] Director L4Y Member Post 58 / 241
 |
Good point on the namespace! Forgot about that. Alot easier than having to do
std::cout << "BLAHH!" << std::endl;
The reason is one of the more recent c++ revisions decided that all standard libraries were to be wrapped in the std namespace to avoid causing problems with 3rd party libraries. Microsoft caught up with Visual Studio .net, I think Visual studio 5 and 6 didnt require the namespace declaration.
Sorry for confusing you modmaker, I've been programming for too long, I forget how alien it looks when you first see it! Nicely commented code btw Loser!
1year faffing + 2year A-Level CS + 3 yr Uni + 1 Year Demo writing + 2 years working (coding video decoders, opengl and openvg drivers!) == 8-9years of serious coding! thats over a third of my life! Ow... Just as well I'm planning to escape to Australia in June to get away from computers for a while, planning to come back to the UK when the money/visa runs out (sometime int 2007)! REALLY looking forward to it! Finally have money, and now I'm going to give up a good job and blow it all! Sweet!
Next installment 
Code |
include <iostream>// For using cin and cout
using namespace std;
int main()
{
// a variable (initialised to zero)
int numberOfSmileys = 0;
// asks for age
cout << "How happy (stoned) are you [Enter number between 1 and 10]: ";
// the input is put into the variable age
cin>>numberOfSmileys;
// ignore the Enter keypress
cin.ignore();
// Well use an if statement to check that the number is
// less than 1 OR ( the || symbol ) greater than 10
if ( numberOfSmileys < 1 ||
numberOfSmileys >10 )
{
cout << "You cant read simple instructions can you!?! " << endl;
}
else
{
// We will print out a load of smileys using a while loop.
// The while loop has a condition that evaluates to true or false,
// this is checked before the code inside the { } curly brackets is executed,
// this continues until the condition fails, at which point the loop exits
// and the code continues from after the final brace.
//
// the condition is a boolean condition. C++ has a type called bool which can have
// 2 values, true, or false.
//
// There are a few logic opperators to use:
//
// == : EQUALS comparison 1 == 1 is true. 1 == 0 is false
// != : NOT EQUALS 1 != 0 is true, 1 != 1 is false
// || : OR this compares 2 logical statements, if either is true then the result is true
// && : AND this compares 2 statements, if both are true then the result is true
// < less than
// >greater than
// <= less than or equal to
// >= greater than or equal to
//
// for example
//
// if cat is not the same as a dog and 2 + 2 is 5
//
// (CAT != DOG) && (2 + 2 == 5)
cout << "Using a while { ... } loop" << endl;
// While the counter is less than or equals to the number Of smileys
// print smiley!
int counter = 1; // (1)
while ( counter <= numberOfSmileys ) // (2)
{
// prints out
// 1. 
// 2. 
// etc.
cout << counter << ". " << endl;
counter = counter + 1; // (3)
}
// Now We will do the same thing using a For loop instead.
// there are 3 'mini statements' in a for loop, each seperated
// by a semi colon ( the first is the initialisation condition noted as (1) above
// in this case we start our counter from 1. the second is the
// terminating condition (2), counter <= numberOfSmileys, and the final one
// is the per loop increment (3). As you can see a for loop is exactly the same as a while loop
// just all the loop code is kept on one line.
cout << "Using a for loop" << endl;
for ( counter = 1; counter <= numberOfSmileys; counter = counter + 1 )
{
cout << counter << ". " << endl;
}
}
// Exits the program on Enter
cout << "Press Enter to Exit\n";
cin.get();
}
|
You can download the sourcecode files here: (while my pc is on, which is most of the time!)
http://cyrus5.no-ip.com/progs/helloworld.cpp
http://cyrus5.no-ip.com/progs/example-if.cpp
http://cyrus5.no-ip.com/progs/example-loops.cpp |
Only the dead have seen the end of war - Plato
I think it would be a good idea. - Mahatma Gandhi, when asked what he thought of Western civilisation.
cyrus5.co.uk! |
Modified Jan 31st, 12:54pm by cyrus5 |
|
Vidi44 |
Posted 31st Jan 2006 11:08pm |
L4Y Member Post 563 / 668
 |
Nice to see you finally remembered to tell him a statement in C/C++ must end in a semicolon ( . I've had many a problem trying to program whilst forgetting the dreaded semicolon. Like someone once remarked: Don't learn BASIC. Anyone who learns BASIC will have almost NO chance of becomming a real programmer. While I doubt this, I see where he got the idea from (because BASIC doesn't require an end key (the semicolon) to signal the end of a line; it doesn't need namespaces or headers; and it doesn't require braces ({ }), which many other languages do).
Anyway, nice commenting. I learned more in 5 minutes than I did in reading pages of tutorials.
Just remember, it is best if you initialize (set the value) of your variables as you declare them. For some odd reason, there's the chance that not initializing int number to 0 before setting a value to it would ruin it. I've had this happen to me for no known reason. Any explanation, or is it just the compiler I was using (well, that's probably true, although I should've tested it in both compilers before I modified it; instead of changing it then switching compilers like I did)? |
"Don't go there. It's ugly, and it never stops being ugly."
"Naps are good" - Visual C++.NET for Dummies, page 1 |
|
|
Page 2 Multiple Page Topic : 1 2 3 |
    |
|
|
|