0
\$\begingroup\$

I have several questions regarding game rendering.

  • What are the main rendering methods in game programming?
  • Let's say we want to make a 2D game, and it should render 30 frame per second, does it mean program render whole screen every (1000/30) ms ?

  • Consider Super Mario game, at the beginning, Mario is moving, but +90% of objects are static, my question is, should I render the whole screen, or only the objects that have changed or moved? isn't it illogical to render everything?

\$\endgroup\$

1 Answer 1

0
\$\begingroup\$

It really depends on the platform you are targetting your renderer. On older computers (C64, NES, etc.) the computing power limited what you could do and you had to optimize everything for the best performance if you wanted to create complex games. For these older platforms it really was not always wise to just draw the whole screen every frame, only the parts that were updated.

Nowdays it's really different. With simplest 2D games, you could easily achieve hundreds if not thousands FPS, as the processing power of current hardware is not the limitation.

The most common rendering method nowdays is to draw textured polygons with OpenGL or DirectX on the screen, and it is the fastest. Another way is to blit sprites on the screen, which can be done with SDL or allegro.

\$\endgroup\$
4
  • \$\begingroup\$ and consider a android game, is there any simple libraries? or should I implement my own with low-level GDI components?! \$\endgroup\$ Nov 16, 2013 at 20:07
  • 1
    \$\begingroup\$ That is "which tech to use" question, which is not in scope of this site, but yes there are libraries. You could use Unity3D (it has 2D support) or Xamarin for C# or libgdx for Java. \$\endgroup\$
    – Lasse
    Nov 16, 2013 at 20:10
  • \$\begingroup\$ Thank you for your answer, helped to much, and my last question is, I'm going to develop a very simple game like mario witch physics is important(like angry bird), so is it better to implement my own library? because I want to develop independently to any libraries(if possible) \$\endgroup\$ Nov 17, 2013 at 7:35
  • \$\begingroup\$ What kind of libraries are you talking about? If you mean physics, then if you are doing some really simple game, you might not need a library. But if you are creating something more advanced, like ragdoll physics, and if you want to finish your game, you most likely are better off with ready libraries instead of creating your own. Depending on a library is not really a bad thing. You can always change out to some other libraries (like, to your own lib) if you want to. \$\endgroup\$
    – Lasse
    Nov 17, 2013 at 7:46

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .