Kamis, 30 April 2009

EA Special: Competition

Win a $10 iTunes Gift Card*

Need for Speed Undercover reviews will be accepted

iFoneReviews in Association with Electronic Arts are giving you a chance to win a $10 iTunes Gift Card in celebration of the latest game released, Tiger Woods PGA Tour.

As you have seen two Electronic Arts games have already been reviewed and during the competition we will have four or more reviews of Electronic Arts games out.

How To Participate-
1. To Participate in the game I thought I would see how good our viewers are at reviewing games.

To enter you must review one of Electronic Arts iPhone games that are on the below list
Tetris
Sudoku
Monopoly
Scrabble
Trivial Pursuit
SimCity
Spore Origins
Yahtzee Adventure
Tiger Woods PGA Tour
Pandemonium
Need for Speed: Undercover
American Idol
Anytime Pool
Star Trek

(Lemonade Tycoon and Spore Origins Lite are not available to be reviewed in this contest sorry)

You can review as many of the above game as you would like, but there will only be one winner. Reviewing multiple games may improve your chances. The best review as deemed by myself will win the competition.

All entries must include TEXT only.

All entries are to be emailed to me at ifonereviews.comp@gmail.com before the closing date

The competition is now started and will run until the review of Tiger Woods PGA Tour is posted. An estimated date is Thursday 14th May 11:59pm PST.

The $10 iTunes Gift Card is available for US Residents only.

The winning entry will be submitted to see if it has been plagiarized from another site. If this is the case the entry will be disqualified and another winner will be chosen. If you own a site and wish to use one of your own reviews then you will have to verify that you are in fact the owner of the site (Having a custom email address from that site is one way)

Any questions can be emailed to me at damon@razorianfly.com

Good Luck, iR

EA Special: SimCity

This is the second of two reviews leading up to something really cool from myself in association with Electronic Arts Mobile. Stay Tuned in the next few hours to find out what it is.



iTunes Link

SimCity is a building game by Electronic Arts. $5.99

Like Electronic Arts other games on the App Store, SimCity is a game based on a previously made game. SimCity is a kind of time management game that has had massive success in particular on the PC. Many people would have heard about the game and possibly even played or own it. Unlike games such as Scrabble and Monopoly, I have never played SimCity so I was interested how easy the iPhone version would be to pick up. After playing SimCity I gave the PC version a crack and it was good to see that SimCity was not just ported over, but totally re-made. I found the in-game tutorial for SimCity very helpful and provided a great starting point for first time players. There are many advisors that specialize in something related to the city who give you advice while the game is playing. SimCity has a massive replayability with an unique city and terrain to be created everytime, and success isn't always guaranteed. The game starts off in the year 1900 with buildings and transport that was available at the time, but as the years progress, so does the technology so better things can be built. SimCity takes quite a few goes to master building a successful city, but it is worth it.

Anyone who has played the previous games in the SimCity range would know that they are incredibly busy. This game is no different, and the quality of the graphics is just amazing. With so much detail needed in a large city of 500,000 people you could expect the game to be slow with dodgy graphics. When zoomed in the buildings are so detailed and superbly made. When the game is zoomed out the buildings are obviously harder to see, but the industrial, commercial and residential areas are easy to distinguish with the unique buildings in each area. SimCity isn't a large city with no one living in it however. When zoomed in you can see the bustling life of your Sims with helicopters and planes flying, boats arriving and people driving cars. No one however, is poor enough that they are forced to walk around.

SimCity isn't one of those games that you can just pick up and play without any prior knowledge of how to play it. The optional tutorial at the start of each new city is a great way to get to know how to play the game and provides good starting blocks for a successful city. All items such as zoning areas, roads, utilities, buildings, parks and bulldozers are accessed on the left hand side of the screen. Once some time has been spent playing the game, everything is alot easier to find in the menus. Each main icon has more options that can be placed onto your terrain. This is done by selecting it, then clicking on the desired place on the screen. Once there is can be moved with two fingers and enlarged in certain cases by one finger. There are many options down the bottom of the screen that can be accessed like the budget, advisors and help menu. I haven't mastered the using these tools and is probably why my city looks the same 115 years on and $500,000 in debt. To zoom in/out of your city you can either double tap the screen or pinch/push outwards with your fingers.

For a game that requires you to spend hours upon hours fine tuning your city to make sure the whole population is happy, the music for the game is pretty basic. There is a nice tune that seems to go on endlessly, but nothing that you would want to listen to for longer than a few minutes as it isn't very exciting. When closer into the city you can hear sounds from your city but that is about it. I would listen to your own music playing SimCity or none at all.

The basic aim of SimCity is to build the biggest and most profitable city that you can. While this sounds easy, the way to build a successful city is very hard. To start with you can either choose one of two pre-started cities, to start from scratch with one of three difficulty levels or a tutorial city. The pre-started cities aren't that fun as the building has all happened, but the likelihood of it being successful is higher. The difficulty levels only mean you start with different amounts of money. The tutorial city starts you off from scratch but gives you a good base for a successful city. Multiple cities can be being built on one device, so family members can take it in turns building their own city, or sabotaging others.

The way to build your city is kind of based on the same principal that real cities are based on. Cities are started small with designated areas for residential, commerical and industrial zones. These areas don't magically start getting buildings on them with nothing else done to them. Water and electricity needs to be supplied to the entire town, as well as some method of transport to all areas. Sims don't like being near pollution, so it is best to have industrial zones far away from the residental. I can go on and on about all the requirements for a successful city, but half the fun is working all of this out by yourself. SimCity to me is a massive time management game that blows all the other games out of the water. Sometimes, when a tornado strikes your city, this can literally blow you away.

