Glu Mobile Inc., which publishes games for smartphones and tablet computers, said on Wednesday that it first-quarter loss doubled as it spent money to expand. But the results were better than expected and it predicted that it would break-even on an adjusted basis by the end of this year, and its shares jumped in aftermarket trading.

The company lost $6.8 million, or 11 cents per share, for the quarter that ended March 31. During the same period a year earlier, it lost $3.2 million, or 6 cents per share.

A 21 percent increase in the number of outstanding shares made the per-share loss in the recent quarter smaller.

Revenue rose 31 percent to $21.5 million, from $16.4 million in the 2011 quarter.

The company said that adjusted for one-time items, its loss was $500,000, or a penny per share.

Analysts, on average, were expecting a loss of 8 cents per share, on revenue of $18.5 million, according to data provider FactSet.

Glu has been riding the fast growth of the mobile gaming industry. Last month, it paid $5 million to Atari to buy the rights to the Deer Hunter game, and it said it expects to launch 23 titles this year.

The company launched three new titles during the quarter. Revenue from smartphones nearly tripled to $17.4 million.

For the quarter ending June 30, Glu expects adjusted revenue of $20.5 million to $21.5 million, and an adjusted loss of $2.7 million to $3.6 million, or 4 cents to 6 cents per share.

Analysts were expecting revenue of $19.6 million and a loss of 6 cents per share.

By the fourth quarter, the company said it is confident that it will reach sustainable adjusted profits without needing to raise more money or going into debt.

For the full year, it expects adjusted revenue of $86.7 million to $91.7 million. Analysts were expecting revenue of $84.8 million.

Glu ended the quarter with $28.9 million in cash, down from $32.2 million as of the end of December. It said it expects to end the second quarter with $22 million after paying $5 million to Atari. It expects to end the year with $18 million in cash.

Glu shares closed Wednesday trading up 3 cents at $4.61 before the results were released. They rose another 16 cents, or 3.4 percent, to $4.80 in aftermarket trading, after earlier spiking over 7 percent higher.