Jump to content

  • Log In with Google      Sign In   
  • Create Account

Ludus

Member Since 16 Feb 2013
Offline Last Active Jul 16 2014 01:42 AM

#5132888 Why "steampunk" is fun?

Posted by Ludus 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 Ludus 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 Ludus 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 Ludus 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 Ludus 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 Ludus 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 Ludus 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 Ludus 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 Ludus 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 Ludus 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 Ludus 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 Ludus 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.




#5113412 The idea of mixing JRPG and Western RPG's into one game?

Posted by Ludus on 30 November 2013 - 10:13 PM


Do you mean working backwards so no matter what happens i'd end up with a few ''ending'' possibilities? and by ''converge'' wouldn't that make a dna effect? meaning it'll branch out then come back in then branch out again?

 

Yes, exactly. By having the events all come to the same few endings it will really make the game come full circle rather than feeling open-ended. And yes, converging events would create that effect.

 

Another thing which would greatly help the sense of unity is to create several large scale events which occur in the world and are somehow tied to the overarching story line. These large scale events would occur no matter what path you're on, but the path you've chosen will effect how you interact with those events. For example, imagine that at a fixed point in the timeline there's an army which attacks a city. Depending on your current branching path, you may find yourself in a number of positions. Perhaps you're at the front lines of this attacking arming, or maybe you've enlisted in the militia of the city and are defending it. Or maybe you just happen to be strolling through the city at the time of attack. Or perhaps you're in a distant land altogether and you only hear word of the attack. Or maybe you've found a way to prevent the attack before it even happens, such as by helping form a truce of some kind.




#5112368 Moving Content on a Surface that isn't the SDL_SetVideoMode() Surface

Posted by Ludus on 27 November 2013 - 12:51 AM


What if I have objects that are past the size of the screen? for example: if I had a rectangle at the x position of 650, but my screen width was only 640

 

It will not draw it to the screen surface. Bounds checking when drawing to a surface is built into the API. The same goes for an image that is partially off screen - it will automatically clip what doesn't fit.




#5112363 Moving Content on a Surface that isn't the SDL_SetVideoMode() Surface

Posted by Ludus on 27 November 2013 - 12:37 AM

You shouldn't need to draw the moving sprites onto the background's surface. Each frame simply clear the screen, draw the background to the screen surface, then draw the moving objects to the screen surface. The images are always drawn on top of one another, so draw them in order of furthest to nearest.






PARTNERS