Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411490 Posts in 69371 Topics- by 58428 Members - Latest Member: shelton786

April 24, 2024, 05:04:26 PM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsDeveloperTechnical (Moderator: ThemsAllTook)Should I learn openGL or use some game engine?
Pages: [1] 2
Print
Author Topic: Should I learn openGL or use some game engine?  (Read 10689 times)
Joof
Level 0
*


View Profile
« on: July 13, 2012, 12:56:11 AM »

I'm a (soon to be) third year CS major and I consider myself pretty proficient at C/C++ (I know other languages, but C++ is easily my most comfortable) for where I am right now and enjoyed linear algebra. I'm not really sure how long it would take for me to get a good basic understanding of openGL (a month? I've gone about 1/4 through the SUPERBIBLE book the past few days), but it would be really fun to play with some shaders (made a few basic ones before, fun stuff) and couldn't hurt to learn for my career later.

So a friend of mine -- an amazing artist/musician -- came to me with a game idea that sounded pretty neat. The game is a 2D platformer puzzle-solving game that is going to be very visual/musical. I really want to make the game with him and I'm worried he (or even myself) might lose interest before I manage to learn enough openGL to do this.

I realize openGL isn't a full game engine, but it would probably be the biggest hurdle in this game if I choose to learn it.

Why I think I should use openGL
 - Shaders are pretty, even in 2D (I was also considering SDL, but I don't think it has shader support)
 - I would like it to be cross platform -- maybe even to mobile
 - I can keep using openGL after this game and make awesome stuff
 - More fun for me to do
 - Having a project might motivate me to learn faster and do this thing
 - I don't know how useful learning a specific game engine would be to me later

Why I'm undecided about it
 - Friend/Artist might lose interest while I learn the ropes
 - openGL is difficult to get a handle on
 - This game won't require 3D graphics (but could benefit I think)

It's obvious which way I'm leaning, but I want to know what more experienced developers think. Are my reasons for learning openGL even valid?
Logged
maetheec
Level 0
**



View Profile
« Reply #1 on: July 13, 2012, 01:26:21 AM »

If one of your main concern is cross-platform, especially on mobile. Unity is my only recommendation. There are no easier way that let you code once and have it works on all major desktop and mobile platforms.

If you're willing to do without mobile... (PC/Mac/Linux is pretty easy) then you have a few more choices, and the best choice depends on your priority.

If learning is your top priority, then learn OpenGL and write everything yourself. It's going to be tough (and hopefully fun as well) and it's going to take more time, and the final quality of the game might not be what you want, but you'll learn A LOT.

If creating high quality game is your top priority, then use a full-featured game engine with large community such as UDK or Unity is going to give you the best game possible with the least amount of time. You'll still learn a lot about the engine you'll be using and game development in general, but you won't be coding C++.

Think about this: Time-Quality-Resources is all interconnected. If you're low on one, something else have to increase or decrease. For example, if you're short of time, either quality have to decrease or resources have to increase.
So, think of Game Engine as a resource, if you're short on time, or want higher quality game, then using a game engine will be an added resource to balance the load.
Logged
kamac
Level 10
*****


Notoriously edits his posts


View Profile
« Reply #2 on: July 13, 2012, 01:37:58 AM »

Well, I am not going to recommend Unity since you want to use C++.

You could use SFML graphics library + parts of OpenGL where'd you like. It's just that if you want to learn OpenGL and make a game at the same time, while you don't know C++ for too long (?), it's not going to be fun.

Using SFML you'd have:

- Cross compatibility over desktop systems (Porting your game to mobile device is possible, but I think it would be better to use plain OpenGL ES while porting)

- Ability to use OpenGL where you'd like

- Ability to use GLSL shaders wherever you like.

It's just that you wouldn't have to hassle all around stuff like displaying graphics, getting the input from the user (which is easy with GLee and GLFW though), etc.

So, my final advice would be:
a) Want to make that game fast, focus on gameplay and be able to write your own shaders anyway? Use SFML.
b) Want to learn OpenGL, hassle with displaying graphics, sounds, etc.? Use OpenGL.

Doesn't seem that complicated  Durr...?
Whatever way you pick, you will be able to put 3D contents in it anyway. (Though, always using OpenGL)

I'll only add that it's not hard to use OpenGL parts along with SFML. Look for some tutorials on the web, I'm sure you'll find something.


If I would be on your place, I'd go with a)  Tongue
Logged

Hedgehodg
Level 1
*


...


View Profile
« Reply #3 on: July 13, 2012, 01:45:51 AM »

