Pages

jeudi 17 décembre 2009

Cocoa and Tab-Modality



(Note: as regular readers know, we occasionally publish extra-geeky technical posts here on the Google Mac Blog. If this isn't your thing, don't worry; our usual non-technical stuff will be back soon.)

I'm part of the Chromium team working on Mac issues, and as I wrote on our blog, for Chromium we needed a way to provide modality to individual tabs of our web browser. Specifically, we needed to attach sheets to a Cocoa view rather than to just a Cocoa window. How would we accomplish this?

Like always, it's half following what's possible, and half sudden inspiration. What's possible? Putting a sheet on a window. That's done several ways. For an arbitrary sheet you can use
-[NSApplication beginSheet:modalForWindow:modalDelegate:didEndSelector:contextInfo:]. But nearly every class that can put up a sheet has its own -beginSheet: method. NSAlert has
-beginSheetModalForWindow:modalDelegate:didEndSelector:contextInfo:. IKPictureTaker has
-beginPictureTakerSheetForWindow:withDelegate:didEndSelector:contextInfo:.

So we know that we need to hang our sheet on a window. That's where the inspiration comes in. I was talking with a fellow Mac team member who offhandedly mentioned invisible windows. Of course! If you have an invisible window that has a sheet attached, then for all practical purposes you have an independent sheet. Plus, if you make the invisible window the child window of the window that hosts the view that appears to run the sheet, then you can size the invisible window to cover the view and eat all the clicks, achieving the desired modality as well.

That was the easy part. The first implementation was quick, but quickly uncovered issues.

First, how do you hide the sheet when the view is hidden? At first I tried hiding the invisible window, but when you -orderOut: a window you kill any sheets on it. That wouldn't do. Then I remembered the good old days of the Mac Toolbox (and Cocoa before 10.3 when NSView got -setHidden:), where you'd just move windows or views off to infinity (or (-15000,-15000), whichever was closer). Exposé quickly revealed the folly of that approach. Turning the sheet's opacity to 0% worked under Leopard, but under Snow Leopard the sheet blurring effect stayed present. And if I resized the window to NSZeroSize, resizing it back to the original size wrecked the layout.

Eventually I settled on a combination that worked. First I set autoresizesSubviews of the content view of the sheet to NO, and then I resized the sheet down to nothing. Then I set the opacity to 0%. Once I set the invisible window to stop eating clicks, it all worked.

The second problem was all the different classes that provided methods to show a sheet. Even if you could get the sheet window from them, if you ran it using the NSApplication sheet method, it didn't work. A little (actually a lot) of NSInvocation magic helped smooth that issue over.

That's basically it. The API is really simple and the implementation is, if nothing else, amusing to read.

Should you go ahead and use this in your app? Probably not. This is a very specific tool for solving a very specific modality problem that we had. But if you have a similar modality problem, perhaps this is right for you. Give it a try and let us know what you think.


mardi 8 décembre 2009

Google Chrome for Mac goes beta!

73,804 lines of Mac-specific code and 29 developer builds later, we're excited to finally release Google Chrome for Mac in beta. We took a hefty dose of goodness from the Windows version to build a fast, polished browser for Mac -- with features such as the Omnibox (where you can both search and type in addresses), themes from artists, and most importantly, speed. Try downloading Google Chrome for Mac and see what you think.

We also took great care to make Google Chrome a native application for Mac. For example, we integrated the Keychain into Google Chrome for Mac, and incorporated Mac-style animations when you open the Bookmarks bar.

For more details on today's beta release of Google Chrome for Mac, check out the video below.



To our early users who tried the weekly developer channel builds and provided excellent feedback, we thank you. In bringing the Mac version of Google Chrome from its developer stages to a beta standard, we returned to the core principles of the Chromium project and focused on delivering rock-solid depth in a few critical areas for the browser, rather than a breadth of features that are rough around the edges. This first beta release for Mac does not yet incorporate extensions, bookmark sync, bookmark manager, and cookie manager. However, we focused on features such as sandboxing our renderer process to help provide a safer web experience for our users. We look forward to future releases of Google Chrome for Mac, which will fill in the gaps and provide a fast, clean browser for your enjoyment on Mac OS X.

Can't wait for more info? Read our frequently-updated detailed status, or keep an eye on some Mac-specific sections of the source code. Don't forget to give Google Chrome for Mac a try, and let us know what you think.

Google Chrome for Mac, on the New Tab page


Google Chrome for Mac, with an artist theme




mercredi 18 novembre 2009

Google Earth for iPhone version 2.0



