iPhone gaming is officially AWESOME.

Miscellaneous Forums/General Discussion/iPhone gaming is officially AWESOME.

Just downloaded a little free game called Labyrinth. You tilt the iPhone to make a silver ball roll around a wooden maze. It's extremely simple, but the control is super responsive and it's way more fun than any other cellphone game I've played.

(Which isn't actually saying much because every other cellphone game I've ever played has been complete crap, but you get my drift.)

If only I didn't have to code in C to write applications for the damn thing. :-(

Swift have you tried their "I am rich application". I've heard it makes you feel rich :P 8 people bought it so far, one license costs 999$

Maybe that can inspire you to write application in C for iphone ;)

Get the iBeer app. it's awesome =]

I've got marble madness on my sony phone where you tilt it to move the ball, was cool, responsive etc... for the first 5 minutes before the novelty wore off.

Just downloaded a little free game called Labyrinth
I actually have the original WOODEN version of that game.

There's a game for it called Enigmo or something, that's really fun too :D

You know what else would be really fun? BlitzMax updates. Ohhh yeah!

Yeah the iBeer pint is great fun and very realistic too.

IPete2.

Programming in Obj-C is actually not that hard. But I'm also a C# programmer.
I'm working on my first iphone app right now.

I bet Swift will be an iphone developer soon, after he reads this article:

http://www.sitepoint.com/blogs/2008/08/05/can-you-make-a-living-as-an-iphone-developer/

;)

The documentation for the SDK is great, writing apps is easy. Everyone needs to get over the C fear. It's all the same if the documentation is solid.

I did read that article. My distaste for C however is strong!

Also, I wonder what the economics of being a developer will be when there's thousands of apps out there? It's not very easy to browse the store even with the few hundreds of apps there now seem to be. I guess people could browse by what's new, but what happens when developers start resubmitting stuff to stay at the top of the list because sales plummet?

And did you guys get that iBeer program free, because I can't see spending $3 on it, and that's the current price. :-)

I've just bagged a Mac Mini Core 2 Duo, and I'm just installing the iPhone SDK. The idea of developing iPhone/iPod Touch apps/games really appeals to me for some reason...

If only I didn't have to code in C to write applications for the damn thing. :-(
What's wrong with C?

Is it plain old C, or some variant of C++?

I don't like C because I haven't coded in it in years, and when I did code in it I didn't have a manual so I had to learn from other people's code, and everything about pointers and structs was confusing to me at the time.

Then when I finally did gain an understanding of structs and pointers, C++ and Windows, and DirectX comes along with a whole new programming paradigm and I just gave up programming for several years until I found Visual Basic, but I gave up on that too when I couldn't make DirectX work from it because I couldn't read the DirectX examples in the book I bought because they were written in C++.

It was only when Dark Basic came along five years later that I really got back into programming.

And even though I now understand the concept of objects from using them in BlitzMax, I still don't understand C++ code when I look at it. It's not like I can look up what :: means on the web. That's not the sort of thing you can easily search for using Google.

I mean I just entered a search for "what does :: mean in C++" and I get a page that answers the question "What does << mean in C++?" instead. And then I read that page just for kicks, knowing that << is the left shift operator, and I see:


It is common practice to overload this operator for user-defined types
as a stream insertion operator when applied to a reference to a
stream. This overload is supplied by several stream classes included
in the standard C++ library. But it does not change the original
meaning of the operator.



And then I remember why I vowed never to code in C again.

What's wrong with C?
There's something a bit absurd about sticking an OOP layer on a brackets-and-braces language. Why not, at that point, admit that you want to be abstracted from the way the computer works and use a language that cares more about making things easy for the programmer than the compiler? It's not that there's anything wrong with C but that it's 2008 and a game (rather than system/platform/engine) developer shouldn't have to concern himself with which .a files to link -- game dev should equal high-level scripting by now, granting access to the creatively minded rather than just the technically minded.

Is it plain old C, or some variant of C++?

