Tag Info

Hot answers tagged

8

Am I hurting myself by learning C++ before... No, C++ is a good way to learn about all the basics of programming, including Object Oriented programming, and memory management which might be handled for you in other languages. There's got to be a reason the university requires C++ It is an industry standard across the world. It is quite portable as there ...


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

It is against the Apple and Mac OS terms of agreement to install Mac OS on anything aside from an Apple authorized machine. You are in breach of your user agreement by doing even that. So app-store stuff aside - you are in legal hot water. However! Pushing that aside, I'd like to note at least one game has been published with a similar method as the one you ...


7

You're not hurting yourself because you're doing what is required by your school. Learning to program is only partially about learning the syntax of a specific language (and it's a small part!). Right now you're learning to think logically and like a programmer. Don't worry about learning things you don't need, because it's all useful in some way.


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


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


4

NVIDIA's Cg Toolkit should be able to compile (or translate) shaders offline and spit errors. Another option is to create a tiny executable yourself that takes in a shader file and tries to compile it with your GPU driver's compiler (or perhaps such a compiler is already provided for you by the vendor). Though I think at least in the latter cases many ...


4

I actually found a simple solution! Changed the character objects to not only include info and sprite, but also a CGPath. Then implemented a method, to loop all character objects, and check for CGPathContainsPoint( params ...) instead for CGRectContainsPoint( params ...) Tutorial I used: http://www.youtube.com/watch?v=HxHZwzaadNQ - "The magic of ...


3

No, if you are referring to writing Objective-C using the Cocos2D framework to do animations, your animator will not be able to do so without xCode. He could write the code in a text file and pass that to you, but will not be able to compile them to check that they do work (which really defeats the purpose I suppose.) However, if you only need sprite ...


3

My guess is that none of those static library variables are used directly by the executable. The compiler likes to optimize these situations by removing the initialization code of unused variables. For this thing to work, you have to at least touch each variable (do a read/write that cannot be optimized out*) that you want initialized from all static ...


2

Objective-C is but one of many languages you can learn to use for iOS programming. Not only are you completely free to write C and C++ code on iOS (with some caveats), Apple also supports a language called Objective-C++, which is exactly what it sounds like. While you do not need to use Objective-C to program your core application, the Apple APIs are all ...


2

I'm unfamiliar with objective C, so I can't give any specific code. But the general way to accomplish things like this is by doing a per pixel collision check. Basically it works just like how you have it based on the rectangle, but before firing the touch event, you have to loop through all the pixels that were touched and make sure at least one of them ...


2

I dont know the version of the sdk you are using, but in the latest version Game Center now support multiplayer games, witch means now Game Center can handle all data exchange. Take a look at this tutorial: How To Make A Simple Multiplayer Game with Game Center Tutorial: Part 1/2


2

Do as ryrich said, however the actual code on Objective-C would be something like this: (Assuming your CCNode class is called "Seal") int sealCounter = 0; for (id *node in self.children) { if ([node isKindOfClass:[Seal class]]) { sealCounter++; } }


2

Build your own level editor - it's the conclusion I came to after having developed several games. A simple editor would involve creating some simple buttons (the items in the levels) and some simple logic for positioning, rotating and scaling them on stage. After you have all the items in a level just push their details (position, type, etc) to an/or several ...


1

Remember that SpriteKit's physics system is based on "SKPhysicsBody"s, which are added to "SKSpriteNode"s. Those physics bodies, however, needn't be attached to visible nodes. The simplest method is to create a SpriteNode with no actual sprite or visible body, add it as a child to the area you want on the visible shape, and categorize it differently from ...


1

Wrapping the SKEmitterNode in an SKEffectNode allows the EmitterNode to be rendered into a framebuffer which is subsequently rendered onto the screen. I tested this out (after much push and pull of different nodes and scenes and views) and this results in the exact effect you want, where the Add blend mode is applied to a background that is not rendered ...


1

The trick is to use the CCScrollViewDelegate methods to detect scroll events. Add a CCLabelTTF and call it _pageLabel. In Xcode, make the scene containing your scroll view adhere to the CCScrollViewDelegate : @interface myScene : CCNode <CCScrollViewDelegate> Then, in didLoadFromCCB, set the scroll view delegate to self : _scrollView.delegate = ...


1

It seems that Unity 4.1 changed the trampoline project pretty significantly. There must be a plugin or something that your older project is using that is referencing that old file and needs to be updated to Unity 4.1.


1

This is only a guess, but as far as I know you should include SDL as <SDL.h>. As I can see that you include SDL as <SDL/SDL.h> and SDL Mixer as "SDL_mixer.h", the problem is that the header of SDL_mixer.h includes <SDL_types.h>, but in your case it would have to be <SDL/SDL_types.h>. You should either extend the include search path ...


1

I must admit I haven't visited the pages you link to, so I don't know where you have looked already, but on my machine they seem to be in $HOME/Library/Developer/Xcode/Templates


1

I don't think there's such a thing as a "Game UI Tempalte-Only Engine". Really your best bet for getting IOS and Android dev in one go + out of the box UI widgets (such as text , buttons, etc) is Unity. I find it a lot easier than the run of the mill "Open GL Text libraries" and such: http://docs.unity3d.com/Documentation/Components/gui-Basics.html


1

This answer actually fixes the issue: Use the -all_load linker option to load all members of static libraries. Or for a specific library, use -force_load path_to_archive. In Xcode, you'll want to add these options under "Other Linker Flags" for your executable (not your static library).


1

Found the answer: it was the Normals: GLfloat norms[36] = { 0, -1, 0, 0, -1, 0, 0, -1, 0, 1, 0.25, -0.5, 1, 0.25, -0.5, 1, 0.25, -0.5, -1, 0.25, -0.5, -1, 0.25, -0.5, -1, 0.25, -0.5, 0, 0.5, 1, 0, 0.5, 1, 0, 0.5, 1 }; These are the correct ones. For some reason the maths I used produced some numbers that were negative when they shouldn't have been. ...


1

The reason it is different speeds is because you are not calculating/using a delta time. Basically the frame rate could be any number at any time slowing or speeding up your animations. To counteract this, programmers calculate a delta time: delta = currentTime - previousFramesTime; // time difference between this frame and the last frame Then use this in ...


1

C++ is where almost every new programmer learn about object-oriented designs first (at least in my area, it's true). So you are not hurting yourself. Also you can develop iOS (even Android )apps in C++. If you are thinking to go into game-development, C++ is the de-facto language here, supported by most of the game-engines. So learning C++ is always a ...


1

Also (in addition to the other answers posted), objective C is a layer on top of C and most of the code you will be writing is c and c++.



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