There's a nice update to Google Earth for iPhone and iPod touch available now. You can read all about it in the Google Mobile Blog and you can grab the update in the App Store.


mardi 17 novembre 2009

iPhone DotA AllStars






iPhone DotA Allstars, a game i will be dying to get for my iPhone. Not only i can play my favorite game on my pc, i will be able to play it on the go too! This is my dream and i hope someone will create this based on iPhone platform one day soon! Just soon brief introduction about DotA before sharing with my small idea for Allstars DotA iPhone.

DotA Background
Defense of the Ancients (DotA) is a customized map for the real-time strategy game Warcraft III: Reign of Chaos and its expansion, Warcraft III: The Frozen Throne. The company that created this game is blizzard and they have some serious popular games: diablo, warcraft3, starcraft2, world of warcraft (WoW).

This customized map is created using the "World Editior" within Warcraft 3and was further developed in warcraft 3 expansion - Frozen Throne. Many maps are created and many different version of DotA was created. The most popular map is DotA Allstars. Currently the main developer is done by "IceFrog". I have been playing this game since 5 years ago, that means i have been addicted to this game for so long. DotA Allstars has become so popular that it is recognized and even featured in worldwide tournaments like Blizzard Entertainment's BlizzCon and the Asian World Cyber Games (WCG).

To play DotA, you need to buy the Warcraft3 and the expansion Frozen throne. Places like Amazon, ebay, Walmart and even buy online in Blizzard Online Store. After which, you will go into the internet to download the latest FREE DotA map from sites like getdota as well as to download the latest drivers etc in the battlenet. That's all you need to play DotA Allstars online in the battlenet. You can even download dota ai for AI version to play on your own. AI heros can be set at your will - easy, normal or insane. There are alot of information in the net about dota heros, dota guides, dota items and dota build.

The objective of this customized map is to destroy the opponent team throne, with strong towers and moving creeps. There are two sides; the Sentinel and the Scourge. Each team will need to choose a hero and work as a team using different skills and tactics to kill your opponent team and fight through the strong defense. The players get to level up their hero build and buy hero items to compliment their abilities.

DotA iPhone Version
How to out DotA into iPhone? I have created the interface as per below.



The controls are in the left and right side of the iPhone screen. All the buttons for :Move, Stop, Attack and hero upgrades are placed on the left side. All the execution of the 4 skills are placed on the right side of the screen. Saying that, it means you need 2 hands to play this game with controls on both side. Next question is how to move? It will be quite difficult to keep pressing onto the small screen everything. What is special about iPhone? The ability to detect balance. The hero can be navigated using the balancing.

Whenever the hero can upgrade the level, just click on the upgrade and skills icon. Shopping can be easily. typically you will move near the items shops, click the desired shops and buy whatever with a click. Escaping the shop can be done easily with a esc icon. If you happen to purchase an ability item, just drag the item to the right to create an additional icon for the skills. You may also preset the skills using a hit shake of the iphone. Upon a hard shake, your hero will executive the ultimate skill. Why i suggest this move? The reason is that every split second counts and it means life and death in this real-time game.

Communication can be done high tech. Instead of typical in PC DotA, the communication will be done via voice. This will make the game more realistic and exciting. During the PC version, sometimes while typing, we are not able to play the game, therefore causing jeopardy to ourselves. Using voice communication, we can play with ease and continuously.

My ideas are out and i hope someone can kick start this game development soon. Cheers to iPhone Dota!

dimanche 8 novembre 2009

iPhone Game - Sushi Chain






This new iPhone Game called Sushi Chain is an interesting game whereby you get to be the chef of a sushi shop. In general, sushi chain is about a sushi bar which you have impatient customers. The task of this iPhone Game is to prepare the sushi fast enough before the customers leave and to maintain your reputation.

Simple game for this Sushi Chain right? The challenge in this game is be able to remember all the recipes of the growing sushi dishes you need to prepare fast. Whats more? You need to be fast to replenish your stocks which also takes sometime. Stock such as rice, seaweed, shrimps etc.

In case you might forget the recipe, there is a recipe book to refer to whenever you need it. Trust me, after play awhile, you can remember most of the recipe and prepare it fast. Remember to keep track of the sushi ingredients that runs out as fast as you prepare them.

Like typical Japanese culture, no food will be put to waste. There is a limitation of sushi dish to be placed on the conveyor belt. This cannot be undo or remove. Therefore if you might have placed too many trash on the conveyor belt, you have lesser places for the sushi. This will slow down your food preparation process. Instead of preparing the food in advance by 5 sushi dishes, you might only prepare 2 sushi dishes and have 3 trash dishes on the conveyor belt. The trash sushi will only remove by itself after sometime.