It's Objective-C. Like (meaning functionally similar to) BlitzMax but way uglier.

I still don't understand C++ code when I look at it. It's not like I can look up what :: means on the web

The glyphs are what put me off C++ too. What's wrong with words?!

Ugh, you're right, that's worse than C++.

There's something a bit absurd about sticking an OOP layer on a brackets-and-braces language.

I like brackets-and-braces.

Why not, at that point, admit that you want to be abstracted from the way the computer works and use a language that cares more about making things easy for the programmer than the compiler?

C++ is still the fastest OOP language in existence (with the right compiler). That's important for game engines.

It's not that there's anything wrong with C but that it's 2008 and a game (rather than system/platform/engine) developer shouldn't have to concern himself with which .a files to link

What's an .a file? I use C++ all the time, and I never have to worry about that stuff :)

game dev should equal high-level scripting by now, granting access to the creatively minded rather than just the technically minded.

Yeah, a lot of games these days can be done with high level scripts like Python, but do you expect to code the 3D engine, pathfinding, etc. in a language like that? Of course not, that would be insane. Engines are programmed in fast C++, while high level game logic can be done in slow scripts. This way your artists (creatively minded people) can work on scripts, while the engine programmers (technically minded people) can work on the engine, with optimal efficiency on both sides.

The glyphs are what put me off C++ too. What's wrong with words?!

Once you get used to them, C++'s symbols become an acceleration - a productivity booster. You can type more code logic in less time, and it's every bit as understandable once you learn it.

Of course there's going to be some people who love C++ and especially because it has iconic status as being `popular`, but I agree with the others here in terms of how C and its derivatives are not exactly easy to read or understand. When for example you compare how a For-Next loop looks in Basic to how it looks in C, the C version is quite cryptic and that's before we get anywhere near object oriented stuff. I did take a brief look into Objective C but just could not get a handle on it because most tuition on the subject is too advanced and it is obscure to read. C is the kind of language which seems to be shrouded in requiring you to do lots of things `its way` just so that you can be a part of the crowd rather than whether it really is helping you in your development. I agree with what Sledge said about that.

I think there are really two approaches to developing software for computers - either you have to adapt to what the computer requires and basically do its job for it, serve it, conform to it, learn its steep curve of complexity and adapt to it, OR you get the computer to serve you, conform to you, learn from you and adapt to you. Basic at least takes steps to adapt to the developer rather than requiring a degree to understand these C languages. Of course some people really pride themselves on being competent in C, professionally developing in it and its derivatives, but if you aren't part of that crowd and you don't take some kind of course in it, then you're screwed.

C is to Basic what Microsoft Windows is compared to Apple Macs.

Also, I wonder what the economics of being a developer will be when there's thousands of apps out there?

My guess is that it'll be much like the economics of being a developer who sells games only on the casual game portals. Great money for the top few and precious little for everybody else. That won't stop many many developers from trying to get in the top few though.


Once you get used to them, C++'s symbols become an acceleration - a productivity booster. You can type more code logic in less time, and it's every bit as understandable once you learn it.


Please do tell how

               Several Pages of Code here
            }
         }
      }
   }


Can ever be as understandable as

               Several Pages of Code here
            End If
         Wend
      Until
   Next


I fail to see how constantly having to scroll back up to see which brace was for the While and which was for the for loop is a productivity saver.

               Several Pages of Code here
            }//End If
         }//Wend
      }//Until
   }//Next

Do not laugh -- I actually do this.

Gabriel: When I said "it" was an acceleration, I wasn't referring to just the brace style, but all of C/C++'s compact symbolic notation, which saves a lot of typing work. The brace method's drawback you illustrated is the one drawback of C/C++'s compact syntax, although for me it's not an issue.

C++ may not be a perfect language, but it's extremely capable, and is simply the best language for 3D game engine development. And I guess I'm lucky because I like it too.

