Using Mouse/s. In theory, how difficult would it be to remake a "Pong" or "Poing" (ping pong) game? - mouse

I have seen a key version in an excellent book for beginners
Programming Games for Beginners, by Conrod & Tylee. But this kills the classic tv console I first played as a boy age 6.
I did write awhile ago to Kidware software, the publishers. But as yet nothing.
I even bought extra USB Mouse, with no clues as to how to install it in the game, let alone use it to control the sticks.
I'm only a very beginner, and would need simple terms if possible. Or a direction, ideally to where it has been done.
I have looked everywhere for books. But I can't even find books that cover much of the mouse control at all. Not even drag and drop etc. Though I have seen some bits on these excellent pages.
All in all I'm really drawing a blank here! Please help.

Related

Beginner path to Game Development for OS X and iPhone

Another question. I have been researching everything this wonderful community has offered me in terms of my journey to pursue game development.
I have come to the conclusion that I would prefer to develop on my native machine, OS X - eventually leading to the iPhone.
I already own both Big Nerd Ranch guide's, Iphone Programming - the Big Nerd Ranch Guide and Learn to Program on Mac OS X - the big Nerd Ranch Guide.
My goal that I am trying to shoot for is a game similar to Blizzard's Diablo II.
When going through these books, everything seemed a bit over my head due to lack of Objective-C experience (so I suspect).
What it the best beginner friendly way for me to reach my goals? I have been looking at Objective-C books for beginners from Apress and the like, or straight C books.
How would experienced developers such as yourself guide a newbie through this path?
Regards
edit -
To answer why I have picked the apple route, it just looks to be the most comfortable (environment is native to the machine). I may be very wrong though. I was looking at Unity, it supports C#, JavaScript and Boo. Others like Panda3D use Python. I am just not sure, it seems like the decision process has become rather challenging.
It depends on the kind of game you're making - but many of the top games on iPhone were created with an open-source framework called cocos2d. It is fabulous, simplifies everything, has great tutorials and is available specifically for the iPhone.
Check it out at:
http://www.cocos2d-iphone.org/
I would recommend you
a) learn the basics of C (especially memory management)
b) learn the basics of Objective-C
c) learn the iPhone SDK from a book (I liked "Beginning iPhone Development" and its 2nd volume)
d) pick any project you find interesting and that is not too challenging and just code. You will find that by the time you are done, you probably think the things you did first are horrible, but you will learn a lot in the process
e) visit Stackoverflow.com as often at possible, it has most of the answers to the questions you will have :)
If you're working on a Mac, then things get interesting.
The largest game markets by several orders of magnitude are consoles and Windows. If you're just targeting the iPhone and OSX, the Mac is ideal for development. However, this is a limited (Mac OS), VERY competitive (iPhone) market. If you want to make something that will become a real product with real sales, limiting yourself to OSX from the starting gate is probably a mistake.
If you're just starting out and want to learn what makes all this game crap tick, stick with the language and OS that you're most comfortable with. Introducing too many variables into a learning expedition is a significant ingredient in failure. One of the nice things about this sort of app is that the algorithms and techniques you'll pick up are inherently cross-platform. Matrices are matrices, whether you're working on a TI-89 or an Alienware desktop.
However, if this is the case, try and remain aware of what platform-specific widgets you're using in your code. Plan to throw this one away. Write a bunch of test apps. And, when you feel confident that you're ready to build something real, you'll be ready to break out a VM or a new desktop with Windows (I LOVE XNA), C++ with DirectX or OpenGL, or whatever, and the variables, the new material you have to learn, won't be about graphics or math or gameplay, but about the platform itself.
Writing "Hello, World!" is a lot easier if you're not figuring out what you're trying to say, but only how to say it.
Also, rather than aiming for a Blizzard clone, start with something dirt simple, like Pong. Then make 3D Pong. Then add gravity. Then collision detection. And so on.
Also check out gamedev.stackexchange.com when you have game dev-specific questions. It's a LOT lower-traffic than SO, and a lot of the participants are teenage fanboys, but there is good knowledge there ready to be tapped.
You can develop a small game for the iPhone quite quickly once you've mastered Objective C and the iOS APIs. It took me about 4 weeks to develop a small iPhone-only game with limited game logic. Here's a writeup of my experiences:
http://corrino-software.com/how_long_does_it_take_to_make_an_iphone_game
However, something like a Diablo-style game would be a massive project. As David says, you're better off starting with something smaller and more managable to begin with, then you can move up to larger projects once you're comfortable with the development process and familiar with the tools and libraries you'll need.
If I were you, I'd start out with C, learn the fundamentals of programming, algorithms, and memory allocation (incredibly important concept in C). Then, you can move up to reading some books on Objective-C and get an idea for object-oriented programming and higher-level concepts like dynamic typing, garbage collection, etc.
As for software, if you're on OS X you want to get XCode, which is an integrated development environment developed by Apple for developing for iOS and OS X. Apparently, it's a free download (though that's just what Apple says on their website, dunno, I don't have a Mac).
As for books, etc. I'd just get some straight C books and look at some tutorials. Read them from cover to cover, and pay special attention to the important (and frustrating) concepts of memory allocation and management and pointers.
I find that a good way to learn a new language is to start with replicating common command-line tools like wc, grep, ls, etc. This will teach you the basics of I/O (both file and stdin/stdout) and some basic string parsing, as well as other goodies here and there. Additionally, you have a deterministic method of determining whether your program does it right or not, since you can easily compare to the standard command's output or behavior.
K&R, as well as Programming in Objective-C 2.0, are good places to learn the basics of C and Objective-C.
Once you have the basics of the language down, start with basic GUI programs (the ones in Hillegass's book are a good start). Once you can hook a basic GUI on the front of some underlying logic, it's time to start thinking more seriously about your game. Hillegass's book has a basic intro to using NSOpenGLView, which you can use to manually draw in 2D and 3D. It's important to note that when going through the examples in any book, you'll want to thoroughly understand what they're doing and how they're doing it, enough so that you can make some modifications yourself to enhance/change the behavior of the sample program you're working with.
Once you understand the basics of how your underlying game logic can hook to something the user can see, it's time to go find a game/drawing library that will get you where you're going. You definitely don't want to write all of the graphics routines yourself for a game similar to Diablo.

Any other game SDK besides CORONA for the iphone/ipad

Does anyone know of another good game SDK/Engine for the ipad or iphone other than CORONA?
Have a look at Cocos2d
Well since you didn't mention you need it to be free, I'd cast unity into consideration.
It's as powerful as it is expensive ;)
The above answers are great possibilities. I highly recommend unity as it just came out with its newest release that offers a gajillion wonderful features like batch rendering, beast lighting, etc. Its also ridiculously easy to program (im surprised there isn't a 'make this game for me' button in it). The price is worth it. By clicking a button, you can publish your game to pc, Mac, web, iPhone, iPad, xbox, wii, ps3, or android, depending on whether you purchased the license for each. It' bloody magic. Keep in mind that you need to buy the unity pro license before you buy the iOS license. One does not work without the other. It'll be a total of around 3 grand USD, but again totally worth it. Community is rad and helpful too.
If you're going the free route and have some coding chops, I'd run with openFrameworks. It's a c++ wrapper of the iphone sdk and has a very low learning curve. OpenFrameworks was created for artists who wanted to make interactive installations and art games but couldn't get really deep into objective c. Check out zach gage's work (stfj). He made bit pilot, unify, synthpond, and sonic wire sculptor all in open frameworks. He's also releasing his best yet very soon for the iPad. My own company is using oF (openFrameworks) for it's new game releasing this coming Saturday. Try it out. I guarantee you'll find something you love about it.
Good question. For very specific gaming needs, PhoneGap is worth a look. But considering it's JavaScript/ HTML/ CSS, it will not be as fast as the (IMO terrific) Corona. But if your game is in any way more page-related than sprite-animation related, give it a look. I created most of the games at VersusPad.com using PhoneGap, but now switched to Corona.

How to make a connect 4 iphone game?

I want to take the next step and make a game, I had Connect4/4 in a Row in mind.
How would I go about with this, I made a pong game from a tutorial and now I want to make something on my own. This type of game doesn't seem that hard to make or perhaps it is?
Anyone got any good advice or some sample code or instructions?
Thanks for all help guys.
David H
Have you ever heard of cocos2d? Its a framework for making 2d games for the iphone.
The community is very helpful, i think it might help you in your aims to 'take the next step'
http://www.cocos2d-iphone.org
Glad to hear you're interested! The way I went about my first steps of game programming was to learn everything I could about computers/programming in order to make games. If you’re not 14 any more, and thus infinite time no longer is available, I’d recommend you start out with two tutorials, one for plain application programming on the platform at hand and the other for learning more specifically how to make games for that platform.
After that, pick what boilerplate you want/need from the public domain, and set out to produce your completely own thing. And hey, good luck (you’ll need it)!

How hard is iPhone/iPad development

I've been developing for quite a while but while I consider myself competent (or better) with C++, Java, C# & AS3/Flex in areas from web-servers to desktop applications to 3D games, I'm aware all these languages are pretty similar; even on the libraries side I know what to look for based on using libraries that do similar things in another language.
But Objective C I understand to be a different kettle of fish, and developing for mobile devices has always struck me as likely to be hard work since you have to develop on your PC and test on the actual device itself - my experience developing for PS2 put me off such things due to poor debuggers and other tools.
What's the reality? Is it a paradigm shift to move from web-servers and desktop apps and rich web-clients to iPhone... or for an experienced developer is it just another language to learn and new libraries to play with? Is there anything to be scared about at all?
edit: My main question on Obj-C specifically was if it's a different way of programming, like it would be moving to Haskell from Java for instance. It sounds this is not the case.
For starters, ObjC is fairly easy to grasp so long as you focus on the fundamentals. Don't worry about the syntax, there's not much there above C which I will presume you already are familiar with. There are excellent books out there this book is the definitive guide I recommend to most new users, Erica Sadun also has a good book on iPhone development, I recommend both of these highly.
Secondly, the tools aren't hard to use, and you will be pleasantly surprised with the debugger and other tool integration. Instruments was a long time coming, but it's indispensable for catching things like memory leaks, cpu time usage, and now power consumption.
But really, nothing to be scared about, and as for another platform to learn; well, yes and no. There is always going to be another thing to learn, regardless of iPhone or something else. Don't resist. :)
There's definitely a "paradigm shift" (ugh, buzzwords):
You don't have all the memory in the world (and there's no swap either)
You don't have all the CPU time in the world
You probably don't want a binary bigger than about 20 MB (the size that can be downloaded over the cell network)
You can't just change the server backend to make things right.
Graphic design is important if you want to be successful (but you don't want to bloat your app)
Web requests take a while (a website with redirects feels really slow compared to the desktop beside it).
JavaScript animations are painfully slow (ever tried the Google Maps website on an iPhone?)
UI design is heavily constrained by the size of the user's finger (even though the iPhone 4 has a comparatively huge screen).
UI design is really tedious.
The user can do more things than clicking and typing.
I find that the biggest difference is in the UI, not in the language. Languages are easy. Libraries require a little reading/searching/asking around, but then they're easy. UI design and UI programming are very difficult to do well.
Objective C is different but not far removed from normal OO methods. The syntax was the larger barrier for me.
The problem I saw was/is you learn ObjC for iPhone, and you can't take the skill (ObjC knowledge) outside the Applesphere really. I haven't seen a use for it. I have a handful of books I went through to get my feet wet. Some of these, the Apress books, contained errors in the code walkthroughs causing me to Google the book errata countless times.. so be careful of that, if you learn that way.
Also, unless this has changed, you can only develop under OSX with the SDK tools because no Windows version exists to my knowledge.
With that, you also have to play by Apples development rules to get published into the AppStore, which has had its share of dev horror stories.
That said, a working app is fun and beautiful in the end.
On a scale of 1 to 10, it's about a 6.
Apple does use Objective C and it is different then normal C. So Iphone and IPad development can be hard if you've never used Objective-C before. If you are familiar at all with a language called SmallTalk, then Objective-C will be very easy for you to pick up.
Now other mobile devices, such as Android, uses Java. If you are competent in Java then Android development may be easier for you.
Some devices use Windows Mobile. If you are a .NET programmer, you can use .NET compact framework to develop Windows Mobile Apps.
Just so you know too, most mobile SDKs come with an emulator to test your app on. So if you don't have an iPhone, for example, you can still test your app with the emulator. I understand that the emulator is supposed to be 99% as accurate as an actual device
I don't think there's anything to be scared of.
The simulator's pretty alright, even if it can't handle some things - it's hard to simulate the accelerometer, for instance!
Once you're over the hurdle of figuring out what certs you need and setting up the iPhone development account and such, it's fine.
It's a bit of a pain writing something, loading it on the device, trying it out, etc., but the fact that you can actually debug the code running on the device makes it rather a lot nicer than it could be. (I had to maintain an application for the Nokia 9110, and there I had to edit, compile, load, run, crash blindly, stare at code, guess, edit, compile, etc.)
As a long time Windows C++ / .NET developer, I didn't find it very difficult to begin developing in Objective C.
There are some syntax differences that take some getting used to, but in general it similar enough to C/C++ to not feel like a completely new language.
Learning the library code and what you can and can't do easily seems like the larger challenge to me, which is going to be a challenge with any new platform.
I am writing a beginner book called Hello! iPhone, and I've made a mailing list of beginner tips to help people get started. After a week or so of tips, you'll be much more equipped to check out other books and understand the basics a bit better to judge.
http://loufranco.com/beginner-iphone-programming-tips/
It will take you through Hello, World and some other simple stuff (Outlets and Actions, basic memory management, etc).

User Interface inspiration for iPhone Apps

Does anyone have any suggestions for a site that potentially has some inspirational user interfaces for building my own iPhone Apps. It's straight forward to continually build out applications with the conventional UIKit widgets, but it does not set you apart from the competition. Some resources on how to build attractive interfaces is highly desired for inspiration. This is for someone with minimal Photoshop/Illustrator skills, but doesn't mind using sites such as iStockPhoto and working with custom views.
Apple is historically well-known for the user interfaces of its products and programs written for them, but in recent years it has come under fire for seemingly allowing its Human Interface Guidelines (HIG) to lapse. Some of the best Mac and iPhone applications are actually those that deviate from the HIG, but not so much that usability (or acceptance into the App Store) is sacrificed (see link text).
Examples of such innovative iPhone applications can be found in the iPhone app and web app showcases of Apple Design Award winners. These apps have been judged by Apple itself to be creative, inspiring, and exemplary of the iPhone platform's potential as a mobile computing device.
Go to your local best buy, game stop, or any other store with xbox360s, wiis and playstation 3s lying around. Play every single demo on these machines and rate them solely on UI experience. Triple A console games still lead the interface world in my opinion. Soft synths are a close second and also often have beautiful UIs (as Chris Schreiner pointed out). A quick trip through logic will give you a glimpse of apple's own work in that direction.
You might want to check out this article by Matt Gemmell about his process in designing the UI for his Favorites app.
10 Gorgeously Designed iPhone Applications has some very nicely designed apps.
I spent a long time getting this one together, it's a full list of every single ios inspiration / mobile css gallery I could find on the internet. Let me know if you find any others so I can add them!
http://www.kintek.com.au/web-design-blog/iphone-mobile-css-gallery-listing-ios-inspiration/
Maybe this will help: My source of inspiration comes from the software-synth domain. Circle from FAW comes to mind. Ableton Live is (in my book) something to look at.
Heres a good article about designing the Convertbot application. A very simple app that stands out because of its UI.
I hate to burst your bubble, but great design is not something you will get from finding a "site" to look at. Major universities have graduate design programs, that's the kind of place where some people learn to be great designers. Multiple courses and textbooks on design and all the related areas (art, architecture, psychology, biomechanics, etc., etc.) I've seen too many engineers, without at least some of this training, routinely suggest some really bad UI design ideas. Don't be another one of them.
Treat learning great design as something far bigger than finding a site (or learning another programming language, etc.), more like a multi-year endeavor, and you might have a chance.
Or find and team up with someone who's already an experienced designer.