Tag Info

Hot answers tagged

15

Direct3D drivers on Windows are ridiculously optimized, sometimes for specific games, and developed by individual hardware vendors. Apple's OpenGL drivers are written and maintained (AFAIK) by Apple, and are intended for "general" OS use, compositing the UI and whatnot. There's no so much optimization for gaming and high-performance throughput. Basically, ...


12

If you want to develop native games for 360/PS3, there is no alternative to getting a Devkit. Consoles are more than just a CPU. It's graphics card, OS, memory, File-System, SDKs and a lot more. If your idea is to port later, thats not gonna work as easy as getting a more less similar machine in terms of its specs. The entire environment is different to a ...


11

While I won't discount the optimization that Microsoft may have put into Windows and/or DirectX, I strongly believe that most programs perform better on Windows simply because that's what the developers focus on (that's where the money is). They make design decisions with Windows in mind, and then later try to make it work in other OSs (Mac, Linux, etc.). ...


11

As others have mentioned, on OS X (and Linux), OpenGL is the only game in town for hardware-accelerated graphics. So the question really comes down to: why do developers use Direct3D instead of OpenGL on Windows? One possible reason, as suggested in the comments, is that they started out as a Windows-only project and later decided to add OS X / Linux ...


8

Blizzard is very custom-tech driven. I don't have links to the articles, but I remember seeing that they develop thousands of custom shaders per game for both multiplatform compatibility and backwards compatibility. Multiplatform support isn't something new. Plenty of software supports Linux, Mac OS, and Windows. As was mentioned above, the important part ...


7

There are graphic engines out there (take Ogre3D as an example) that provide an abstract layer on top of DirectX and OpenGL. So as a developer you just use the Framework and don't have to care much about the underlying GPU-API. Some special things like shaders may have to be written in HLSL and GLSL but there are also higher level shader languages that can ...


7

Xcode can indeed be used to create games. You can do anything a Mac is capable of by programming in Xcode. I think you should focus on what part of the project you want to focus on. As you state you are a brand new Objective-C programmer (welcome). In my opinion it would be quite a mouth full to try and just into Objective-C programming whilst taking on ...


6

If you'd like to learn Objective-C, I suggest you have a look at cocos2d. It's an open-source 2d engine (written in Objective-C) that allows you to write games for iOS or Mac OS using XCode. It's not as easy to create games with as with a package like Unity, but there are lots of tutorials (and even books) for cocos2d to be found. A good place to start ...


6

OpenGL Versions OpenGL Versions supported depends on two factors on OS X: OS Version (10.7, 10.6, 10.5 ...) GPUs or drivers But at least, you can use OpenGL 2.1 on every recent mac. Note: OpenGL is the desktop version, and OpenGL ES is the mobile one. Don't use ES on desktop platforms. Ps: if you have a GMA 950 Card (Intel chipset), you should have ...


5

Are you positive that you've set GL_CLAMP_TO_EDGE for each individual texture? This is a part of individual texture state and it defaults to GL_REPEAT, so this needs to be done after binding with glBindTexture. I realize in the original post you literally say that you set it for each texture, but I'm wondering what the code actually looks like? For example: ...


5

Absolutely! XCode is the standard programming IDE for the Mac and iOS. So if your goal is making a game for iOS, you will probably be using XCode along with a few other helping technologies of your choice (e.g. OpenGL ES 2.0). But since you mentioned game engines I'd also recommend you to use one, since they'll save you a lot of time and effort: If you ...


5

One of the most common ways to render into another application's GL or D3D rendering context is to hook the creation of the context or device objects in that application's process. This will let you gain access to the returned context or device pointer. You can then hook the actual rendering invocation methods (for example, Present() in D3D) and inject your ...


5

Looking at the art assets in your github I think I know what the problem is. What you need is alpha blending. Save your sprites with an alpha channel (or convert the background to zero alpha when loading the textures). Set up blend function like this: glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); That tells OpenGL to blend (mix) the pixel data ...


5

A singleton for your main engine class is perfectly normal. It's even quite acceptable to have one singleton for each of your game's major systems, like graphics and input. I personally prefer a single Engine singleton with all systems as members of that object, but really there's very little difference. A singleton can just be a static global object, ...


5

The main problem with static and global objects in C++ is that they are created before the application's entry point (i.e. main), but their constructors are called in a completely unpredictable order. The same is true for their destructors, at the end of the application. This is clearly a problem because often we will have objects that depend on each other, ...


