Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

MorphingDragon

macrumors 603
Original poster
Mar 27, 2009
5,159
6
The World Inbetween
Okay, so some of my friends and I are designing a side scrolling game as a University example. (We want to take an advanced course and we need to show previous skill) They want me to make a Mac version but I don't have enough experience to answer my question myself. Whats better for a 2D side scroller. OpenGL or Cocoa Functions like CI/QE? In terms of performance really, I don't really care how complicated the code gets.

EDIT:

My friends and I got accepted into one of the best Universities in New Zealand. They let you skip some 100 level papers in the second semester if you show previous skill in a C derived language. We decided to do a side scrolling 2D game and develop on our own platforms of choice. Then we decided to get John to make the core logic while Jake and I finish off designing the game. Then we would write the Graphics rendering in the local libraries (.Net/Cocoa etc). We get about a year if we start now.
 
That doesn't matter, I'm making the Mac Version, Jakes making the Windows Version in C# and John's making the Linux Version. Its for a portfolio, the University wont care.

Yeah, but it _will_ be the same game, won't it? So if all of you combine your efforts and write your game using OpenGL with, say, C/C++, you'll save lots of time.
 
This is going to come off as being harsh, but it sounds like this is clearly demonstrating a lack of "previous skill" if you don't even know where to start. It also seems like the 3 of you should agree on a cross-platform toolchain, then you can pool your resources for making 1 solid, complete product. Right now it seems like all the time you'll be spending is on platform specific code. I'd argue that you're making 3 different games.

-Lee

Edit: To try to be somewhat helpful: What prior skillset are you trying to demonstrate? Algorithms? Coding a particular language? Design principles? Software engineering skills? Game design skills? It may be better to figure that out and pick a project that is better suited to those strengths. If you don't know how to program using Cocoa, and you don't know OpenGL, trying to put this together using those is not going to make your project look impressive. Even if you have a great algorithm, but the implementation is awful, they're going to see an awful implementation.
 
This is going to come off as being harsh, but it sounds like this is clearly demonstrating a lack of "previous skill" if you don't even know where to start.

My last languages was VB6. The Course requirements stated a C like language. So... duh I have not a lot of previous experience. Obj-C is the only C like language I know and I only started learning/using it about half a year ago. My last program on Obj-C was an In house prototype for a law firm. So I know how to use event driven, object orientated style programming at least. I don't know whats better because I haven't done anything past Aaron Hillegass' Examples in this area.

Wouldn't OpenAL be better than SDL for sound?..

Actually thats an Idea, What if the whole thing was coded in OpenAL/CL*/GL. With C#/Obj-C/QT front ends?

*I remember AMD saying that OpenCL can be used to write CPU code.
They all have C-Like syntax, and we have a whole year to do it.
 
That doesn't matter, I'm making the Mac Version, Jakes making the Windows Version in C# and John's making the Linux Version. Its for a portfolio, the University wont care.

Each comfortable on the their own respective platform no doubt.

I'd also suggest showing some programming and team skills by doing cross-platform game code.

Each one of you would then do your systems specific driver. Window message handlers, Mac Cocoa View Controller and whatever is required for the LINUX GUI of choice.
 
Wouldn't OpenAL be better than SDL for sound?..

SDL is not just for sound. It is an input library as well as other things. Given what you have said I would say stick with SDL rather than jumping into OpenAL.

Why do you think OpenAL is "better" than SDL for sound? You won't be doing anything approaching professional audio I would imagine so basically anything will do as long as it is cross platform (which SDL is) and is easy to learn (which OpenAL is not).

Actually thats an Idea, What if the whole thing was coded in OpenAL/CL*/GL. With C#/Obj-C/QT front ends?

*I remember AMD saying that OpenCL can be used to write CPU code.

Do you need to use OpenCL? There is no point in using it just for the hell of it.
 
No, but it would be unique.

Well its your project but bear in mind that Mac OS X is the only platform with a production ready OpenCL implementation. Nvidia I believe have released OpenCL beta drivers for Windows and perhaps ATI have too. Linux is quite a bit behind I believe.

Also the more time you spend learning about technologies like OpenCL is less time spent working on your game which is actually your real project. It would be pretty stupid to spend a vast amount of time implementing a clever game using OpenCL only to end up with a rubbish game because you forgot to actually save some time for designing and implementing game play.

You need to do anything to stand out in the world of students.

How about just trying to make the best game in the class?
 
Well its your project but bear in mind that Mac OS X is the only platform with a production ready OpenCL implementation. Nvidia I believe have released OpenCL beta drivers for Windows and perhaps ATI have too. Linux is quite a bit behind I believe.

Also the more time you spend learning about technologies like OpenCL is less time spent working on your game which is actually your real project. It would be pretty stupid to spend a vast amount of time implementing a clever game using OpenCL only to end up with a rubbish game because you forgot to actually save some time for designing and implementing game play.

