Tag Info

Hot answers tagged

16

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 ...


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 ...


10

Sleep calls are an extremely bad way of controlling framerate. Use them to reduce CPU usage for sure, but don't use them to control framerate. usleep(1000 * 15), a 15-millisecond pause (~67 FPS, in theory) No, it's not. First of all, see the documentation for usleep: The actual time slept may be longer, due to system latencies and possible ...


9

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/iOS device 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 ...


7

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 ...


7

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 ...


7

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, ...


6

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: ...


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

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. ...


6

It is highly not recommended to make an iPad game without a device. The simulator is decent, but some things cannot be tested properly on it. For example, In App Purchases cannot be tested without a device. And believe me, you want to test those things. You also won't get much of an idea of its performance on the simulator since it may run much faster or ...


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

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 ...


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

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

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 ...


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 ...


4

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 ...


4

Found it! The FBX Converter can be downloaded from the FBX Plug-Ins, Converter, and QuickTime Viewer Downloads page. One opened there's an "Add FBX Viewer" button which can display FBX contents and animations.


4

Using the latest SFML from github (2.1 should also work but I didn't test with it) you can listen for the sf::Event::JoystickConnected and sf::Event::JoystickDisconnected events as described in the SFML Events Tutorial. I've tested the events and they are both fired on Mac and Windows. A sample program to test this would look like: #include ...


3

As a fellow Mac user, I'd like to offer an additional factor: the CPU scheduler in OS X is more "fair" than in Windows. This is sort of a complicated computer science topic, so here's a simple way to think of your CPU scheduler: your processor has to juggle many tasks at once (all your open programs, plus background system processes). It can only actually ...


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

Have you considered using something like Unity 3d? It has the advantage of running on multiple platforms (web/iphone/ipad/andriod/wii/pc/mac and soon ps3 & xbox360). Here are some resources for Unity 3d, http://unity3d.com/support/resources/ http://www.youtube.com/watch?v=5-X-Ebh1kYA ...


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" ...



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