5

Heres your problem notice I comment out the surface = SDL_Get... it was giving some weird results. Also you forgot to create the OpenGL context. Let me know if you have any other issues. SDLWindow::SDLWindow(int width, int height, double axisLen, const std::string &caption) :m_fov(axisLen) ,m_width(0) ,m_height(0) ,m_fps(0) ,m_idxSnapshot(0) ...


4

For lighting to work, every vertex needs a normal. What seems to be the case right now is that all of your vertices have the same normal, which is why all the faces are getting the same amount of light. To calculate the normal for a triangle, take the cross-product using two of its sides and normalize it. However, this will produce hard edges, which are ...


4

1024x768 (or less) is still the minimum resolution you should be targeting. Plenty of laptops sold between ~2006 and now have fully capable video cards, but are stuck to the same resolution they were sold at. Depending on the game, it may be even less - netbooks commonly sold with a 1024x600 resolution during the same period, so a casual or web-based game ...


4

This is a general post about why static classes cause you more trouble than they are worth. And this includes singleton classes which are just a fancy way of doing the same thing that avoids construction order problems. No advice fits all cases, so take it as advice, not as an instruction that it is always better to do it this way. In general code shouldn't ...


3

In order to get on the Xbox you can start out making a PC game using XNA, and if it's good it shouldn't be a big problem to get the right permissions so that you can port it to Xbox 360. If you are on the "a dev kit is probably too expensive" stage, don't even bother considering the PlayStation 3 a potential target platform.


3

I don't know if this worth to be an answer but as it's too long to be a comment... here are some informations that might help you. You should take a look at this small article. It enumerates 10 rules to write cross-platform C/C++ code. And one idea that particularly pushed me to change my development organization, is that it would be more "optimized" ...


3

According to this, the hardware supports OpenGL 4.0, but the Mac drivers/OSX only support 3.2. That should still get you GLSL 1.50 (you might not be able to get 1.30 or 1.40), but you need to use the core profile, as OSX doesn't support the compatibility profile. I think SDL defaults to the compatibility mode, so you probably need to explicitly request core ...


3

There are a few options available to you: Buy a Mac: This is the most full-proof, but probably the most expensive. If you can figure out what exactly you need (eg. Lion vs. Leopard), you can probably save some of the cost by buying something that's not latest-and-greatest, but "good enough" for development. Run a Mac VM: This is usually illegal (depending ...


3

I friend of mine just released his game with MonoTouch (http://xamarin.com/monotouch). You just need to create your game in C#, then this software can compile the source to iOS and Android. (And of course, because of the C#, you can also release it on Windows Phone.) Really good stuff.


3

DirectX is written for OS Windows with own optimizations to platform, etc. There aren't any realizations of it for another platforms. OpenGL is an open alternative which started grow when mobile and tables become more powerful to render some hard scenes. Anyway, I'd give you and advise to write everything using OpenGL, but it's only my opinion. It's free, ...


3

Xbox 360 controllers do not conform to USB HID game controller standards. Even Windows computers require installation of a special, custom driver in order to use them. Mac computers do not ship with support for Xbox 360 controllers (though they do ship with native support for USB HID game controllers). To use one, you'll need to install a driver for it. ...


2

If you are experienced with C#, then better use Mono and OpenTK for your OpenGL learning. Mono is a free, cross-platform implementation of .NET (so you won't need to learn any new APIs) and OpenTK is a C# wrapper for all OpenGL functions, including some basic math, input and sound libraries.


2

In addition to what Maik said, you'll struggle to find something with the same performance profile as the Xbox 360 CPU. From the public version of the hardware spec on Wikipedia (as the XDK stuff is under NDA) you can see that the CPU is "in-order" execution where most if not all "desktop" CPU's. This one big difference can make a massive difference to the ...


2

So, an hour or so of fiddling and trying different libraries, and it seems OIS (and SDL) just recognises the controller as a joystick and provides me with everything I need. If you install OIS from the link above, and make/run the 'ConsoleTest' project, you can see the output from the controller in the debug window. Additionally, here's enums i've been ...


2

The original Quake 3 source was released quite some time ago. I wouldn't be surprised if it's out of date. I would suggest the ioquake3 version, except that I tried it recently on Leopard and the build failed for me. Your mileage may vary. The ioquake there is essentially just bug fixes and maintenance work on top of the original quake3 source. If you ...



Only top voted, non community-wiki answers of a minimum length are eligible