Jump to content
  • Advertisement

Ungunbu

Member
  • Content Count

    33
  • Joined

  • Last visited

Everything posted by Ungunbu

  1. Ungunbu

    OpenGL 2D RPG examples/source code

    You should address the two concerns separately. First you should learn how to draw sprites and text (I assume you'll want text in your game). If you want to use OpenGL then go for it. There are many tutorials online that will help you with that. Creating a game of any kind is a different thing though. My suggestion is you keep your rendering engine abstracted away from the game logic. You can design your RPG without even knowing which library will you end up using to render sprites on screen. You can imagine having a basic IRenderer interface with methods like DrawTexture() or DrawText(). How you implement that interface won't change the design of the rest of the project in any way.
  2. That's your opinion, mine is that it does, a bit.
  3. You can put your sprites into an atlas with a fixed frame size. You would need to align the sprites to make the animation look correct. Once you have your atlas ready you can create a tool that crops the sprites (to shrink the atlas) but also generates a data file. The info you need to store for each sprite are the source rectangle and the anchor offset relative to one corner of the rect. When loading the atlas you will have to parse the data file to reconstruct the original positioning of each sprite. That should do it.
  4. If you are already familiar with a specific language or engine it would make sense to go with that. Otherwise you can take a look at Unity3D.
  5. I suggest you go on with your game and only concern about rendering performance when it actually becomes a problem.
  6. Have you considered Unity3D? You can code in C# and build for the web. It also supports many more platforms including PC, mobile and consoles. The C# language feels a bit like the old C but it's incredibly powerful.
  7. What you say about Unity isn't true. The whole rendering process is optimized for 2D when using the relevant component (SpriteRenderer). An engine supporting 2D games doesn't just "lock" the 3D dimension, it also performs a lot of optimizations when rendering 2D objects. It certainly doesn't submit 1 draw call per sprite/quad. You could do everything with a pure 3D engine but you would need to do all the batching work by yourself. TL;DR; a modern 2D engine can be considered a 3D engine that performs heavy optimizations under the hood intended to improve rendering performance of 2D objects. Whether or not you want to have that feature in your engine is entirely up to you. Since you mention Unity also consider that they have a few more 2D features like sprite packing (automatic creation of sprite atlases), 2D animation support and even an upcoming integrated tile editor (which looks quite powerful)
  • 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!