• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Very good Game Code Tutorial

 
Mehdi Chaouachi
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I recently found a very good game api code tutorial. It could be very helpfull to the people who are still preparing for the beta, since the exam has a lot of code questions on this part.
The original link is here :
http://www.microjava.com/articles/techtalk/midp2_games

I have also created a word version from the html tutorial, it can be downloaded here :
http://magikcm.europe.webmatrixhosting.net/gametut.zip
 
Mehdi Chaouachi
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thers is also another article about improving performance in games.
I am not sure if it could help for the exam, but here is the link:
http://www.microjava.com/articles/techtalk/optimization?content_id=7097
 
calvin zhu
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks a lot!
 
Stephen Pride
Ranch Hand
Posts: 121
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Mehdi Chaouachi:
I recently found a very good game api code tutorial. It could be very helpfull to the people who are still preparing for the beta, since the exam has a lot of code questions on this part.
The original link is here :
http://www.microjava.com/articles/techtalk/midp2_games

I read this article last year when I was trying to understand the Game API. At the time, I thought it was a wonderful article (and, for the most part, still do). However - and this may be pet peeve of mine - the structure of the program is not very good for the architecture it is on. By this I mean, the author has done an "okay" job of creating an application full of object-oriented principles, but a lot of times those object-oriented principles leads to a bloated application. One of the main things to do when writing mobile applications is to reduce the number of classes/interfaces. If this was a production application with a lot more features involved, it could very well reach the limits of the device. I can't remember the article in detail, but I don't recall the author mentioning this aspect at all.
For instance, I created a Boulderdash clone last year in order to understand much of the Game API and MMAPI. It would probably require 10-20 classes/interfaces if I were to make it completely object-oriented, but instead, it only had two classes and no interfaces.
 
Marc Peabody
pie sneak
Sheriff
Posts: 4727
Mac Ruby VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A GameCanvas, Thread, LayerManager, CommandListener, 2 Sprites, and a TiledLayer...
Which classes do you think should not have been included??? :roll:
 
Stephen Pride
Ranch Hand
Posts: 121
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Marc Peabody:
A GameCanvas, Thread, LayerManager, CommandListener, 2 Sprites, and a TiledLayer...
Which classes do you think should not have been included??? :roll:

Sorry. My original statement should have read:
For instance, I created a Boulderdash clone last year in order to understand much of the Game API and MMAPI. It would probably require 10-20 user-defineed classes/interfaces if I were to make it completely object-oriented, but instead, it only had two user-defined classes and no interfaces.

As far as the demo is concerned, its okay for a small game that it is (a demo). But if this were a large-scale application requiring a lot of objects, a different design would be probably be needed to save resources. IOW, creating a class for each object that the application will use could very well chew-up a lot of resources and present resource waste. The game I created had ~20 objects, yet no classes/interfaces were created for any of the objects (which they could have easily been to make the design a lot more object-oriented). As wireless devices become more-and-more robust, and resource monitoring becomes less of an issue, I feel more applications will not only become more robust, but the design will tend to lead towards more of the object-oriented approach.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic