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

Author Topic: SFML and c++ or sfml only  (Read 6035 times)

0 Members and 1 Guest are viewing this topic.

foodman

  • Newbie
  • *
  • Posts: 21
    • ICQ Messenger - 570393595
    • View Profile
SFML and c++ or sfml only
« on: May 28, 2010, 01:56:00 pm »
If i want to create a snake game. with very simple 2D graphics

Does C++ will perform any role in it or just SFML programming will do?

Walker

  • Full Member
  • ***
  • Posts: 181
    • View Profile
SFML and c++ or sfml only
« Reply #1 on: May 28, 2010, 02:02:07 pm »
SFML is what's known as a library. http://en.wikipedia.org/wiki/Library_%28computing%29

You need to make a program in a language that SFML (the 'L' is for Library) supports.

C++ is a common choice and a good one too, but most people will recommend something else for a beginner. You could try Python. SFML for Python has just been updated to the latest version (1.6).

SFML also supports .Net languages as well as C, D and Ruby, but I'd give the last three a miss.

Whatever your choice, get atleast a little bit familiar with the language and then check out the tutorials page.

foodman

  • Newbie
  • *
  • Posts: 21
    • ICQ Messenger - 570393595
    • View Profile
Yes
« Reply #2 on: May 28, 2010, 03:40:31 pm »
I know that it is not a language and It is only a library

But I have not ever tried any library.

I have learned almost full c++

And I also have not tried any game yet.

So I want to ask that do c++ programming is required to make a snake game or just library is OK

Like the library commands provide how to move snake and all

I am actually going through the tutorials and have a question about SFML spirits which i am going to post in appropriate forum

So what u think do c++ programming is required or only SFML codes are enough.

Mr. X

  • Jr. Member
  • **
  • Posts: 80
    • View Profile
SFML and c++ or sfml only
« Reply #3 on: May 28, 2010, 06:08:06 pm »
Quote
I have learned almost full c++

No, you have not.

As far as I see your words, maybe its a good idea for you to stay with the console next weeks, because you do not know, that programming something with a GUI (like snake) is not in the scope of standard C++. You will need librarys for Snake.

foodman

  • Newbie
  • *
  • Posts: 21
    • ICQ Messenger - 570393595
    • View Profile
SFML and c++ or sfml only
« Reply #4 on: May 28, 2010, 06:25:37 pm »
Quote from: Mr. X
Quote

As far as I see your words.


Dont consider my language I am not English or British so I am not fluent English man.

And I am just studying c++ at one full year and I was first among all the students,I don't like to tell everybody that.

But I guess when people tell me something like you I have to tell them.

Now for library thing.

If you know much you should know that libraries are a part of language and Not teach When you are learning a language after that when you master that language you are told to learn additional libraries At least Thats what my Professor said to me

He also said that We will be learning SDL next year at the moment I have vacation so I thought I should start learning some library on my own and i choose this because people say it is simple and best one

If your not giving answers please don't replay with harsh words, with overconfidance

Mr. X

  • Jr. Member
  • **
  • Posts: 80
    • View Profile
SFML and c++ or sfml only
« Reply #5 on: May 28, 2010, 09:49:45 pm »
I was not complaining about your English, its probably better than mine. I was just talking about the content of your post, not on the grammar.

What I tried to say: If you did not experienced that C++ does not support any GUI, you should continue learning it. And learning its basics is usually done in the console. C++ does not know anything about a graphical device.

Quote
And I am just studying c++ at one full year and I was first among all the students,I don't like to tell everybody that.

It is impossible that you have learned "almost full C++" after programming in C++ for one year. Also if you are talking about five years I would not believe you. I do not say that I know full C++. There is everytimes something new or aspects that can be viewed from more sides than just one.

Quote
If you know much you should know that libraries are a part of language

