Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

102 Neutral

About pcgfx805

  • Rank
  1. pcgfx805

    Basic game structure?

    Ah thank you so much! This explains why I was so screwed up trying to continue from there. I'm in the same boat as apemax in that case. May I come aboard? Ha I definitely agree with you there
  2. pcgfx805

    Some Basic Tips

    Thank you, I'll look into this
  3. pcgfx805

    Basic game structure?

    It's SDL based but the object oriented structure of the engine seemed valid to me. Check out the sample of what you end up with: Sample Perhaps this is where I'm going wrong Thanks.
  4. pcgfx805

    Basic game structure?

    Hi. I'm not an expert but I found the tutorials over at SDL Tutorials to be very helpful. By the end of the tutorials you have a functional (albeit basic) game engine in SDL with C++. There's also a tutorial on using OpenGL with SDL.
  5. pcgfx805

    Some Basic Tips

    Sorry for the double post, but on account of the lack of interest in this thread can this be moved to OpenGL or perhaps Game Programming please? (Also I've noticed it has 0 views and yet 3 votes...)
  6. pcgfx805

    Some Basic Tips

    Hello everyone! I'm new here so would first like to say hello and thank you for providing such a sweet resource for us budding game developers - So hello and thanks! Secondly I just want to warn that I am a massive noob (probably in way over my head) but I am trying my best and any help is greatly appreciated. So I recently started working on my first 2D (side-scrolling) game engine written in C++ with SDL. I used the awesome tutorials over at sdltutorials.com to get started and all was great. I did find a few areas however in which I had no clarification on and so had to kinda guess on how to achieve it. The first was depth. I wanted the foreground and background to appear closer and further away respectively. I did a little research and ended up blitting large surfaces which moved at different speeds relative to the viewport, which I believe is called 'parallaxing'. This worked fine so I was pretty happy with the result and ease! I then wasn't sure about the screen size and resizing everything if needed. I found that SDL had no native support for this and that if I wanted to re-size everything I would either have to create sprites of different sizes, or use OpenGL with SDL. I thought that using OpenGL would be the best option as I wanted to learn this eventually anyway. So I left my SDL version and started to implement a new version with OpenGL. Here's where the trouble started. Firstly I found that I wasn't sure how to achieve the depth effects. At first I just created a textured quad which I moved much like the SDL version. But I then tried using perspective so that I could use the Z axis to move it further away and achieve the same effect 'for free'. This meant have a much larger quad with the background image textured to it and effectively stretched so that it appeared at the correct size. But is this the best way to do it? It seems simpler because I don't have to worry about placing it relative to anything; I just draw it at a fixed point and let the perspective take care of the rest. I've tried searching the internet for anything on this but I failed to find anything relevant. Currently I've left it in orthographic mode with 'parallaxing'. My second problem was screen size and resolution. Is it the norm to scale everything depending on the users screen resolution as I thought? I thought that if I just made all my art assets at a high resolution, I could then use OpenGL to scale everything down for lower resolution settings, and recalculate positions and such. It sounds easier when written down Currently I've just left it fixed at a resolution. So in summary my questions are: For a 2D side scroller (with OpenGL in this case), is it better to use perspective with the depth buffer or an orthographic view with 'parallaxing' to achieve the perception of depth?What's the best way to deal with different screen/window sizes? It is plausible to scale images down as long as they keep their aspect ratio, or is there a better way of handling this? I had more questions but at the moment I'm a bit overwhelmed. If anyone would be kind enough to answer these for me it'd be greatly appreciated. Please excuse my being a noob and I'm sorry if what I've written is total rubbish. Thanks for taking the time to read. (Mods: I wasn't quite sure where to post this as my questions seemed relevant to a number of sections. I posted here because I figured my problems are down to me being a beginner - Sorry if it's the incorrect place)
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!