:: Is the scope resolution operator. The purpose is to allow names
On the right side to be the same so long as the name on the left is different. This does boil down to the fact though that if you're working in one scope you don't always have to type out the scope and the scope resolution operator. Rather you can just call the function, method, or variable and know you're not screwing with something in another part of the codebase.

So what you're saying is that :: is the equivalent of . in Blitzmax, right?

That's what I thought it was.

So what you're saying is that :: is the equivalent of . in Blitzmax, right?

Not exactly. "::" allows you to access variables from various namespaces / global namespace / etc. If you don't know what a namespace is, it's a feature C++ has that allows you to group variables / functions, and give the group (namespace) a name.

For example, the Ogre engine (a 3D library) has classes for "Vector3", "Quaternion", "Matrix3", and other 3D maths classes. If you happen to be using another library that has an identically named class / global variable / function / etc., it wouldn't compile normally, but Ogre is grouped into an "Ogre" namespace. To access Ogre's class explicitly, you use the "::" operator. For example "Ogre::Vector3". Now so you don't have to type Ogre:: all the time, you can declare "using namespace Ogre;" (and other namespaces) at the top of a file and it will assume scope.

Overall a very useful feature, but different from BlitzMax's "." (which is still a "." in C++ [sometimes "->" though]).

I may have missed a post, but is there no engines, such as torque, that work for mobiles such as iPhone?

Ah, I see.

Overall a very useful feature, but different from BlitzMax's "." (which is still a "." in C++ [sometimes "->" though]).

Actually BlitzMax uses the "." for namespaces as well. They're slightly different from C++ namespaces in that they're tied in with modules, but they're still there.

Yes Torque is on the iPhone and probably some other systems too.

John's description was much better. Sorry, I was typing that while out waiting for dinner on my iPhone.

Would that make it iDinner?

I have a wooden one too... great fun. I'm going to go find it now actually.

               Several Pages of Code here
            }
         }
      }
   }

Syntax highlighting fixes this. If you click on a brace it is highlighted, then you can scroll and look for the other highlighted brace. If it's an important condition then you can type a comment at the end brace like this.
 } // end of while(!done) loop


When I asked 'What's wrong with C?', I meant C and not C++. I actually never liked C++ much myself.

I may have missed a post, but is there no engines, such as torque, that work for mobiles such as iPhone?
As well as torque there's apparently gonna be Unity.

big10:
I don't have a huge problem with plain old C, but I do prefer to have words instead of symbols, and I don't like trying to read other people's code in it.

But even so, you can't code in plain old C on the iPhone to my knowledge.

Syntax highlighting fixes this. If you click on a brace it is highlighted, then you can scroll and look for the other highlighted brace.

Syntax highlighting doesn't fix this. That's precisely what I referring to when I said "constantly having to scroll back up to see which brace was for the While and which was for the for loop".

If it's an important condition then you can type a comment at the end brace like this.

Great, and it comes in at a mere four times as much typing as doing it the Blitz way. Awesome productivity saver. If I could predict which loops I was going to come back to and read/edit/check/whatever later then I would just read/edit/check/whatever now and not come back later.

I see your point but really, what percentage of development time is spent actually typing? A fraction of 1%? Maybe it's just me?

I see your point but really, what percentage of development time is spent actually typing?

I didn't raise the issue of how less typing was a productivity saver. Frankly, I think that's nonsense. I was simply refuting the case that there even is a productivity saving in making your code less readable.

I see your point but really, what percentage of development time is spent actually typing? A fraction of 1%? Maybe it's just me?

It also saves screen space - more can be fit on the screen horizontally, which means you can do more complex operations per line in C/C++ than you can in basic, particularly when manipulating memory, pointers, and other advanced operations. Most importantly, it saves precious disk space... just kidding ;)

But again, C/C++ isn't perfect, but it works, and it works well. It's true that C/C++ takes longer to learn how to read "fluently", but once you do, it's even more readable than BASIC variants. Complaining that C/C++ is a confusing language without first learning to read it fluently is like claiming that German/etc. is a confusing language without learning it.