ATi is the only one left in Beta on other platforms and nVidia has already released its own SDK.

How about just trying to make the best game in the class?
Its not a class, its a project for special admission to an advanced paper. Plus we can skip some 100 level papers. We get a year to do it.
 
You guys do understand that the purpose of OpenCL is to use GPUs for things -other- than games/graphics, right? While I guess technically it is feasible to use it for parts of game logic or physics or something, that's not really what it is intended for, and using it for that while you also have graphics for the GPU to process would probably just slow things down.

Regular old OpenGL graphics will already be accelerated by the GPU without OpenCL being involved.
 
Okay, so some of my friends and I are designing a side scrolling game as a University example. (We want to take an advanced course and we need to show previous skill) They want me to make a Mac version but I don't have enough experience to answer my question myself. Whats better for a 2D side scroller. OpenGL or Cocoa Functions like CI/QE? In terms of performance really, I don't really care how complicated the code gets.

I've seen enough threads like this over the last decade, that I can confidently say there is about a 2% chance this game ever actually gets built.

The single biggest flaw is that you're already talking about what languages to build the game (hint: languages don't make a damn bit of difference) and you haven't talked at all about what the game will be like.

I'm not criticizing... just pointing out that we've seen this pattern before.
 
You guys do understand that the purpose of OpenCL is to use GPUs for things -other- than games/graphics, right? While I guess technically it is feasible to use it for parts of game logic or physics or something, that's not really what it is intended for, and using it for that while you also have graphics for the GPU to process would probably just slow things down.

OpenCL is a general language, it is just marketed as an alternative to CUDA. It can be used to program anything that can add 2 + 2.
I've seen enough threads like this over the last decade, that I can confidently say there is about a 2% chance this game ever actually gets built.

The single biggest flaw is that you're already talking about what languages to build the game (hint: languages don't make a damn bit of difference) and you haven't talked at all about what the game will be like.

I'm not criticizing... just pointing out that we've seen this pattern before.

In all honesty I don't care, If I did well in the Scholarship exam I can skip level 100 papers altogether. I was just asking for an opinion. But I think you're right on the money for this going down the gurgler. They chickened out of the Scholarship exam, and all it was is basic theory and experienced programming.

I haven't done any of the planning I've just been asked to make a Mac Version. I was thinking of Making games with my sister but I'd be better off making websites for money.

Oh and just because I can, have you ever seen an advanced 3d shooter coded in Basic?
 
My previous post was made lacking some of the details you've provided since then. If you have a whole year, this seems a lot more feasible. You really need to exercise project management and design for a long project like this. Personally, I would decide amongst the three of you whose going to be the "lead", that will deal with tracking project milestones, etc.

You need to set up source control, plan goals along the way (a single, 1 year goal of completing a game on 3 platforms is not realistic, you need to break the tasks down), divide the tasks up, etc. There's going to be a lot more than coding required to get this project done. There's going to be a lot more project management, design, engineering, etc. to get all of the pieces put together, etc.

There are corollary tasks for a game that may be difficult. Level design, art design, etc. which really aren't skills that come along with being a good programmer. If you have some people you know that have some of these skills (Art is probably easier than level design...), recruit them to help. Maybe ask around at the art dept. of the school to see if they have anyone that could get some credit for providing digital art for such a project.

I would spend at least a few weeks, if not a month or so, doing nothing but planning. Researching the tech that best suits a cross-platform project like this, deciding how you can use them together, deciding the "rules" for the game, how the collision detection should work, tracking of statistics (health, score, experience, whatever you want in the game), drawing up what the UI will look like, etc.

This sounds very ambitious, but i hope you and your friends can pull it off. Good luck!

-Lee
 
OpenCL is a general language, it is just marketed as an alternative to CUDA. It can be used to program anything that can add 2 + 2.

Actually, no. There is a very specific type of parallel computation that can be effectively accelerated by OpenCL, and it's not a type that is normally found in game logic. Basically you need to be able to represent your computation as a kernel function applied to a matrix or vector.

OpenCL and CUDA are only "general purpose" in the sense that you can use them to reap the benefits of massively parallel GPUs for things other than just graphics...but they still have to be parallelizable computations.
 
Actually, no. There is a very specific type of parallel computation that can be effectively accelerated by OpenCL, and it's not a type that is normally found in game logic. Basically you need to be able to represent your computation as a kernel function applied to a matrix or vector.

OpenCL and CUDA are only "general purpose" in the sense that you can use them to reap the benefits of massively parallel GPUs for things other than just graphics...but they still have to be parallelizable computations.

OpenCL can be used to program the CPU as well. For a Sidescroller it would be overkill but not for something that has incredibly complex Physics or AI it would be an option.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.