Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 16 Feb 2013
Offline Last Active Aug 23 2016 01:38 AM

#5136707 Switch or Not?

Posted by on 05 March 2014 - 11:51 PM

In the console?


No, you'll need to start working with graphics. Select an API and learn some of its basic functions (creating a window, getting user input, drawing graphics, etc.) then start making simple graphical games with that API.

#5136701 Switch or Not?

Posted by on 05 March 2014 - 11:22 PM

I've made Tic-Tac-Toe more than 3 times (with and without arrays). I prefer directx to open .


In that case, it's time to move onto something bigger. Try something that takes place in real time, such as Snake or a shoot 'em up. After that, you might try making a simple platformer.

#5136649 Switch or Not?

Posted by on 05 March 2014 - 06:22 PM

If you're getting bored of C++ then it's probably because you're not creating anything that really motivates you. You've probably learned enough C++ to start making simple games, so I suggest picking up an API such as SDL. After becoming somewhat familiar with the basic operations of that API, start making simple games such as Tic-Tac-Toe, Pong, or Snake. Sure, there will be gaps in your knowledge as you create these games, but you can learn as you create. There is no need to learn absolutely every aspect of a programming language or API before you start making games.

#5132888 Why "steampunk" is fun?

Posted by on 20 February 2014 - 01:08 AM

It's perfectly acceptable to mix themes together. Final Fantasy VI mixed together steampunk and high fantasy (which included magic). It's really up to you if you want to mix themes and to what extent. It can open more possibilities, but at the same time it could turn the world into a mish-mash of ideas that don't feel like they fit together. The key to creating a convincing world is consistency.

#5131870 Why "steampunk" is fun?

Posted by on 16 February 2014 - 07:00 PM

Steampunk is fun for the same reason that any fantasy theme is fun - it opens the possibility of strange technology, awe-inspiring locations/architecture, interesting personalities, and more. Also, like with any fantasy genre, it creates a suspension of disbelief for the audience, allowing for narrative and storytelling that would seem improbable in a more realistic setting. A steampunk setting is just another way to create a consistent theme to make your fantasy world more believable.

#5126558 SDL 2.0 - Double Screen Resolution

Posted by on 26 January 2014 - 01:04 PM

As exOfde has already said, you should be using textures instead of surfaces. This will allow you to take advantage of your GPU's processing power to transform images quickly and efficiently, and scaling is automatic given the destination rect. The reason you're experiencing slowdown is because you're using the CPU for image processing, which is very slow for that kind of thing.

#5125242 SDL 2.0 - Enable VSync

Posted by on 20 January 2014 - 11:39 PM

There is a texture size limit on GPUs. A common limit is 4096 x 4096. Break your image into smaller sections and it should work fine.

#5120379 Apparently my SDL drawing code is inefficient

Posted by on 31 December 2013 - 04:59 PM

Use SDL_RenderCopyEx only when you need to apply transformations to your image. Otherwise, use SDL_RenderCopy as it's quicker. I recommend overloading your Texture::Render() function to achieve this.

#5116827 Why do games pause the game while saving the game?

Posted by on 14 December 2013 - 02:40 AM

When a game is saving it has to write the data to the hard drive or other data storage medium. This is a relatively slow process, so in a single threaded game it must wait until this process is finished before the game resumes.

#5116598 Alchemy System, what would make alchemy fun?

Posted by on 12 December 2013 - 06:21 PM

It would add a great amount of depth if there were some kind of underlying principles that determine the outcome of a particular mixture of ingredients. Perhaps these principles would involve mathematical formulas where each ingredient would have certain values which are used in a formula to determine how it reacts to other ingredients. The amount of each ingredient would also play a role, as well as preparation methods (e.g. grinding an ingredient into powder before mixing).

#5115560 So I want to make an MMORPG

Posted by on 08 December 2013 - 11:12 PM

btw, has there ever been an MMORPG in java


Well, there's RuneScape.


Speaking of which... You should perhaps try something on the scale of what's now known as RuneScape Classic (which originally was created by just a few people), or even simpler. In other words, very simple graphics, simple interface, simple mechanics, etc. Actually, scratch that - you'd be best starting with creating a MUD before trying something on a larger scale.

#5115297 Completely overwhelmed - should I just give up?

Posted by on 08 December 2013 - 01:30 AM

I realized that, even though I was able to write custom classes and all that jazz according to the principles taught in the SDL book, learning SDL seemed too much of a detour for something that only handles 2D. "Maybe I could just get on with it and jump straight into OpenGL, which does SDL stuff and much more", I thought to myself. Besides, the fact that I was staying clueless as to how to implement 3D and even 2D on some subjects started to bug me.


Before moving to OpenGL, did you even make a game with SDL? OpenGL only does graphics, so you still need to use an API such as SDL for handling player input, music, sound, and other things required for a game. At its core, programming a game is very much the same whether it's 2D or 3D. Most of what you learn in 2D game development can be carried over to 3D game development. As you've already learned, 3D graphics programming requires you to learn a lot of 3D math as well as learning a complex API, which is why it's a good idea to start with 2D development when learning how to make games.


Since you have a grasp on C++ and learned a bit of SDL, your short term goals now should be creating and completing a few simple 2D games with that API. OpenGL can wait for later, as well as your dream games.


Of course, that's only if one of your goals is to learn how to program games. If your real goal is simply to turn your ideas for games into a reality, then you're better off using a game engine as was previously mentioned.

#5115162 How to program a zelda style game

Posted by on 07 December 2013 - 11:56 AM

I assume you mean the 2D top down Zelda games, such as A Link to the Past. These games used oblique projection and was achieved through the tile based art itself, not through isometric programming.


Judging by your previous projects, you probably already know enough to create this type of game. It's just a matter of setting up everything to work in a top-down environment instead.

#5114745 SDL and Copy Constructors

Posted by on 05 December 2013 - 08:02 PM

OMG I had no idea that copy constructor would run before main. I changed it to a pointer and now use the new keyword when I get into main. It stopped the crashing and after a few more hours of poking around I got it to work how I wanted to. So thank you, I feel like I need to research pointers more. I get the concept behind them but actually using them is giving me trouble. It seems I only run into problems with SDL_Surface tho.


Just some advice, I recommend avoiding any use of SDL functions within constructors or destructors (the same issue will occur if you quit SDL before your destructors are called when the program closes). Simply create an initializing function and a clean up function which fulfill the same purpose that your constructors and destructors do now. Call the initializing function after you initialize SDL and before your game loop, and call the clean up function after your game loop and before you call SDL_Quit();

This way you can avoid needing to dynamically allocate your object after initializing SDL. You should avoid dynamically allocating anything unless it's absolutely required.

#5114703 SDL and Copy Constructors

Posted by on 05 December 2013 - 04:20 PM

The constructor function is called as soon as that object is created, so depending on where your object is created, this may occur before the SDL_Init of your program is even called. Depending on how you've set up your program, your constructor may be calling an SDL function before SDL has been initialized, which may be the source of your problem.


Edited for clarification due to a miswording.