Sushi Chain can be a challenge on the later part of the game when customers are very impatient and the in and out flow of the customers becomes really fast. This can be really difficult as you might panic and create a lot of trash sushi or stocks runs out really fast. Remember the sushi dishes well and you can play it fast.

You can try out the sushi chain lite for a trial before buying the more challenging complete game. Have fun playing sushi chain.

mardi 3 novembre 2009

[Release] Asphalt 5



Only that was released yet another anticipated game.

Price: $ 6.99
Size: 245 mb
Minimum software version: 2.2.1
Developer: Gameloft
Description: iTunes Link

[Cydia] Add Call History 1.2



Add Call History - a utility that allows you to add bogus calls to the list of recent calls.

All that we need to do is run the application and in the appropriate fields, enter the phone number, date, time and duration. Below are invited to choose the type of call: incoming, outgoing or missed.

The application is available in a repository in Cydia BigBoss.

Via iSpazio

[Release / Cydia] Firewall IP



Firewall IP - This is the first firewall for the iPhone and iPod Touch, which warns us that whenever an application from the AppStore goes into the network and asks for our data (Contacts, UDID, etc.).

The application consists of two parts: the first uses MobileSubstrate. Every time you start the application menu will appear, in which we can see that it is trying to make the application. Then we can:
  •     * Allow connections only once;
  •     * Block connection only once;
  •     * Always allow connection;
  •     * Deny the connection forever;
  •     * Allow a specific application, any action;
  •     * Prohibit certain application, any action;
Second part: This is an application that is available to run from your springboard. In the annex you can add or change existing rules.



Key features:
  •     * Blocking TCP / UDP; 
  •     * Displays the name of the node connection; 
  •     * Simple and intuitive interface; 
  •     * Setting the rules; 
  •     * Low CPU and RAM; 
  •     * Switch in SBSettings; 
The application is available in Cydia Store and costs $ 1.99.

Via iSpazio

ZodTTD is working on a new emulator



ZodTTD via their forum, said that he was working on a new emulator. At this time we waiting for an emulator to Score will play games Nintendo64.

The emulator is intended only for iPhone 3GS and iPod Touch 3G, because it will use the library Open GL | ES 2.0.

[Release] Command & Conquer Red Alert



On this game, we have written many times, and finally it is available in the App Store. But, still only in the Americas.

Price: $ 9.99
Size: 64,7 mb
Minimum software version: 3.0
Developer: Electronic Arts
Description: iTunes Link

What if iPhone had ...



While Steven Troughton-Smith alone improves its program iDashboard, the guys from Ocean Observations made a video concept, as it might ideally look like the implementation Dashboard on the iPhone.



lundi 2 novembre 2009

worlds first 05.11.07 unlocked phone !!!!!



He did it - Geohot "broke the" modem 05.11.07! Unlock works as the iPhone 3G, and on the 3GS!



PS: waiting blacksn0w ... release is scheduled for November 4, 2009.


DOOM Classic - the return of a legend




AppStore addition of a old school FPS from id Software. How much time have been killed over this game in the distant 90th.

Price: $ 6.99
Size: 76,8 mb
Minimum software version: 2.0
Developer: id Software
Description: iTunes Link

Eliminate Pro



The long-awaited shooter Eliminate from ngmoco:) already available in AppStore, so far only in Canada. This limit reflects the desire of companies to check whether the servers will withstand the load from the multiplayer and In-App Purchase.



Free except that you can download the game itself, everything else - for money: bullets, energy weapons.

A Heap of Trouble



We already wrote that Geohot Grechischev for unlock baseband 05.11.07, and now, three days later he was to report to his first successes.

He was able to execute arbitrary code in the firmware baseband, and hence unlock around the corner.

Hi, this is geohot
is the most complex implementation code (injection), which I have ever done, it uses public team
... Get ready to blacksn0w, although I must still clarify this zamboni.
OK?

[Video] Pro Zombie Soccer



The developers of the Super Awesome Hyper Dimensional Mega Team laid out in the network first gameplay video of their games Pro Zombie Soccer, with whom we have already started to introduce.



PS: The game is still under development, so to speak on the timing of release is premature.

[Pre-release] Guerrilla Bob



In the near future awaits us next hit in the App Store - Guerrilla Bob from Angry Mob Game.

At first glance, the game resembles Minigore: tazhe "cartoon" graphics, and game concept, but, unlike her, in Guerrilla Bob, we need not only to survive by killing enemies left and right, but to get to the end of the level where to "finish off" the terrible boss. The project looks original, no sense of a clone or parody.