I am in the process of learning Open GL (with C++) and don't find it much harder then XNA, which is considered to one of the most easy to learn graphical APIs out there. Already knowing  XNA though, I already know a lot of the concepts, but with Open GL it really helps if you use  a mathematical library in conjunction with the Open GL specification, since it handles all the matrix calculations for you. Since I haven't used a game engine before, I can not say that I recommend one, however, make sure to hype yourself and friend up about the project, and keep chatting about it and coming up with new ideas. That way you will never lose interest Smiley.
« Last Edit: July 13, 2012, 02:00:31 AM by darestium » Logged

Previously known as "darestium"...
maetheec
Level 0
**



View Profile
« Reply #4 on: July 13, 2012, 01:59:09 AM »

- Cross compatibility over desktop systems (Porting your game to mobile device is possible, but I think it would be better to use plain OpenGL ES while porting)
Is not going to be simple to get SFML to run on iOS and Andriod... but I'm not an expert on SFML, so I'd suggest do some research in the SFML forum first.
From a quick search I found this: http://en.sfml-dev.org/forums/index.php?topic=7779.0
Logged
rivon
Level 10
*****



View Profile
« Reply #5 on: July 13, 2012, 02:19:13 AM »

UDK or Unity is definitely a bad choice here - Unity is C# only and UDK is quite a big overkill and it's aimed at 3D games.

It's very simple. If you want to make a game, use SFML or SDL. If you want to make game engines, use OpenGL Wink
Logged
Joof
Level 0
*


View Profile
« Reply #6 on: July 13, 2012, 03:54:31 AM »

SFML is something cool to look into for sure. I think I may need to think it over a bit more and talk with some people, but I like having some good options. I may just be more on the programmy side than designer side, but I still kinda like the idea of making an engine. Tongue

I'm not sure I'd want to use Unity because I don't need to learn a new language too -- that kinda defeats the purpose of saving time. I've been using C++ for ~6 years (much more in recent years because college) and to my knowledge it's the best language in my toolbox for game making.

Y'all are pretty awesome! Definitely appreciate all the responses.
Logged
iEnjoyFreeBacon
Level 0
***



View Profile
« Reply #7 on: July 13, 2012, 04:21:22 AM »

I Hand Thumbs Up Left to SFML too, super easy to use/understand and lots of resources online. You really can't go wrong with it (as long as you know your C++)
Logged

You prolly are I doubt?
kamac
Level 10
*****


Notoriously edits his posts


View Profile
« Reply #8 on: July 13, 2012, 05:15:22 AM »

Quote
Is not going to be simple to get SFML to run on iOS and Andriod... but I'm not an expert on SFML, so I'd suggest do some research in the SFML forum first.

Well, I said it will be better to use plain OpenGL ES because I wasn't sure about porting SFML. Meaning that, he'd have to write his own functions which would replace SFML's. (Drawing, input handling, sounds etc.)
Logged

maetheec
Level 0
**



View Profile
« Reply #9 on: July 13, 2012, 05:20:38 AM »

I'm not sure I'd want to use Unity because I don't need to learn a new language too -- that kinda defeats the purpose of saving time.
Don't want to sound like a Unity fan boy here... but I'm probably sounds like that already, dammit!! Really, I just want to help make sure you're well informed.

As a programmer who've experience many engines first hand, and wrote a few of my own... I'd like to stress that IF what you want is save time the fastest way to make your first game is probably to use Unity, even if you have to learn C# from zero (C# is Unity's language).

IF save time is not high on your priority, then yes, there are probably more appropriate choices, like SFML, given your situation.

But don't believe me! You should at least try out all your solutions. That's best way to learn and get better. Try out SFML for a few days, Unity for a few days, play around with OpenGL for a few days, UDK for a few days... and with just over one week, you'll well informed and able to make the right choice.

And always take suggestions from random people like me with a grain of salt.
Logged
IndieEmma
Level 2
**


View Profile
« Reply #10 on: July 13, 2012, 05:57:51 AM »

Use openGL.
Logged
kamac
Level 10
*****


Notoriously edits his posts


View Profile
« Reply #11 on: July 13, 2012, 06:06:05 AM »

Use openGL.

Indietom, it's nice that you're trying to give advices on such topic, but..

http://forums.tigsource.com/index.php?topic=27252.0

Make sure you won't make him pick a wrong decision  Coffee
Logged

rivon
Level 10
*****



View Profile
« Reply #12 on: July 13, 2012, 06:06:27 AM »