SimCity is one of the most time consuming games to complete, and for the lower price of $5.99 it is definitely worth it. I have had a city running for over 120 years (Sim time) and there are still improvements that need to be done to it. This took me about 3 hours, and I basically zoned the entire terrain, provided alot of water towers, electricity and roads and left it to sit and develop. Obviously I have a poor population and am seriously in debt but with more time and effort put into the game is can turn into a major project. SimCity for the iPhone is an amazing game that could rival some of the older PC SimCity games. With a massive amount of replayability, great graphics and gameplay, anyone who likes a challenge or previous experience on SimCity should buy this. One of a few games that will keep you coming back for months on end.

Gameplay- 9.5/10
Graphics- 9/10
Sound- 5/10
Overall- 8.5/10


I would recommend this game if you enjoyed- Build-a-Lot

Tell me what you think about this review at Twitter- http://www.twitter.com/iPhone_Reviews next up is an EA Mobile Association Event!

Thanks- iPhone_Reviews

EA Special: Scrabble

This is the first of two reviews leading up to something really cool from myself in association with Electronic Arts Mobile. Stay Tuned in the next few hours to find out what it is.


iTunes Link

Scrabble is a word game by Electronic Arts. $4.99

Everyone knows and the world famous board game Scrabble. Most people would have played the game and probably own it. Board games are slowly going out of fashion with Electronic Arts releasing many games such as Monopoly, Yahtzee and this onto the App Store. What really brought Scrabble into the attention of everyone with an iDevice is its revolutionary Facebook connect system. This system soar Scrabble skyrocket in sales, and rightly so. Facebook connect allows users to play games online against people all around the world who are playing on either their iDevice or the Scrabble Facebook Application. Competition against players from all around the world is a great way to play Scrabble, as playing the CPU on easy all the time does not give a good gaming experience. I throughly enjoyed playing people all around the world in a game that doesn't force you to play for three hours at a time. I have had games which have been going for over a month as the players just check the game once a day to make their turn and it slowly progresses along. As well as this online gaming sensation there is are different modes to play by yourself, against the CPU or with up to three other friends. Electronic Arts have pulled off this classic game very nicely.

I was surprised that Electronic Arts made the board so it was easy to see and the words on it without the need to zoom in. While Scrabble is not one of those games that much can be done to it graphically, so instead it has stayed true to the board game counterpart. Scrabble has a simple layout that easily shows what squares are Double Word's etc. with different colors for each one. The game has a bit of animation when you get a double letter etc. or if you get a bingo (Placing all seven of your tiles in one go), which makes the game that little bit more interesting. When the game is zoomed in to place tiles it doesn't lose any clarity and the board is even easier to read, but you obviously can't see all the spaces at once.

The controls for Scrabble are very easy to get used to. To place a piece on the screen when it is zoomed out you just drag it to the area you with to place it and the screen will automatically zoom in. Generally it won't land in the right place so it can then be moved around. The other way is to zoom in first by placing two pinched fingers on the screen and pushing outwards, like using Safari. To remove pieces from the board you can either press the recall button to bring back all placed pieces or drag and drop into your bar of tiles below the board. With blank pieces these must be first placed before choosing what letter it will be. This game can be picked up and played the first time you use it because of its simple controls.

There isn't really any sound in Scrabble, just some basic sound effects. Placing letters and revealing the other places word give you some sound effects, but nothing spectacular. This is a game that should be played while listening to your own tracks, or silently.

For those who have absolutely no idea what Scrabble is, I will run through a basic description. The aim of Scrabble is to get a higher score than your opponent(s). You do this by making words on the board that must include one or more letters that are already on the board, except the very first move. More common letters like vowels only add 1 point to the word if it is placed but less common letters like z and q are harder to place and therefore more valuable giving you 10 points if placed. To increase your points even more there are bonus spaces on the board giving you double points or triple points for either the letter on that square or for the whole word depending on the bonus. If all of your tiles are placed on the same turn then it is called Bingo and you get an extra 50 points. There are many different ways to play Scrabble as you will get to play on the iPhone version. There are many different variations on how to play Scrabble. To start off on Local Play there are three game modes, Solo Play, VS Computer and Pass 'n Play. For each of these there are five game modes. Classic mode is what most people usually play on the board game. You basically play until no one can make a move or until someone has gotten rid of all their tiles, and none are left in the bag. 75-point and 150-point are basically first to that number of points. These are great for quick plays that you don't want to finish later. 8-round and 12-round are similar to the last two game modes except you play the designated number of rounds and the highest scorer wins. In solo play and VS computer you get four lives and you can opt to use one of these lives whenever you please. These put the best words on the board for your turn so you earn maximum points. VS Computer mode gives you the choice of difficulty setting. You can also choose what type of dictionary to use, but I usually start on the pre-selected dictionary. In Facebook connect and Multiplayer over the same WiFi it is always Classic mode, but with Facebook connect you can choose out of three game styles. These are slow play, medium play and fast play. These depend on how many turns you expect to happen a day, so people know they don't have to commit to a long game session. In these modes you have a teacher that tells you what the best word would have been instead of the lives tactic in local play.

Scrabble is another great board game brought to the iPhone by Electronic Arts. The different ways to play against people from all over the world, or just in the same room make it an excellent experience. The addicting gameplay is smooth and the only time I found Scrabble to crash was during the loading of Facebook Connect. This rarely happens to me and waiting for it to load is worth it. I hope to see future games use these multiplayer modes, as it greatly enhances the playing experience. Smooth graphics and some sound is also included, keeping to the high standard of games by Electronic Arts. The one thing I would like to see is the option to have different game boards, as I believe the UK version has a different board instead of the classic version. I would recommend that you buy Scrabble if you are a fan of word games, board games or just trying out the great new Facebook Connect technology available!

