SFML Network Package

Whether you're a newbie or an experienced programmer, any questions, help, or just talk of any language will be welcomed here.

Moderator: Coders of Rage

Post Reply
Daxtorax
ES Beta Backer
ES Beta Backer
Posts: 26
Joined: Sun Mar 15, 2009 1:34 pm
Favorite Gaming Platforms: Dreamcast, N64, Xbox 360
Programming Language of Choice: C++

SFML Network Package

Post by Daxtorax »

I have attempted to learn how to use the networking package for SFML, from sfml-dev.org, but I didn't quite understand how you would connect to say, a MySQL database. I have worked with PHP and MySQL, but I was wanting to access the database from my program. I was hoping someone here has used it for that before? I'm just using C++ (using Code::Blocks), any help would be greatly appreciated.
wacko
Chaos Rift Newbie
Chaos Rift Newbie
Posts: 12
Joined: Sat Oct 25, 2008 1:36 am

Re: SFML Network Package

Post by wacko »

well I would just use MySQL C api or the C++ wrapper as it will provide you what your looking for if you app needs to connect to MySQL.

http://dev.mysql.com/doc/refman/5.0/en/ ... splus.html
User avatar
Ginto8
ES Beta Backer
ES Beta Backer
Posts: 1064
Joined: Tue Jan 06, 2009 4:12 pm
Programming Language of Choice: C/C++, Java

Re: SFML Network Package

Post by Ginto8 »

Just so you know, and I don't like to recommend this language because it's nowhere near as efficient as C/++, but if you want to access an SQL database, I've heard that Java is really good for it.
Quit procrastinating and make something awesome.
Ducky wrote:Give a man some wood, he'll be warm for the night. Put him on fire and he'll be warm for the rest of his life.
wearymemory
Chaos Rift Junior
Chaos Rift Junior
Posts: 209
Joined: Thu Feb 12, 2009 8:46 pm

Re: SFML Network Package

Post by wearymemory »

Ginto8 wrote:Just so you know, and I don't like to recommend this language because it's nowhere near as efficient as C/++, but if you want to access an SQL database, I've heard that Java is really good for it.
I don't think efficient is the word. Java is highly efficient, and in some areas, it is a lot more efficient than C++. And the OP said he was just using C++.
User avatar
Ginto8
ES Beta Backer
ES Beta Backer
Posts: 1064
Joined: Tue Jan 06, 2009 4:12 pm
Programming Language of Choice: C/C++, Java

Re: SFML Network Package

Post by Ginto8 »

wearymemory wrote:
Ginto8 wrote:Just so you know, and I don't like to recommend this language because it's nowhere near as efficient as C/++, but if you want to access an SQL database, I've heard that Java is really good for it.
I don't think efficient is the word. Java is highly efficient, and in some areas, it is a lot more efficient than C++. And the OP said he was just using C++.
Yes I was just pointing out that Java may be a better option for SQL access.
Quit procrastinating and make something awesome.
Ducky wrote:Give a man some wood, he'll be warm for the night. Put him on fire and he'll be warm for the rest of his life.
wearymemory
Chaos Rift Junior
Chaos Rift Junior
Posts: 209
Joined: Thu Feb 12, 2009 8:46 pm

Re: SFML Network Package

Post by wearymemory »

Ginto8 wrote:
wearymemory wrote:
Ginto8 wrote:Just so you know, and I don't like to recommend this language because it's nowhere near as efficient as C/++, but if you want to access an SQL database, I've heard that Java is really good for it.
I don't think efficient is the word. Java is highly efficient, and in some areas, it is a lot more efficient than C++. And the OP said he was just using C++.
Yes I was just pointing out that Java may be a better option for SQL access.
Yes, but after you said it was nowhere near as efficient as C/++.
User avatar
Ginto8
ES Beta Backer
ES Beta Backer
Posts: 1064
Joined: Tue Jan 06, 2009 4:12 pm
Programming Language of Choice: C/C++, Java

Re: SFML Network Package

Post by Ginto8 »

wearymemory wrote:
Ginto8 wrote:
wearymemory wrote:
Ginto8 wrote:Just so you know, and I don't like to recommend this language because it's nowhere near as efficient as C/++, but if you want to access an SQL database, I've heard that Java is really good for it.
I don't think efficient is the word. Java is highly efficient, and in some areas, it is a lot more efficient than C++. And the OP said he was just using C++.
Yes I was just pointing out that Java may be a better option for SQL access.
Yes, but after you said it was nowhere near as efficient as C/++.
Java, if not as efficient as C/++, has built-in SQL access functions that may, in actuality, be more efficient than access libraries for C/++. And if not as efficient, easier to use. Bear in mind that my opinion of Java's efficiency in comparison to C/++ mainly lies in the fact that it is interpreted. Imagine EVERY program being run in Wine. That's what a Java-based system is like.
Quit procrastinating and make something awesome.
Ducky wrote:Give a man some wood, he'll be warm for the night. Put him on fire and he'll be warm for the rest of his life.
User avatar
programmerinprogress
Chaos Rift Devotee
Chaos Rift Devotee
Posts: 632
Joined: Wed Oct 29, 2008 7:31 am
Current Project: some crazy stuff, i'll tell soon :-)
Favorite Gaming Platforms: PC
Programming Language of Choice: C++!
Location: The UK
Contact:

