Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - vaironl

Pages: [1]
1
SFML projects / Re: Embarrassing Project
« on: December 15, 2012, 03:49:20 am »
Creating a GUI-system is actually a great practice for learning both C++ as well as a simple library like SFML. Create "widgets" in classes like TextInput boxes, Labels, Buttons etc, in a way that makes them reusable.

 :o... When I was searching the sfml docs I din't find any textinput options... I guess I din't try hard enough.

2
SFML projects / Re: Embarrassing Project
« on: December 14, 2012, 05:15:24 pm »
Is your application purely GUI ?
If yes I think SFML is not the best library for you...

Well.. yes and no.
As I said this application is a console application made so I can learn c++ itself. I'm just trying to make a GUI to add some visual to it (although it's not required).
I want to learn SFML to make games.

3
SFML projects / Embarrassing Project
« on: December 14, 2012, 05:43:10 am »
Hello again Everyone,

As few of you know I'm new to SFML and relatively new to c++. With some previous experience in java.
I'm learning c++ through book reading and console applications.

But today while reading I seriously felt like I wanted to add some color to my progress, and I took all advice I was given aside and started to program in SFML. I din't try to go into the complicated stuff or anything like that... rather I tried porting one of my console applications into a GUI application. Sadly I only got to do rectangles,text labels, and images. I feel that for my very first application, following only documentation and no tutorials, I did somewhat well... it's really basic stuff so please don't laugh at me.

Here's a picture of the screen.


4
General / Re: Transferring from java to C++
« on: December 13, 2012, 07:54:38 pm »
Well I believe all questions I've had at the moment have been answered.
I will try to learn as much is I can and I hope i can soon make my first SFML app   :D.

Thanks again, Everyone.

5
General / Re: Transferring from java to C++
« on: December 13, 2012, 04:51:01 am »
Quote
Collection of data, memory management, classes, garbage collection, windowing system, polymorphism, inheritance?
Not sure what you mean by first, second and third - yes, but use smart pointers for your memory managment, 99% chances are that you won't implement better memory managment no matter how hard you try, last two too. But c++ doesn't contain built in garbage collector and windowing system(??)/gui of any kind.
Read these two FAQs from Bjarne Stroustrup(original designer and crator of c++), they're great and contain important information about macros, casts and (lack of) garbage:
http://www.stroustrup.com/bs_faq.html
http://www.stroustrup.com/bs_faq2.html

Sorry... I have a tendency to not explain myself very well.
By collection of data I mean vectors.
I thought I had to do memory management myself, which I guess in a way I do, but the other post and your own have answered this.
What I meant was that before I start learning something like SFML, should I learn how to use a windowing library (Pardon me if that is not the correct term)?
Garbage collection is something I seen in other post that must be done although I have no idea of how it works.

Thanks for the information!

6
General / Re: Transferring from java to C++
« on: December 13, 2012, 03:26:11 am »
vaironl, I hope you're not reading "The C++ Programming Language". That's a reference book by Bjarne. "Programming: Principles and Practice Using C++" is the better choice.

Good for me I have "Programming: Principles and Practice Using C++"    :D

The reason for this is because the book "The C++ Programming Language" is a good book if you know some C++ or at least C, if you don't then all you will do is get confused with it.

Quote
And one should especially learn what RAII is, as it will make memory and resource management a lot simpler. Using manual memory management with new and delete is mostly bad practice.

I forgot to cite RAII, thank you for pointing it out.

As a side note, if you get into RAII then try to learn normal pointer and memory management first, not for using them in a practical way (that's pretty much the reason why RAII is awesome), but to know how they work and what RAII does underneath.

By the way I know is a stupid question, but what would be "The stuff" I'd have to learn?
Collection of data, memory management, classes, garbage collection, windowing system, polymorphism, inheritance?

I already want to get started , really bad :'(.

7
General / Re: Transferring from java to C++
« on: December 09, 2012, 02:54:27 pm »
vaironl, I hope you're not reading "The C++ Programming Language". That's a reference book by Bjarne. "Programming: Principles and Practice Using C++" is the better choice.

Good for me I have "Programming: Principles and Practice Using C++"    :D

8
General / Re: Transferring from java to C++
« on: December 09, 2012, 05:08:45 am »
Quote
I'm transferring from Java to c++, and I know that it sounds off-topic but I do come to ask some questions SFML related as well. I actually asked this same question, in some way, in another forum and got suggested to start with SFML rather than openGL or SDL.

And you got a good suggestion, but an even better one would be to start learning only C++ first, I come from Java myself and the change is incredibly big, since you don't use destructors, pointers, references and no garbage collection means that you have to be careful with scopes of variables and what you send to heap memory.

Java is a higher level language than C++, which pretty much abstracts you from a lot of what goes on underneath and learning all that takes time. In my opinion it's too much to learn C++ while trying to learn SFML as well. Also note that SFML tutorials and most material require you to know your basic C++, so I'd suggest you take your time with a C++ book first and then once you have a handle of things you can use SFML without as many problems or doubts later.

Quote
Lately I've gotten interested in video games and similar graphic applications. I understand I can do it in Java, and did so. But I want to try it in c++ for fun and to see performance differences.

Performance will be better, don't doubt it, C++ is much faster than Java.

Quote
Any advice that can be given on whether I should first make those "Beginner" applications.. relearn about using classes, and core topics in c++ (Which I will obviously have to do sooner or later)... or could I just jump straight into making graphic applications?

As stated above, you better avoid it and learn C++ well before going into graphic applications.

http://en.wikipedia.org/wiki/Comparison_of_Java_and_C%2B%2B#Design_aims

Most of the examples there are reliable, I haven't read it all so I can't tell if there's anything that's not, but it seems like a good read to get into C++ from Java. Good luck.

As said in the post I asked this before and got very similar answers, but wanted to make sure I headed the right way.
I have a c++ book made by the creator of c++ himself I will learn as much as I can from it, thanks again for the advice.

9
General / Transferring from java to C++
« on: December 09, 2012, 03:53:31 am »
Hello Everyone,

I'm transferring from Java to c++, and I know that it sounds off-topic but I do come to ask some questions SFML related as well. I actually asked this same question, in some way, in another forum and got suggested to start with SFML rather than openGL or SDL.

I also got suggested to do console c++ programs. But let me explain more about my background and the situation.

I've been programming in Java for about 1.5 year. I actually started learning c++ but had to stop, because my IB Computer Science required Java. Lately I've gotten interested in video games and similar graphic applications. I understand I can do it in Java, and did so. But I want to try it in c++ for fun and to see performance differences.

Any advice that can be given on whether I should first make those "Beginner" applications.. relearn about using classes, and core topics in c++ (Which I will obviously have to do sooner or later)... or could I just jump straight into making graphic applications?

Thanks, for any advice.

Pages: [1]