I am not sure what you would like to tell me.
If you want to say, that there are libraries inside the standard, I answer: Yes, the STL and the C standard library. But both does not provide support for graphical output.
If you tried to express, that it is part of the standard or that it is conform with the standard to create libraries i say: It is not. It is neither denied nor allowed. The OS and the compiler define what code should be generated. And that could be Libraries. There is no standard about dynamic link libraries for example.
Libraries help you to use a language, but you could also write the full content of a library into the code of your "main project". (Linking a library statically is not much different)

Quote
you are told to learn additional libraries

"Learning a library" (What means that you are learning what functions are usefull in what case and what can be done with this library) has often nothing to do with learning a language. Especially if you are "learning" SFML.

Quote
If your not giving answers please don't replay with harsh words, with overconfidance

I am sorry, but I just tried to give you a hint that it is at the moment maybe not the best idea to start with graphical output. Your questions seemed to me like you are thinking that SFML is a language. SFML is written in C++ and it can be used with C++ (and other languages)


Quote
He also said that We will be learning SDL next year at the moment I have vacation so I thought I should start learning some library on my own and i choose this because people say it is simple and best one

In my view people are right, because i think that SFML is a very good library. But if your professor will teach SDL next year you should maybe start with it because the design of the two libraries is different. I am just afraid that you will hate SDL if you have done too much with SFML ;)

foodman

  • Newbie
  • *
  • Posts: 21
    • ICQ Messenger - 570393595
    • View Profile
SFML and c++ or sfml only
« Reply #6 on: May 29, 2010, 07:04:37 am »
Well I am so sorry to replay in harsh words

I was very excited to learn something new. I mean after learning c++ for a whole year without any other language or subject. It was very deep study

We even studied a graphic library provided by borland c++ 3.0 . It is retro or outdated stuff And it does provide graphics in console so , I don't know that you was know this or not because our professor told us that It is a really OLD and ANTIC Thing Which was like a Epic fail. It was used in some old dos programs but Because of its large bugs and And crashes it was closed

The header to be included was something like <graphics.h> And we have to write draw a yellow line (x , y) and many more weird things

So my main point was/is I learned c++ a whole year( And I know it is not complete , As it is changing continuously) and I know that It doesn't support any kind of GUI

But Because I don't know what library is ( I was only knowing that this SFML is written in c++ Read in Wikipedia =p)

 I was trying to ask that  Like if I want to write something like a small game say snake  in Visual C++ 2008 compiler (and because I have not used any library's yet ) So does it also need to be programmed by c++ or only this library is enough like that

But now as u told me that C++ only provide console programming and not graphics Hence I think it is not to be used. And only SFML will do work

And these all things are for fun as My vacation is running And I really want to do some thing graphical before my next year starts  :D

Mindiell

  • Hero Member
  • *****
  • Posts: 1261
    • ICQ Messenger - 41484135
    • View Profile
SFML and c++ or sfml only
« Reply #7 on: May 29, 2010, 09:22:34 am »
Quote from: "foodman"
But Because I don't know what library is ( I was only knowing that this SFML is written in c++ Read in Wikipedia =p)
A library is a bunch of functions. You can use it like you are using any functions of C++.

Quote from: "foodman"
So does it also need to be programmed by c++ or only this library is enough like that
nonsense question. You program will be in C++, the lib is just a lot of objects and functions to use them. So if you use SFML, you'll be able to use its functions.

Quote from: "foodman"
But now as u told me that C++ only provide console programming and not graphics Hence I think it is not to be used. And only SFML will do work
nonsense again, SFML is C++. You have to use C++ only,

Quote from: "foodman"
And these all things are for fun as My vacation is running And I really want to do some thing graphical before my next year starts  :D
Ok, let's try to read some things about 2D graphics on the internet in order to have a better comprehension of all those stuff. SFML will simply help you to do things :
- wikipedia, try : double-buffering, VGA, 2D Engine, etc...
Mindiell
----

foodman

  • Newbie
  • *
  • Posts: 21
    • ICQ Messenger - 570393595
    • View Profile
SFML and c++ or sfml only
« Reply #8 on: May 29, 2010, 09:26:49 am »
Ok Ok I got all my answers Thank you all of you

Be cool , sorry for nonsense questions

read u r pm please

thanks