Gameplay- 9/10
Graphics- 8/10
Sound- 5/10
Overall- 7.5/10

I would recommend this game if you enjoyed- Monopoly: Here and Now World Edition

Tell me what you think about this review at Twitter- http://www.twitter.com/iPhone_Reviews next up is part #2 of the EA Special- SimCity Thanks- iPhone_Reviews

Selasa, 28 April 2009

WWDC Has Sold Out

According to Matt Drance, Frameworks Evangelist at Apple, Elvis has left the building, and he took the last WWDC ticket with him. Hope you got your tickets, it gonna be swell.

Detecting a Circle Gesture

In Beginning iPhone Development, we have a chapter on gestures. While I think we covered the topic fairly well, I would have liked to have included a few more custom gestures in that chapter. By that point in writing, however, we were already way over on page count. Back then, we also just didn't have a good idea of what other gestures would become common.

I did experiment some with detecting circles back then, but didn't include the code in the book for two reasons. One reason is because the method is really quite long and would have taken a lot of explanation, which we didn't really have spare pages for. The second reasons is that I have a feeling there's a much easier and more efficient way to go about detecting a circle gesture. Because you need to build a certain amount of tolerance into gesture detection, I'm not sure that there is, but there's a least a decent chance there are better ways to detect a circle.

But, since a google search didn't turn up any sample code out there to do this, I decided I'd update the code and post it.

Please, if you see an easier way to do this and want to point it out, by all means, go for it.

You can download the sample project right here.

The sample app is very basic, it just traces the shape you draw and tells you either that it detected a circle, or tells you why it doesn't think the shape counts as a circle. I have not encapsulated this to be re-usable (yet, at least), but the technique is pretty self contained, requiring just three instance variables and overriding three of the touch handling methods. In the sample, the touch-handling code is in the view subclass, which made it easier to do the drawing, but the touch-handling should work in a view controller class as well.

circle.jpg


Here's a basic description of the algorithm I've used. You can download the code to see the exact implementation.


  1. In touchesBegan:withEvent: store the point where the user first tapped the screen

  2. In touchesMoved:withEvent: store off each additional touch point that comes in, storing them in order

  3. in touchesEnded:withEvent:, store the final point, then do a number of checks, doing the computationally cheap ones first so as to avoid having to do any of the more computationally expensive ones by ruling out obvious non-circles. Most of these checks are based on a variance or threshold defined in a constant:

    1. If the end point is too far away from the start point, it's not a circle.

    2. If the drawing operation took more than two seconds, it's not a circle. Okay, it might be a circle, but if it took too long, it's probably not an intentional gesture. You can remove this check if you don't want it.

    3. If there are not a certain number of stored points, it can't be a circle. This is to avoid false positives from lingering taps.

    4. Loop through the stored touches and determine the top-most, bottom-most, left-most, and right-most points, and use that to determine an approximate center and an approximate average radius.

    5. Loop through the stored points in order, making sure:

      1. Each point's distance from the center is within a certain variance of the approximate average radius.

      2. That the angle formed from the start point, to the radius, to the current point flows in a natural order. The angle should continuously increase or decrease. If it doesn't go in sequence, then it's probably a more complex shape than a circle.





As I stated earlier, there's probably an easier, more accurate way to detect a circle, but until one comes to light, this is at least functional.

Preview: Baseball Sluggers- Home Run Race 3D



Baseball Sluggers is the upcoming game by Com2Us in Early May. We have some of the first available screenshots and a gameplay video to show as well as some great information.

Key Brand Powers
• Online matchup mode (Multi-player)
• Cool slamming 3D camera and sound effects
• Identified look for each players in the matchup world: character customization
• iPhone/ iPod Touch optimized control: tilt and touch (touch-motion control)
• Partnership with one of the official bat of MLB, for real baseball equipments
• Item balls enable players to attack and defend their games in the matchup mode

