So I've been learning C++ and SDL to make some basic 2d games. I want to create a game sort of like World of Warcraft but a 2D version. I want it to be on-line and use a database or something to start data like amount of Gold, HP, etc. I was wondering though, if I do this in SDL, would it still work on-line or would the user have to download SDL themselves to play?
I just want a game like this but be able to play it with some friends, just for learning purposes you know. I was also looking at DirectX because everyone has that on windows pretty much. Anyways much help is appreciated, thanks!
No offense, but an RPG is definately the last thing a new programmer should attempt to create. They are the most time, resource, and skill intensive style of game one could possibly try to create. I speak from experience here and can say that RPGs are huge time sinks, even for experienced game studios. At best, you might get a basic map working before you run out of time and patience.
If you want a game you can play with your friends, why not multiplayer tic-tac-toe or even artillery or something similiar. You'll have more success and may actually have something to show your friends when you are done.
You'll probably need to include SDL's runtime library for the game to run on other computers. This will apply no matter what library you use.
For the game itself some libraries are installed in Windows, but in order to achieve other functionality (online gameplay, gampad, etc)you must tell the user to install the other libraries.
If you use SDL, you would be using it for a local graphical client that the user would either download or install. For that, you don't need to have the user download the SDL library separateoly – you can simply put the SDL runtime DLL in the same directory as your executable and package both into the client installer. Of course, you must abide by the GNU LGPL requirements if you do this; the SDL website has details.
As far as the online piece, I'm not sure what you have in mind. I'm guessing either you'll have clients talking directly to each other in some sort of peer-to-peer fashion, or you'll have an back-end server run by you that handles the common game mechanics. I don't think you'll find SDL of much help in either case. But if you go with the back-end server, you can use whatever libraries you like for that server without impact on the user, since the user will only ever deal with the client.
For flat 2D, probably the easiest approach is to use a web interface not SDL. Web browsers are common on Macs and Linux, too, and you might even be able to support smartphones.
Still, you would have to learn how to split work between the clients and the central server. This is not always trivial. Obviously, stuff like # of gold coins would be on the server. Keyboard input is accepted first on the client. But the direction in which your toon is looking? Should the server know that?
Related
I decided to switch from console to windowed programs, so I did a search for the best graphical libraries for C++, and of the many I found, I liked the following ones:
Qt
SFML
I have to decide which one to use, so having some doubts only I ask you the following questions
When to use Qt and when SFML?
Is SFML only suitable for creating vidiogames or can it also be used to create dekstop apps, or is it better to use Qt for this purpose?
Does SFML already include constructs for desktop apps like buttons?
If I created the same desktop app once with Qt and the other with SFML:
which would be faster in execution.
which would be lighter in terms of memory usage.
Imagine a simple programme with an input text and a button, where you enter a path to a file to be encrypted, and clicking the button below the input text starts the encryption process
As far as legal terms are concerned:
If I were to sell my software realised with the SFML library, would I have to pay them anything?
Same question but with Qt
When to use Qt and when SFML?
Qt is for any kind of Desktop app that uses a rather standard GUI. SFML is for creating games with their own non-standard GUI.
Is SFML only suitable for creating vidiogames or can it also be used to create dekstop apps, or is it better to use Qt for this purpose?
While you can create a standard desktop application with SFML, it's kinda like creating a model of the river Kwai bridge from toothpicks. Certainly an interesting hobby, but you will need to invest an extraordinary amount of time and patience to create something people will judge an interesting oddity.
Does SFML already include constructs for desktop apps like buttons?
Not in a way you would expect. Not like Qt.
If I created the same desktop app once with Qt and the other with SFML:
which would be faster in execution.
The SFML app.
which would be lighter in terms of memory usage.
The SFML app.
Please note that programming the SFML app to a standard of the Qt app would also probably take 100 to 1000 times as long and much higher skill. So those questions above do not make sense without this context.
It is a little like asking what is more fuel efficient, flying to Sydney or running to Sydney? Well, since running uses zero kerosene, running is more efficient. Just takes a pretty good runner and a lot of time. Well, assuming you are in Australia, otherwise, good luck. So you are not asking the right question here, nobody would run to Sydney based on how much kerosene they save. That is not the correct measurement to base your decision on.
Imagine a simple programme with an input text and a button, where you enter a path to a file to be encrypted, and clicking the button below the input text starts the encryption process
Yes, that is the job of frameworks like Qt, not full screen renderers like SFML. If you don't want 3d fireballs exploding while you do your encryption, stay with Qt.
If I were to sell my software realised with the SFML library, would I have to pay them anything?
No.
Same question but with Qt
No.
I currently own a Blackstar ID Core 10w Amp. It has a lot of built in guitar effects such as Reverb, Delay and Modulation, all of which have various depths and levels. By connecting a USB cable from the amp to my computer, I'm able to use Blackstar's Insider software, which allows me to save these effects settings and switch to any of them with just a double click. However, the need for a double click makes it impossible for you to play your guitar and change effects during a song (which is what a pedal does).
However, I wanted to know if it's possible to use C++ to do something more ambitious than the manufacturer allows: I wanted to create a software that would play a backing track (voice+drums but no guitar) of a song and allow the user to set where during that song he wants his effects changed, and to what. This way, one would be able to play a song from start to end, not needing to worry about having to change effects.
This would also be a school project, so it can't really be a "mouse manager" or anything of this sort. It would need to be something more robust.
FYI, as far as I'm concerned, Blackstar does not give us any API we could work with. So I'd like to know if this project is even possible and, if so, where I should start.
Thank you!
This existing project is likely to help provide clues for you to reverse engineer what Insider does and rewrite that in C++.
https://github.com/jonathanunderwood/outsider
I feel your pain regarding Blackstar's awful Insider software.
To answer your question, is this project even possible, of course it is, the Insider software obviously is able to control the amp via USB. You just have to figure out what its protocol is.
You can use a USB sniffer like this one to see what commands Insider sends to the amp when you perform actions. With enough experimentation you should be able to reverse-engineer the protocol.
It's probably easier than you think. As evidence I offer the Insider software itself, which is not very sophisticated. The settings are probably modeled more or less as a struct.
I wonder if it possible to make a game by c++ with directx(in GFX) so that it could be put in my web (php , asp.net, java or other I don't care about the web language or technology, you chose one for me) and be played online or I have to change something directx or C++.
if it possible tell me how?
thnx in advance
If you mean browser based, I'm not sure it's possible with C++. You might want to look into webGL.
If you're feeling very adventurous, I am aware of an open source project that is essentially a .NET to JS compiler. You can check it out on github here
If you mean "online" as in a MMO type of game, or a game that is played over a network, (but not in a browser), then obviously it is quite possible, I don't know the specific libraries you'd use though.
For some time now I've been tossing around what I think is am awesome idea: I want to write essentially a C++ phone server to handle all of my incoming calls on a land-line. I'll have a white-list (yay never having to worry about telemarketers ever again!), a black-list, and will be able to access my phone using my gaming headset, allowing me to make/answer calls while I'm gaming or whatever. In the future I'd also like to hook it up to a gui and make it have pop-ups and other cool features.
The problem is, I have no idea where to start. I'm familiar enough with C++, but have no idea how to go about doing anything with a phone-line. I can plug a phone-line into my computer, but I have no idea how to get my program to be able to use that connection. There's WinSock2 for being able to use my ethernet connection, is there something similar I'd be able to use to use the phone line? As it's using the same ethernet jack, I wonder if it's even possible to use WinSock2 to use the phone-line?
I saw this post, which wasn't particularly helpful: stackoverflow link , which points out Dual-tone multi-frequency signaling. I stumbled across this site: link, but isn't really going to help me get started.
So I was wondering, is there some sort of library out there that would allow me to tap into a phone-line that's connected to my computer? Is there a standard somewhere out there concerning phone-lines and what the different combinations of tone's mean? Can anyone here help get me started? I realize it's somewhat of a big undertaking, so any push in the right direction would be greatly appreciated. Thanks.
[Update:]
I found this question, which is a step in the right direction, but I'm not sure yet if it helps me (I need to go to bed, and will take a look at it in the morning). I did see mention of a Microsoft Telephony API though, I'll try doing more research on that tomorrow.
If working with MS products is not an absolute necessity, you might also consider taking a shot at Asterisk. This is an open-source PBX (in software) that allows development on Linux, Windows (emulated) and Mac. At the company where I work, we use it for implementing small-scale exchanges, about a 100 lines or so. It also interfaces well with VoIP and allows a whole host of protocols. I have developed scripts and programs in C++ that work on voice packets in real-time, and so far, my experience has been good. As for your stated use-case of blocking telemarketers etc., this would be a very good fit. Check out further details here.
After doing more research, having one link lead to another link, and coming up with new search terms, I stumbled across this site that looks like it could kick me off using the Windows Telephony API in C++: link. This link includes open source c++ samples showing how to do the basics of what this question asks, I'll just have to test to see if they actually still work.
This is only the beginning of my research, so I'll keep you posted on any other findings. If anyone else is knowledgeable in this area, please still feel free to drop me information on what I want to accomplish.
I have this program in mind that I would like to attempt and create in c++. I am not sure what SDK I should use, Here is the idea:
Basically like Facebooks status' or twitter but strictly for your desktop. Window like AIM or MSN would allow you to view your friends and their current status, allow you to comment on it, etc. When someone changes their status, all of their friends get a little notification on the bottom right of their screen saying what their friends current status is. There would obviously be much more that sets it apart, but this is the basic idea that I'm starting from.
If you plan to release it as OpenSource, the Qt GUI Framework is very much worth considering (you can buy a commercial license too). It is crossplatform (Linux/Win/Mac) - eg. Google Maps desktop app uses it.
It will give you networking support, HTML/XML rendering if necessary, SQL and much more.
As for communication protocols, go with Greg's suggestion.
A good choice for a cross-platform GUI system is wxWidgets. For communication between users, something like XMPP would be a good option, because it is a platform-agnostic open standard with solid support for user "presence".
Qt is a good crossplatform toolkit. Take a look at that.