As a programmer who've experience many engines first hand, and wrote a few of my own... I'd like to stress that IF what you want is save time the fastest way to make your first game is probably to use Unity, even if you have to learn C# from zero (C# is Unity's language).
Not if you want to make a 2D game... If you know C++ and want to make a 2D game in the smallest time possible then really there is no other choice than SDL or SFML.
Logged
J-Snake
Level 10
*****


A fool with a tool is still a fool.


View Profile WWW
« Reply #13 on: July 14, 2012, 04:39:09 AM »

Not that I want encourage Unity, but if you treat C# as C++ there is almost no learning curve for you. That should get most of the job done. So the language switch shouldn't be an issue. The bigger reason of consideration might be whether you accept a garbage collector or not.
Logged

Independent game developer with an elaborate focus on interesting gameplay, rewarding depth of play and technical quality.<br /><br />Trap Them: http://store.steampowered.com/app/375930
Richard Kain
Level 10
*****



View Profile WWW
« Reply #14 on: July 14, 2012, 06:35:35 AM »

If you want to learn rendering programming, then learn OpenGL.

If you actually want to design and finish producing a game, use an existing engine.

Definitely stop listening to everyone who keeps harping on about SFML and SDL. Neither of those is an engine, but general frameworks. I'm not saying that you shouldn't use them. But either of them can serve as helper frameworks for jumping into OpenGL. Even though they both have 2D rendering "solutions," you can still use OpenGL for drawing, and rely on SFML or SDL for input, audio playback, etc... If you decide to go with OpenGL, just look at SFML and SDL and pick between them.

Since you are working with an artist, it might be a better idea to go with an existing engine. Your concerns over collaborative patience are well-founded. Getting regular feedback and progress quickly always helps to keep people interested and involved. And using an existing engine doesn't mean you won't be able to create effects. Most engines provide the ability to cook up your own custom shaders. Engines are also generally easier for artists to deal with. (providing them a visual environment to work in)

I would personally recommend Unity. But if you are looking for a C++ focused engine, there are plenty out there.
Logged
Joof
Level 0
*


View Profile
« Reply #15 on: July 14, 2012, 06:50:33 AM »

Appreciate the advice guys, as much as I want to build my own "engine" and do rendering programming stuff I think I'm going to hold off for now (read: do it on the side). Got a handful of engines now that I can choose from too which is cool.

As to which one I actually choose, I think we'll be able to figure it out. Unity might be cool cause it has so many resources  -- and more importantly, tools -- available and is a little more portable than SFML.
Logged
Raptor85
Level 5
*****



View Profile WWW
« Reply #16 on: July 15, 2012, 08:29:29 AM »

When you do look into cross platform API's, i'd recommend SDL2 over SFML, especially if you're looking to hit mobile, SDL2 has full GLES support/touch support/gesture support/etc and runs on all major and most minor desktop platforms, all major mobile platforms, and most game consoles.  SFML is cool and all but it's portability is pretty bad, in it's current state it's "desktop only" without a LOT of pain.
Logged

-Fuzzy Spider
Nix
Guest
« Reply #17 on: July 15, 2012, 11:21:12 AM »

Unity and SFML aren't even in the same category. SFML is a low level multimedia library while Unity is a full-blown AAA game engine. If you find yourself trying to decide between the two, you need to take a step back and ask yourself what exactly it is you want to do.

If you're looking for a way to render 3D graphics without worrying about the nitty gritty details of OpenGL, Ogre3D is a very mature 3D graphics library with a clean API, massive community, and regular updates. Irrlicht is another popular option, though it seems to have fewer features than Ogre3D.
Logged
rivon
Level 10
*****



View Profile
« Reply #18 on: July 15, 2012, 01:38:07 PM »

He said that he wants to make a 2D platformer.
Logged
Nix
Guest
« Reply #19 on: July 15, 2012, 02:26:37 PM »

In that case OpenGL might not actually be a bad option. It doesn't take much effort to get simple orthographic projection going and rendering quads. With your background it would probably be a few days of full-time work before you understood the basics.

These are my two favorite introductory OpenGL guides on the web:

http://duriansoftware.com/joe/An-intro-to-modern-OpenGL.-Table-of-Contents.html
http://arcsynthesis.org/gltut/

You'll only need to write one shader and it will be incredibly simple. The advantage of this over SDL or SFML is that for not a lot more work you'll have much more control over the rendering process. I recommend this route, actually, if all you're doing is 2D. This is advice from someone who took a similar path down OpenGL-lane and I was very happy I made that decision.

Also keep this in your bookmarks: http://lodev.org/lodepng/
LodePNG is a wonderful and small PNG loading library which works with OpenGL with very little effort.
Logged
Pages: [1] 2
Print
Jump to:  

Theme orange-lt created by panic