Features
1. Four different play modes: Matchup, Arcade, Training, and Classic modes
2. Head-to-head online match-ups with friends and rivals
3. Seven item balls with different traits and benefits
4. Player customization (self-ID creation)
1) Body: face, hairs, skin, etc.
2) Look: jersey, pants, cleats shoes, glasses, eye patches, etc.
3) Baseball equipments: bats, gloves, helmets, etc.
5. Social networking
1) Friend register
2) Message inbox (expected to be available from v 1.0.2)
6. Virtual item store (expected to be available this June when Apple opens SDK 3.0

Screenshots






Gameplay Video

Senin, 27 April 2009

Project Template Bugfix

If you've downloaded my OpenGL Xcode Project Template and are using it, you should re-download it. There's a potential crasher in there that's been fixed.

Car Jack Streets




iTunes Link

Car Jack Streets is a top down shooter by Tag Games. $4.99

The wait is finally over. Car Jack Streets is the long awaited Grand Theft Auto game to hit the App Store. Car Jack Streets is similar to the game by Apex Designs called Payback, but some different features brings this game out on top. Car Jack Streets follows the story of Randal Meyers, who owes $1,000,000 to casino owner Frankie. He has given you a chance to repay your debt by giving him $50,000 every week until it is paid off. If by the weeks end the cash isn't paid, Frankie's men will come after you and will end up killing you for good. Any of the whiz bang mathematicians will figure out that if you get through the entire game without dieing it will take 20 hours to complete. The way the game has been set out greatly extends the value that Car Jack Streets will provide you, and the storyline along puts this game way out in front of Payback. For those who don't know, Payback has many different game modes where set scores are to be earned to unlock the next level/city. While there are more modes and areas to explore, I don't believe it lives up to Car Jack Streets. This game has brilliant graphics and a great soundtrack from upcoming artists to match. Killing people has almost never been as fun, due to the console game Grand Theft Auto taking that position.

Car Jack Streets has killer graphics. The graphics have more of a cartoony look about them opposed to Payback's 3D graphics. I found Car Jack Streets to be alot more detailed and generally better looking. The amount of detail provided for everything is Car Jack Streets is really good for what is basically a mobile port. The game is usually running without any glitches or lag in the final build. We previously played a old build and it had alot of problems with the game freezing. The build we reviewed Car Jack Streets on still has these problems, but I generally only find the game freezes after 30 minutes or more of gameplay. This shouldn't be a problem as Car Jack Streets is designed to be played for about 15 minutes at a time.

All the controls for Car Jack Streets are located on the screen itself, and work surprisingly well. To walk around there is a D-Pad located on the left of the screen. To pick up weapon, disguises and health you just walk into them. To shoot there is a button on the right side of the screen. Some guns have auto-target on them so when standing still you will automatically rotate to aim at nearby civilians. To hop in a car a button will appear when you are close enough to one. To drive instead of using the D-Pad they have separate the controls. To go forward or reverse the buttons are on the right side of the screen and the turning controls are on the left. The final build includes a Turbo button that puts you to top speed for a short period of time. In the first build I played there was no turbo button and you could drive without the need to hold your finger on the accelerator. I found this a great idea, but apparently others did not.

Car Jack Streets provides you with the full city life experience. There is a heap of sound effects in this game. While walking you can just hear your footsteps as the bustling city life is happening all around you. Tag Games has gotten music from some great upcoming artists for the fully fledged radio stations that you can listen to while in the car. This is close to the standards of GTA, where I assume they got the idea from. Unlike Payback I found it to have more of an actual 'radio' feel to it rather than just music playing while driving.

The way the game works is that to earn back the $1,000,000 owed dollars you must make it through missions. These missions are obviously not, help the lady across the road missions, they include killing people, blowing up gang members and other illegal crimes. These missions are all optional to complete, as after a few days you will have multiple options to try and complete. Some missions are spur of the moment things and generally have bigger awards. These include Going Postal and killing 10 people in 30 seconds or blow up enough cars within two minutes to attract the polices attention. As well as missions you can get money for completing tasks or 'felonies'. These include things like Car Jacking x amount of cars or Killing x amount of gang members. Each felony has 3 levels so they take a few weeks to become a true gangster. Like GTA and Payback, if you start killing too many people you will earn a star and police will start coming for you. If you lay low for a while they will forget about your crimes. Gang Members will also come after you if they find you, and the one sure way to get rid of them is a shot to the head. Many different guns are available around the city to use, from Machine Guns to Flame Throwers. Another side objective in the game is to find all the 50 mystery packages around the large city. I haven't found all these so I can't reveal what you get.

As you can probably tell I can talk for hours about everything that happens in Car Jack Streets. This is an amazing game both in the way of gameplay, graphics and sound. This is by far one of the best games on the App Store, and certainly one of the longest games. Car Jack Streets has perfected what I need from a Top-Down GTA game, not only being cheaper than PayBack but far better. After a long wait time for the game to be approved I would seriously recommend buying this. A heap of non-stop real time fun! Do you think you can survive to pay Frankie's debt? I sure hope so!

Gameplay- 10/10
Graphics- 9/10
Sound- 9.5/10
Overall- 9.5/10


I would recommend this game if you enjoyed- Payback

Tell me what you think about this review at Twitter- http://www.twitter.com/iPhone_Reviews next up is an EA Mobile Association Event!

Thanks- iPhone_Reviews

Sabtu, 25 April 2009

OpenGL ES From the Ground Up, Part 3: Viewports in Perspective

Now that you got a taste of how to draw in OpenGL, let's take a step back and talk about something very important: the OpenGL viewport. Many people who are new to 3D programming, but who have worked with 3D graphics programs like Maya, Blender, or Lightwave, expect to find an object in OpenGL's virtual world called a "camera". There is no such beast. What there is, is a defined chunk of 3D space that can be seen. The virtual world is infinite, but computers don't deal well with infinite, so OpenGL asks us to define a chunk of space that can be seen by the viewer.

If we think of it in terms of the camera object that most 3D programs have, the middle of one end of the viewport is the camera. It's the point at which the viewer is standing. It's a virtual window into the virtual world. There is a certain amount of space that the viewer can see. She can't see stuff behind her. She can't see things outside of her angle of view. And she can't see things that are too far away. Think of the viewport as a shape determined by the parameters "what the viewer can see". That seems pretty straightforward, right?

Unfortunately, it is not. To explain why, we first need to talk about the fact that there are two different types of viewports that you can create in OpenGL ES: orthographic and perspective.

Orthographic vs. Perspective


To understand this better, let's talk about railroad tracks, okay? Now, the two rails of a railroad track, in order to function correctly, have to be exactly a certain, unwavering distance apart. The exact distance varies with where the tracks are, and what type of train rides on them, but it's important that the rails (and the wheels on the train) be the same distance apart. If that weren't the case, trains simply wouldn't be able to function.

This fact is obvious if you look at railroad tracks from above.

tracks.jpg


But what happens if you stand on the railroad tracks and look down them. Don't say "you get hit by the train", I'm assuming you're smart enough to do this when the train's not coming.

tracks-perspective.jpg


Yeah, the tracks look like they get closer as they move away from us. That, as you're probably well aware thanks to your second grade art teacher, is due to something called perspective.

One of the two ways that OpenGL viewports can be set up is to use perspective. When you set up a viewport this way, objects will get smaller as they move away, and lines will converge as they move away from the viewer. This will simulate real vision; the way people see things in the real world.

The other way you can set up a view port is called an orthogonal viewport. In this type of viewport, lines never converge and things don't change in size. There is no perspective. This is handy for CAD programs and a number of other purposes, but it doesn't look real, because that's not the way our eyes work, so it's not usually what you want.

With an orthogonal viewport, you can put your virtual camera on the railroad tracks, but those rails will never converge. They will stay the same distance apart as they move away from you. Even if you defined an infinitely large viewport (which you can't do in OpenGL ES) those lines would stay the same distance apart.

The nice thing about orthogonal viewports is that they are easy to define. Since lines never diverge, you just define a chunk of the 3D world that looks like a box, like this:

viewport.jpg


Setting up an Orthogonal Viewport


You can tell OpenGL ES that you want to set up an orthogonal viewport by using the function glOrthof() before you set declare your viewport using the glViewport() function. Here's a simple example:
    CGRect rect = view.bounds;     
glOrthof(-1.0, // Left
1.0, // Right
-1.0 / (rect.size.width / rect.size.height)
, // Bottom
1.0 / (rect.size.width / rect.size.height), // Top
0.01, // Near
10000.0);
// Far
glViewport(0, 0, rect.size.width, rect.size.height);

That's not really too difficult to understand. We first get our view's size. We make our chunk of space we're looking into two units wide, running from -1.0 to +1.0 on the x-axis. Easy enough.

Then, what's going on with the Bottom and Top? Well, we want the X and Y coordinates of our chunk of space to have the same aspect ratio as our view (which, in a full-screen app is the aspect ratio of the iPhone's screen). Since the iPhone's width and height are different, we need to make sure the x and y coordinates of our view are different also, in the same proportion.

After that, we define a near and far limit to delineate the depth of our viewing volume. The near parameter is where the viewport starts. If we're standing on the origin, the viewport starts right in front of it, so it's customary to use .01 or .001 as the start of an orthogonal viewport. This starts it a tiny fraction in "front" of the origin. The far coordinate can be set based on the needs of the application you're writing. If you'll never have an object further away than 20 units, you don't need to set a far of 20,000 units. Exactly what number you use is going to vary from program to program.

After the call to glOrthof(), we call glViewport() with the view's rectangle, and we're done.

That was the easy case.

Setting up the Perspective Viewport

The other case is not quite as simple, and here's why. If objects get smaller as they move away from you, what does that do to the shape of the chunk of space you can see. You can see more of the world that's further away from you, so the chunk of space you need to define isn't a cube if you're using perspective. No, the shape of the space you can see when using perspective is called a frustum. Yeah, I know. Strange word, right? But it's a real thing. Our frustum will look something like this:

frustum.jpg


Notice that as we move away from the viewpoint (in other words, as the value of z decreases), the viewing volume gets larger on both the x and y coordinates.

To set up a perspective viewport, we don't use glOrthof(), we use a different function called glFrustumf(). This method takes the same six parameters. That's easy enough to understand, but how do we figure out what numbers to pass into glFrustumf()?

Well, near and far are easy. You figure them out the same way. Use something like .001 for near, and then base far on the needs of your specific program.

But what about left, right, bottom, and top. To set those, we're going to need to do a little bit of math.

To calculate our frustum, we need to first figure out our field of vision, which is defined by two angles. Let's do this: Stick both of yours arm out straight in front of you, palms together. Your arms are now pointing down the z axis of your own personal frustum, right? Okay, now, move your hands apart slowly. Because your shoulders stay in the same position as your hands move apart, you're defining an increasingly large angle. This is one of the two angles that defines your own viewing frustum. This is the angle that defines the width of your field of view, the other would be if you did exactly the same thing but moved your apart up and down as opposed to left and right.. If your hands are three inches apart, the x-angle is pretty small.

narrow_field.jpg

A narrow field of vision.


If you move them two feet apart, you create a much wider angle, and a wider field of vision.

wide_field.jpg

A wide field of vision.


If you're into photography, you can think of field of vision as the focal length of our virtual camera's virtual lens. A narrow field of vision is much like a telephoto lens, creating a long frustum that tapers slowly. A wide field of vision is like a wide angle lens and creates a frustum that increases in size much faster.

Let's pick a nice middle-of-the road value to start, say 45°. Now that we have this value, how do we use it to calculate our viewing frustum? Well, let's look at one of the two angles. Imagine, if you will, what the frustum looks like from the top. Heck, you don't have to imagine, here's a diagram:

topview.png


Okay, from above, it looks kinda like a triangle, with just a little bit of one point lopped of, doesn't it? Well, it's close enough to a triangle for our purposes. Now, do you remember tangents from trig class? The tangent function is defined as the ratio of the opposite leg of a right triangle to the adjacent leg.



Okay, but we don't have a right triangle, do we?

Actually, we have two… if we draw a line right down the z axis:
split_triangle.png


That dotted line down the center is the "adjacent leg" of the two right triangles we just created by drawing that line. So, half of the width of the far end of the frustum is the tangent of half of the angle of our field of view. If we take that value and multiply it by the near value, we have the value to pass as right. We pass the inverse of that number as left.

We want our field of view to have the same aspect ratio as the screen, so we can calculate the top and bottom values exactly as we did with glOrthof() - by multiplying the right value by the screen's aspect ratio. In code, that would look like this:

CGRect rect = view.bounds; 
GLfloat size = .01 * tanf(DEGREES_TO_RADIANS(45.0) / 2.0);

glFrustumf(-size, // Left
size, // Right
-size / (rect.size.width / rect.size.height)
, // Bottom
size / (rect.size.width / rect.size.height), // Top
.01, // Near
1000.0);
// Far

Note: A discussion of how glFrustum() uses the passed parameters to calculate the shape of the frustum going to have to wait until we've discussed matrices. For now, just take it on faith that this calculation works, okay?

Let's see it in action. I modified the final drawView: method from the last posting so that instead of one icosahedron, it shows thirty icosahedrons extending down the z axis. Here is the new drawView: method.

- (void)drawView:(GLView*)view;
{
static GLfloat rot = 0.0;

static const Vertex3D vertices[]= {
{0, -0.525731, 0.850651}, // vertices[0]
{0.850651, 0, 0.525731}, // vertices[1]
{0.850651, 0, -0.525731}, // vertices[2]
{-0.850651, 0, -0.525731}, // vertices[3]
{-0.850651, 0, 0.525731}, // vertices[4]
{-0.525731, 0.850651, 0}, // vertices[5]
{0.525731, 0.850651, 0}, // vertices[6]
{0.525731, -0.850651, 0}, // vertices[7]
{-0.525731, -0.850651, 0}, // vertices[8]
{0, -0.525731, -0.850651}, // vertices[9]
{0, 0.525731, -0.850651}, // vertices[10]
{0, 0.525731, 0.850651} // vertices[11]
}
;

static const Color3D colors[] = {
{1.0, 0.0, 0.0, 1.0},
{1.0, 0.5, 0.0, 1.0},
{1.0, 1.0, 0.0, 1.0},
{0.5, 1.0, 0.0, 1.0},
{0.0, 1.0, 0.0, 1.0},
{0.0, 1.0, 0.5, 1.0},
{0.0, 1.0, 1.0, 1.0},
{0.0, 0.5, 1.0, 1.0},
{0.0, 0.0, 1.0, 1.0},
{0.5, 0.0, 1.0, 1.0},
{1.0, 0.0, 1.0, 1.0},
{1.0, 0.0, 0.5, 1.0}
}
;

static const GLubyte icosahedronFaces[] = {
1, 2, 6,
1, 7, 2,
3, 4, 5,
4, 3, 8,
6, 5, 11,
5, 6, 10,
9, 10, 2,
10, 9, 3,
7, 8, 9,
8, 7, 0,
11, 0, 1,
0, 11, 4,
6, 2, 10,
1, 6, 11,
3, 5, 10,
5, 4, 11,
2, 7, 9,
7, 1, 0,
3, 9, 8,
4, 8, 0,
}
;

glLoadIdentity();
glClearColor(0.7, 0.7, 0.7, 1.0);
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glEnableClientState(GL_VERTEX_ARRAY);
glEnableClientState(GL_COLOR_ARRAY);
glVertexPointer(3, GL_FLOAT, 0, vertices);
glColorPointer(4, GL_FLOAT, 0, colors);
for (int i = 1; i <= 30; i++)
{
glLoadIdentity();
glTranslatef(0.0f,-1.5,-3.0f * (GLfloat)i);
glRotatef(rot, 1.0, 1.0, 1.0);
glDrawElements(GL_TRIANGLES, 60, GL_UNSIGNED_BYTE, icosahedronFaces);
}

glDisableClientState(GL_VERTEX_ARRAY);
glDisableClientState(GL_COLOR_ARRAY);
static NSTimeInterval lastDrawTime;
if (lastDrawTime)
{
NSTimeInterval timeSinceLastDraw = [NSDate timeIntervalSinceReferenceDate] - lastDrawTime;
rot+=50 * timeSinceLastDraw;
}

lastDrawTime = [NSDate timeIntervalSinceReferenceDate];
}

If you drop this code into a project created from OpenGL project template for Xcode, which sets up a perspective viewport using glFrustumf() with a 45° field of vision, you get something that looks like this:

frustum_simulator.jpg


Nice, right? They get smaller as they go away from you, very similar in appearance to those train tracks as they move away from you.

If we do nothing other than change the glFrustumf() call to a glOrthof() call, it looks much different:

iPhone SimulatorScreenSnapz002.jpg


Without perspective, the twenty-nine icosahedrons behind the first one are obscured by the first. There's no perspective, so each shape lies exactly behind the one in front of it on the z axis.

Okay, that was a heavy topic, and the truth of the matter is you can forget all about the trig now. Just copy the two lines of code that calculate a frustum based on an field of vision angle, and you will probably never need to remember why it works.

Stay tuned for next week's exciting adventure…


In the next installment, we're going to shine some light on our icosahedron and make it look like a real, honest-to-goodness three-dimensional shape rather than a colorful, but flat object.

lights.jpg

Silent Hill- The Escape



iTunes Link

Silent Hill: The Escape is a horror game by Konami. $7.99

iPhone_Reviews re-reviews Silent Hill: The Escape by Konami, as his opinions of the game do not match those of Arron's. This review as well as the original review by Arron on Razorianfly are located [HERE] The review will be shorter as a lot of the stuff is covered in the original review.

We thought It'd be great to give you a second opinion. Unlike Arron, I have never played the original Silent Hill games on the console version, mainly because of what I heard about them from friends.

-----------------------------------------------------------------------------------

Not playing the console version seems to make the experience of playing Silent Hill: The Escape more enjoyable. I was expecting what I received, a dungeon crawler where you had to shoot the coming enemies, just like the recently released Dead Man's Dungeon. What I wasn't expecting from this game was how scary it is. There are some games I enjoy playing at midnight in abandoned hospitals, but Silent Hill just isn't one of those games.

I was not expecting Silent Hill: The Escape to be so scary. Even after level 1 you are already turning corners and having faceless nurses right in front of you. Being impatient when gaming I usually charge around the corners and when I find a nurse or wheelchair in front of me, I was known to drop my iPod out of fright.

The objective of Silent Hill: The Escape is to escape through all 10 levels of the what appears to be haunted hospital. There are five different maps which are used for two levels each. For the second time it is used there is always a graphical change and some things are added, such as bars blocking some ways through. There are no boss levels in the game and once you finish the 10 levels you unlock a new character. There are two characters to unlock in total.

The aim of the game is to find the key and get to the exit without being killed. There are many corners in the levels and turning around them quickly can be deadly. To be killed the enemies just need to walk into you. You have a flashlight that needs to be constantly refueled by batteries to stay bright. If you go for long enough the game will become really dark and alot harder to know what is around you.

You get rated after each completed level on your accuracy, time, distance traveled and an overall mark. There is no need to get a certain mark to go to the next level, but it gives you something to aim for if you decide to go back and play the levels again. I found myself getting bad marks because of how frightened I was getting. Turning around corners is the worst feeling, not knowing if you will walk straight into a nurse or whether it will be safe.

This is a good game graphically. Each level has a different theme about it, and it is good to see as I was expecting one layout for the whole game. Alot of detail has gone into the graphics, and it definitely shows. All the different enemies have been made to give a certain effect. All the ones I have seen are pretty much faceless and just plain creepy. I like the way they got past Apple's gore restrictions with grey blood.

Playing Silent Hill: The Escape with sound is obviously one of the main ways to get scared. It sounds like there is a dodgy radio in the background that gets louder as enemies get closer. Only the music in Silent Hill and Hysteria Project have managed to be even slightly frightening, and good use of music has really made this game enjoyable to play, while maybe not at the time.

I like the way controls have been implemented to suit the iPhone. The only bad thing is the way to walk by dragging your finger around the screen. I would like an actual D-Pad on the screen. Shooting is fine with the accelerometer to aim and tap on the actual target icon on the screen to shoot. When you run out of bullets you have to recharge, which is done by tilting the device until all the shells match up with the actual gun. This is a great idea as you panic when enemies are coming at you and sometimes none of your bullets will fall into the gun. Apart from the controls to move it is implemented to the theme of the game very nicely.

I enjoyed the game, and I found it to satisfy what I expected from Silent Hill. Unlike Arron, not playing the console version hasn't made me expect it to be to the same standards. If you haven't played the consoles versions you are more likely to enjoy this. For those who have played the console versions, just be expected for a corridor crawler.

The US version of Silent Hill is $7.99 but compared to the rest of the world's prices it should be only $5.99. I think Silent Hill would sell better at $4.99 or $5.99 but it is up to Konami. I found Silent Hill very challenging and a great game for those who like horror games. Just don't expect to find your way to the cupboard to get a torch without panicking if the lights go out!

Gameplay- 5.5/10
Graphics- 8/10
Sound- 9.5/10
Overall- 7.5/10


I would recommend this game if you enjoyed- Dead Man's Dungeon

Tell me what you think about this review at Twitter- http://www.twitter.com/iPhone_Reviews next up is an EA Mobile Association Event!

Thanks- iPhone_Reviews

Jumat, 24 April 2009

Learn Cocoa Update

I just wanted to post a quick update about Learn Cocoa. Dave and I have gotten ourselves spread pretty thin. We have a number of projects in the pipeline for Apress, most of which we can't announce the details of yet.

Unfortunately, as a result, Learn Cocoa's publication date kept getting pushed further and further back. To remedy that, and to make sure we get a quality book to market in a reasonable timeframe, Dave and I have brought in a new principal author for Learn Cocoa. Jack Nutting has taken over the reins of the book, but Dave and I will still be involved with it. Jack's got a lot of Objective-C and Cocoa experience and Dave and I are both confident that it's going to be a great book.

In related news, we should be able to take the wraps off of our other projects by WWDC at the latest.

Kamis, 23 April 2009

Using Instruments to check iPhone Texture Memory Usage

A great blog post for anyone doing OpenGL work on the iPhone.

via Noel of Snappy Touch, via Owen Goss of Streaming Colour, via Luke Lutman of zinc Row

Something to Make Apple Fan-Boys Turn Rhodamine (Pink)

An interesting discussion of someone's first experiences with Microsoft's Surface. I'm honestly a little saddened by this. I think nothing in the world could be better than good competition for Apple's touch-screen products, even if it's not a directly competing product, but if this account is anything to go buy, the Surface doesn't appear to be nipping at Apple's heels in any meaningful way. Oh, the product itself is okay, but the lack of attention to detail... well, it matters! Great technology isn't enough. If you miss the opportunity to wow with the first impression, you've got to fight very hard to get back in the user's good graces.

But, I must admit, there's a very small part of me - the Apple fan-boy part - that secretly smirks with satisfaction that Microsoft is yet again snatching defeat from the jaws of victory in another emerging market.

(via Dr. Wave)

Another Fine Quarter

Yesterday, Apple announced another great quarter even in a tough economy. Although unit sales of Macs were down slightly, sales of both iPods and iPhone OS devices were up, and Apple called it "the best non-holiday quarter in Apple history".

One of the interesting tidbits of information that can be gleaned from the earnings report is the fact that there have now been 37 million iPhones and iPod Touches sold. Although there are probably some of those that aren't in service, the vast majority probably are still being used in some capacity.

So, yeah, the gold rush might be over (though I'm not entirely convinced about it), but it's still a hell of a market. To put that number in perspective, back in 2007, it was estimated that the installed base of Mac OS X computers was 22 million. Obviously that number is higher now - Apple sold 2.22 million Macs just in the past reporting quarter - but that means the potential market for iPhone applications today is considerably larger than the market for Mac programs was just two years ago.

The getting-rich-overnight stories may be coming to an end, but anyone who thinks the iPhone application market isn't still a great opportunity needs to have his or her head examined.

Baseball Superstars



iTunes Link

This is a modified post from TheAppEra

Baseball Superstars is the first baseball game on the iDevice that has caught my attention. Apart from the SGN free game, iBaseball, there was really nothing any good in the baseball sector until Baseball Superstars 2009 came out. There is now 9 Innings: Pro Baseball and MLB Word Series 2009 out. This game doesn’t give the real MLB feel but is a very good cartoon version of the game. With Flick Baseball coming for probably $0.99, I am sure you are wondering why you shouldn’t just wait for that? Well basically this game has weeks on end of playing to get through it all. Add the fact that it has a very addicting gameplay.

This game has 10 competitive teams to play with, 4 unique stadiums to play on, 5 different game modes to master, 3 difficulty levels for your own level of skill and 12 hidden players to choose from (more on this later)! As you can see from all the variations in the game, you will be playing with it for a long time. I have had it for over 50 days and am still playing it daily.

There is a single game mode where you choose your team and your opposition and play 9 innings or more if need be. This mode is the only one where you bat for every player and also pitch the whole time. Great practice for beginners. There is a season mode where you choose your team and play through a season of 36 games to try and win the championship. I don’t really know why this is an option as the Career mode is far better and plays on the same principal.

Career mode is where you will mostly be playing. You create a character and play through his whole career starting out as a lowly skilled batter or pitcher. You can’t be both. You need to work your way up to 16 seasons. You get to buy new equipments for your that improve his stats as well as train him and go to events like dates and interviews to get more money and popularity. This is a lot of fun and is really the only mode I have given much play time with. You can have one batter and one pitcher in career mode at one time, but I mostly play with my batter as it is quick and easy to play matches.

The next mode is a home-run mode where you have nine balls to get as many home runs as possible, and extras if you get combos of more than one home run in a row. This mode is really only to get G-Points to get special upgrades for your career player and to unlock special characters.

The last mode is mission mode where you complete Batting and Pitching missions to again earn G-Points for your player.

The game uses nothing apart from an onscreen controller that is designed specifically for Baseball Superstars. They aren’t in the way of the game and are easy to use. On the left of the screen, there is a d-pad for the menu and for moving your player or ball when batting and pitching. On the right side there is a large button for hitting the ball, a button for canceling a run, one for bunting the ball and a button for running another base if the player has stopped/special powers hit. These don’t take long to get the hang of and are really needed for a game like this.

This game screams out mobile port which it exactly is. Knowing that it was ported means I’m not going to be as harsh as I would be with this game. In my previous review on iFoneReviews I said this “The graphics are certainly cute and are good for the cartoon baseball feel, but they are a bit pixelated. I would have like to seen a bit more of a change between the mobile and iDevice version but they are still nice to look at.” After reviewing the game, Gamevil has responded to this and totally revamped the graphics, providing a greater experience as well as a slight gameplay change. This change is that the batting and pitching is further away from the screen.

This game has alot of sound effects and in-game music to listen to, but I didn’t really enjoy it. While they put a lot of work into everything, there is a few parts which I disliked. First of all, everytime you touch the screen a very annoying beep is made. The sounds would be much more tolerable without the beeping noise.

This is a super fun game. I really enjoyed playing this game as it is quick and easy to play quick matches, but it can also hook you for a whole season or two. For those a bit skeptical about the game there is a lite version to try, but I would go straight for the full version at $2.99. It is worth it!

Gameplay- 9/10
Graphics- 9/10
Sound- 7/10
Overall- 8.5/10


I would recommend this game if you enjoyed- 9 Innings Pro Baseball

Tell me what you think about this review at Twitter- http://www.twitter.com/iPhone_Reviews next up is Scrabble

Thanks- iPhone_Reviews

Selasa, 21 April 2009

Preview: Star Defense



A majority of us would have heard about the latest game by the amazing iPhone developers NgMoco:). Here is a little preview on their upcoming game, Star Defense

Star Defense

RELEASE DATE: May 2009
PUBLISHER: ngmoco:)
GENRE: Action & Strategy
DEVICES: iPhone™ & iPod® touch

