BEEF UP MY JAVA/C/C++ KNOWLEDGE AND EXPERIENCE
Posts
author=supremewarriorThe stuff before the :: is the namespace. That way, if you have several classes with the same name but from different namespaces, you can differentiate them using the ::author=KhosI'm not that great in C++ but I always see code with :: I am wondering what does it mean? Thats also pretty damn easy to display a window with an image on it, it seems easier than I thought but what about key presses, animation, sound, moving from one room to another?
If you want to jump into graphical stuff face first then I would suggest: http://www.sfml-dev.org/
Even if you don't know what you're doing, if you have graphics you will be much more motivated to learn, I was anyway.
It's really easy to use too, for example, have some C++;That's all it takes to create a window and draw an image;#include <SFML/Graphics.hpp> int main() { sf::RenderWindow window(sf::VideoMode(800, 600), "SFML window"); sf::Image image; if (!image.LoadFromFile("a_sprite.png")) return EXIT_FAILURE; sf::Sprite sprite(image); while (window.IsOpened()) { sf::Event event; while (window.GetEvent(event)) { if (event.Type == sf::Event::Closed) window.Close(); } window.Clear(sf::Color(0,0,0,255)); window.Draw(sprite); window.Display(); } return EXIT_SUCCESS; }
My reason for trying to do maze generation is because I find it's similar to dungeon generation with a few tweaks it could work the same.
EDIT:
At least, I am pretty sure. I haven't coded in C++ since like 2005
Nah, I think you're right. That's how it is in Ruby anyway...
Yeah :: is is the name space operator or static member.
Sound works just like the sprite example above.
As for keys, it's just;
It's just a multimedia library though, so if you want animations and boards you have to make your own classes for that. :p
SFML isn't just for C++ though, It's also for C, D, .net, Python and Ruby.
Sound works just like the sprite example above.
As for keys, it's just;
window.GetInput().IsKeyDown(sf::Key::Up)
It's just a multimedia library though, so if you want animations and boards you have to make your own classes for that. :p
SFML isn't just for C++ though, It's also for C, D, .net, Python and Ruby.
author=Khos
Yeah :: is is the name space operator or static member.
Sound works just like the sprite example above.
As for keys, it's just;window.GetInput().IsKeyDown(sf::Key::Up)
It's just a multimedia library though, so if you want animations and boards you have to make your own classes for that. :p
SFML isn't just for C++ though, It's also for C, D, .net, Python and Ruby.
Wow it's a diverse library and it's easy to use. I've seen code made from scratch and it's a lot more than that. Do you think there's any use in learning SDL and OpenGL right now, concerning game programming?
I've been meaning to join a C++ game oriented programming forum thats helpful and has a lot of members experienced in this sort of stuff.
It would be much more useful to learn SDL/ OGL if you have some use of them, as in are using an engine that lets you use them along side whatever else is set up.
Or if you want to make your own engine.
And here are some sites that may interest you;
http://stackoverflow.com/
You really can't get a better site for programming related questions.
http://gamedev.stackexchange.com/
Related to the first only game oriented.
And of course; http://www.gamedev.net/
Or if you want to make your own engine.
And here are some sites that may interest you;
http://stackoverflow.com/
You really can't get a better site for programming related questions.
http://gamedev.stackexchange.com/
Related to the first only game oriented.
And of course; http://www.gamedev.net/
I really want to finish off my maze generation but I have no clue with some of the concepts...
One really important question when it comes to programming. In my CS degree we are taught to separate tasks into different methods and classes if it's a completely different sub-part of the program altogether, however I find it is easier most of the times to work within one class and have separate methods for different tasks and sub-parts.
How often does this concept hold when you are programming?
One really important question when it comes to programming. In my CS degree we are taught to separate tasks into different methods and classes if it's a completely different sub-part of the program altogether, however I find it is easier most of the times to work within one class and have separate methods for different tasks and sub-parts.
How often does this concept hold when you are programming?
You really should get in the habit of using objects. It does take more time with the trivial problems given in school assignments but for any large scale project objects are the start of keeping project code manageable. Best to practice and get some experience with small projects first than getting overwhelmed with a big one later.

