On the plot, if any, and there, the developers are silent. But for some reason this brutal Cuban (or Mexican?) Guy with a cigar in his mouth, to "chop and hack" enemies left and right - or wrong is somehow ...



Already, the game looks very attractive and promising - I hope to release the developers did not spoil. By the way, he [the release] is scheduled for the near future.



Watch for the development of the project can be on site or in a twitter.

iTunes 9.0.2

  • - Adds support for Apple TV with firmware 3.0.
  • - Once again, Apple has blocked support for Palm Pre.
  • - Ability to choose a dark substrate under albums, programs, films, etc.

MuscleNerd (team member DevTeam) confirmed that the update does not hinder the process of jailbreak.

[Pre-Release] Cobra Command, Data East



The plans to restore the iPhone game in 1984 «Cobra Command» by Data East was first reported about a month ago. And only now we learned that this week the game is sent to moderated to Apple.

The game was one of the first built on the principle of "live cinema", and enjoyed immense popularity of twenty-five years ago in the halls of slot machines.



«Cobra Command» was created in the image and likeness of games such as «Dragon's Lair» (1983), «Sapce Ace» (1984), in the style FMV - Full Motion Video, (born - completely mobile video). In fact, these games is an interactive cartoon, made by traditional hand-drawn animation, in which the player had the opportunity to interact with some objects. They used an analog laser videodisc containing 30-60 minutes of video. In the late 80's - early 90's, this method was very suitable, because technical capabilities of computers and game consoles of that time were insufficient to display the detailed three-dimensional graphics in real time, but already enables you to play full-screen video quality comparable to VHS.



FMV technology used for creating interactive movies and cartoons, as well as for other genres of games, where videos replace real-time graphics, as part of the game objects are displayed using two-or three-dimensional real-time graphics. Game «Cobra Command» was one of the most common types of FMV-games. Games of this type may have differences in performance, but reduced to shooting at various objects through sight or light gun. (On the iPhone of course we will aim with a virtual joystick).



There are two main types of this type of games. One is an interactive movie, at certain points in which the player is attacking the characters. The player must catch fire in a certain area of the screen - then the film goes a stage defeat the attacker. If a player does not have time to shoot or admits fault, he loses again and the film begins with the beginning level (the episode, a scene). The second game is a rail shooter, where the video is used as the background, and goals are sprites, or polygonal models.

For comparison, the original video games, working on an emulator Daphne:


[Pre-Release] Eliminate, ngmoco:)



ngmoco:) released a new video of the expected many shooter «Eliminate». This movie shows us how swift gameplay in the world «Eliminate».

This game has been presented to us even at WWDC 2009 in San Francisco, and was formerly known under the name «LiveFire» or "Killtest". Even then it was clear that we face an outstanding project, a new level of games for iPhone.



«Eliminate» is an online multiplayer FPS (First Person Shooter), with the ability to "pump" character. Coolly and reflexes amateur Deathmatch, we need to be combined with the ability to calculate costs. The game will be presented to store weapons, armor and other items, and moved the characteristics of the player up. Shopping, we will commit to a virtual currency earned in the arena. Since the client part of the game promises to be absolutely free, is not difficult to guess at what will make ngmoco:). In «Eliminate» add a system of «in-app» purchases. Thus, those who want to get all at once, did not make the battles, the developers will provide an opportunity to spend on equipping their most real money! Let's hope that ngmoco:) is not going to charge a fee for currency conversion and everything will be honest.



Managing the game is realized through virtual joysticks.In this case, review and is aiming for the principle of «tap to anywhere» (born - click anywhere) like we have already seen in the Modern Combat: Sandstorm.




Graphics on height. In the narrow corridors and small rooms, we see even the dynamic lighting of the shots. Bonuses, falling from dying opponents, drawn schematically, in spite of the fact that the sprite look good. Generally, it should be emphasized that the textures are drawn fairly high quality. In any case, the texture of higher resolution is useless on the iPhone screen is three and a half inches, so even if the dynamics inherent in «Eliminate», the difference we can hardly see.

Connect between players by using 3G or Wi-Fi. This will provide good data transfer rate, but, unfortunately, not all users have Wi-Fi, and, to put it mildly, not universally available network 3G. But other ways to connect to online games of this level there.

On the official page of the game, you can see what awaits us in the world «Eliminate»: 3D-models of weapons and armor and their characteristics.



The game is already on pre-moderation in Apple and will be approved soon.