PRODUCT OVERVIEW:
The Universe is in Your Hands – Created exclusively for the iPhone & iPod Touch.
Beautiful, dynamic 3D environments provide the backdrop to incredible action in Star Defense, ngmoco’s innovative strategy title coming this May to the iPhone and iPod touch.
Use multitouch to spin and zoom entire worlds, examining the terrain to determine optimal locations to position your forces. Select from a broad range of turrets that unleash everything from burning hot plasma to high voltage decimation and defend against an unrelenting onslaught of invader waves. Maximize your recon and plan carefully – each planet has unique pathways to protect, weapons to deploy, and enemies to overcome.
As commander of the Star Defense forces, you must be decisive, brave, and – above all – cunning. The S’rath invaders are shrewd adversaries, regularly fortifying their troops with new unit types, new formations, and new armor. Survival depends on your ability to respond to their maneuvers in real time, strategically optimize your defenses to each world’s distinct layout, and build a mixture of weapon-types that counteract all known alien units and resistances.

Developed by Rough Cookie, Star Defense is being created exclusively for the iPhone and iPod touch by ngmoco :)



PRODUCT FEATURES:
• Build your defenses by selecting from 15 weapon-types each with their own specific attributes, firing ranges and reload frequencies.
• Secure and defend an entire galaxy comprising 7 breathtaking worlds. Distinct path layout, enemy types and immunities, and weapon choices combine to create a truly unique gameplay experience on each planet.
• Earn Medals and unlock Commendations by achieving glory in battle and accomplishing specific feats.
• Go for the ultimate survival record by pitting your skills against an infinite number of S’rath invaders, providing endless hours of tower defense action.
• Stunning graphics and 3D environments showcase an amazing galaxy of beautiful planets and backgrounds, incredibly detailed alien invaders, and meticulously crafted towers – this is tower defense like you’ve never seen it before!





 
Design by Free WordPress Themes | Bloggerized by Lasantha - Premium Blogger Themes | Lady Gaga, Salman Khan