I learned the basics of C++ in college and after spending so much time with Torque and also writing extensions for Blitz I feel pretty comfortable with it. I agree with John that once you get it it's actually easier to navigate than BASIC. The thing you have to get over is comprehending the entire codebase all at once. It requires a bit of faith that the rest of the engine will still work just fine even though you don't know what's really going on elsewhere. Also, there's the stipulation that in order for the code to be easier to follow the language has to be used properly which means each segment of the code should be as simple as possible. People don't always break large tasks down appropriately and that is where it really gets tough. If you create an object well then its inheitence, methods, and members will make sense and it won't seem convoluted. Needless to say achieving this in practice is much harder than it seems. The language itself has always made sense to me but I've never used it to its potential.

Once you get used to them, C++'s symbols become an acceleration - a productivity booster. You can type more code logic in less time, and it's every bit as understandable once you learn it.

But again, C/C++ isn't perfect, but it works, and it works well. It's true that C/C++ takes longer to learn how to read "fluently", but once you do, it's even more readable than BASIC variants.

I don't doubt that this is absolutely true... but that doesn't stop C supersets being a barrier to entry for a whole slew of creatives who might otherwise benefit the platform. Now, as someone who is having a good look at the iPhone, I like non-financial barriers to entry -- they make sure I can expect far less competition should I dive in. And maybe that's Apple's rationale, because there's an assured market for mid-level programmers who will expect some sort of C superset awaiting them. But game development has, by and large, been the preserve of this demographic since it began and throughout that time 95% of games have been dross. Me, I'd really like to see what a far wider creative demographic can do with the technology, and that means providing a far higher level interface.

It also saves screen space - more can be fit on the screen horizontally, which means you can do more complex operations per line in C/C++ than you can in basic, particularly when manipulating memory, pointers, and other advanced operations.


That is not an advantage. One should strive to keep each line of text relatively simple, not cram as much into it as possible.

There's a reason why the code obfuscation contest uses C and not for form of basic.

That is not an advantage. One should strive to keep each line of text relatively simple, not cram as much into it as possible.

I could have used the same argument against the "{}" issue (it's best to keep code compact and orderly enough so that the "{" and "}" don't span too much more than a page of text anyway, except for a few cases), but I didn't because it would just be an excuse that tries to brush off the fact that BASIC is superior in that respect.

Similarly, you can't deny that C/C++'s code compactness is better, no matter how you look at it. Yes, it can be abused, but in experienced hands, having compact code is definitely helpful. Probably the most helpful thing about it is that it actually increases readability - with compact code, your eyes don't have to sift through nearly as much text, and you can literally read an entire code block at a glance (of course, provided you can read C/C++ "fluently").

OH... I CAN.

I CAN,

AND I WILL.

Syntax highlighting doesn't fix this. That's precisely what I referring to when I said "constantly having to scroll back up to see which brace was for the While and which was for the for loop".

Oh, that was your point. I didn't read that bit and thought you meant that a brace doesn't tell you whether a while, next, etc. was ended. I don't mind either of these things, I'd probably scroll just as much in BMax and it usually only takes a moment to check the type of an end brace.

I think it's just a case of whether you mind the syntax of a language. There are lots of languages I don't like the syntax of, for example I didn't like BMax for a long time because of the new Blitz syntax.

http://www.engadget.com/2008/08/11/jobs-60-million-iphone-apps-downloaded-confirms-kill-switch/

users have downloaded some 60 million programs for the iPhone representing sales of about $30 million since the launch last month -- a 30/70 revenue split between Apple and developers, respectively. "The thing's going to crest a half billion soon," Jobs added, "I've never seen anything like this in my career for software."

Swift you better start learning that objective C, and kick start your new carrier, a smart developer like you could make a decent living...

I've registered as iphone developer and downloaded the tools and will try to learn but this objective C looks damn confusing, and I especially hate those .h files where I have to declare everything and also I hate the pointers, it sucks how stone age C programing is...