Re: SFML Network Package

Post by programmerinprogress »

well Java zealots would argue that Java isn't strictly 'interpreted', it's compiled into bytecode for the virtual machine and then executed as if it were machine code, through the virtual machine... but i'm not a zealot, it's interpreted dammit! :lol:

yeah, I mean efficiency is measured by more than execution time, if something is harder to obtain, and program for, then surely it could be classes as less 'efficient'

you could also argue that such a tool could be deployed better in Java, since it could be integrated into a web browser, which anyone could use with an internet connection, as opposed to a program written in C++ which is bound to it's intended platform.

These are all things to take into consideration, in this case, I agree with Ginto8, the avilability of an SQL library would probably simplfy development.
---------------------------------------------------------------------------------------
I think I can program pretty well, it's my compiler that needs convincing!
---------------------------------------------------------------------------------------
And now a joke to lighten to mood :D

I wander what programming language anakin skywalker used to program C3-PO's AI back on tatooine? my guess is Jawa :P
wearymemory
Chaos Rift Junior
Chaos Rift Junior
Posts: 209
Joined: Thu Feb 12, 2009 8:46 pm

Re: SFML Network Package

Post by wearymemory »

Ginto8 wrote: Java, if not as efficient as C/++, has built-in SQL access functions that may, in actuality, be more efficient than access libraries for C/++. And if not as efficient, easier to use. Bear in mind that my opinion of Java's efficiency in comparison to C/++ mainly lies in the fact that it is interpreted. Imagine EVERY program being run in Wine. That's what a Java-based system is like.
Perhaps you have a misunderstanding of the word "efficient," or your previous sentences didn't make any sense.
Java is extremely efficient, especially with showing desired effects with very little effort (if you have a working knowledge of it), and one of the things that adds to its efficiency is it ability to run on almost every platform without having to recompile it for that platform, and this is because it is interpreted. So you're saying C++ is more efficient than Java because Java is interpreted?
User avatar
short
ES Beta Backer
ES Beta Backer
Posts: 548
Joined: Thu Apr 30, 2009 2:22 am
Current Project: c++, c
Favorite Gaming Platforms: SNES, PS2, SNES, SNES, PC NES
Programming Language of Choice: c, c++
Location: Oregon, US

Re: SFML Network Package

Post by short »

I am pretty sure he was speaking purely about execution time. The opinion that c/c++ is faster then java in pure execution time is not always true.

I mean just last semester I was able to make a simple c program run faster then an assembly program my professor had written. It all comes down to what each language is good at.

(All right, after we wrote the c equivalent program we were given the task to make the professors assembly code execute faster then the c equivalent we had written, which I eventually did. It took a lot of research, reading, and low level understanding to do this, which the argument to that higher level languages offer faster development speed and thus more efficient).

I realize that you guys are debating c/c++ and java, but I think it was a good extreme example to demonstrate that you are both correct, in different ways. More efficient can be interpreted multiple ways, other then pure execution time OR development speed time.
My github repository contains the project I am currently working on,
link: https://github.com/bjadamson
User avatar
programmerinprogress
Chaos Rift Devotee
Chaos Rift Devotee
Posts: 632
Joined: Wed Oct 29, 2008 7:31 am
Current Project: some crazy stuff, i'll tell soon :-)
Favorite Gaming Platforms: PC
Programming Language of Choice: C++!
Location: The UK
Contact:

Re: SFML Network Package

Post by programmerinprogress »

I couldn't put it better myself :lol:
---------------------------------------------------------------------------------------
I think I can program pretty well, it's my compiler that needs convincing!
---------------------------------------------------------------------------------------
And now a joke to lighten to mood :D

I wander what programming language anakin skywalker used to program C3-PO's AI back on tatooine? my guess is Jawa :P
User avatar
dandymcgee
ES Beta Backer
ES Beta Backer
Posts: 4709
Joined: Tue Apr 29, 2008 3:24 pm
Current Project: https://github.com/dbechrd/RicoTech
Favorite Gaming Platforms: NES, Sega Genesis, PS2, PC
Programming Language of Choice: C
Location: San Francisco
Contact:

Re: SFML Network Package

Post by dandymcgee »

@short0014 - That's a pretty awesome assignment too. You stand to learn a lot from simple stuff like that. :)
Falco Girgis wrote:It is imperative that I can broadcast my narcissistic commit strings to the Twitter! Tweet Tweet, bitches! :twisted:
Post Reply