First steps towards a cocos2d hex-tile engine

On March 28, 2010, in Design, by Steffen Itterheim

I decided i should start with the first steps towards my own game. I already know that it needs to be tile-based because that makes a lot of things a whole lot less complicated. I also know that rectangular tiles just don’t cut it and hexagons are the way to go. Not only that, they’re a natural fit for what i intend to build – but no, it’s not going to be a wargame and you’re not going to move around entities across the grid either. For now i’ll leave it up to your imagination what the heck i might be doing. It’ll become clearer over time. 😉

I already know about the scaling issues of tiled engines, this cocos2d forum post being a good example. So i’m wary of mathematically correct hexagons (correct as in fractional vertex coordinates) and instead tried to come up with a simple hexagon shape whose vertices all lie on fixed point coordinates. In the image below it’s the top row. And as you can see in comparison to the perfectly shaped hexagons below (implemented according to this 8-year old article) they are a bit compressed along the Y-axis. But that is actually ok since i would prefer a look not straight from above but at a slight angle, so that any objects can be drawn as seen from a 60° or even 45° angle. On the other hand each object now needs 5 images for each of the 6 directions, with the horizontal direction mirrored. And hex tiles can’t just be rotated to any angle, only flipped along the x axis. So there’s a lot of gfx to be done (and paid for) but i’ll worry about this later on.

In fact, i fully intend to work on this game off of my mind, step by step. No big plans, just one step at a time, and see where it leads me to. I have some grand ideas of course but i see them more as a guiding light than a plan that needs to be implemented. If i learned anything from the process of creating Black Hole is that it’s never a singularity you’re working towards. The game shifts and drifts as opinions clash and fun evolves. I don’t even want to imagine how crappy the game was when we started but it can be a painful process, the idea that seemed so cool seemed to fail so utterly at one point and just didn’t provide the necessary fun for quite some time. But as you move along things start to come together in different ways, as you try out different ideas. And that’s how i’m planning this game. At the moment all i know is that i need a hex engine for cocos2d.

But doesn’t cocos2d support TMX maps which support hex maps? Well yes, and no. It doesn’t support hex maps with the edges pointing up and down but i need the straight connections to be in the horizontal direction. The other thing is: i don’t want to design maps, i want to generate them. And change them during gameplay. That seems like it’s not possible with TMX hex maps. I also want complete freedom, and taking a little time to come up with a hex tilemap engine is time well spent. I’m not building an engine from the ground up, just what is needed to draw a hex map and selecting fields based on coordinates.

About the look of the game, i browsed the web to find good examples of hex tiles that would fit perfectly to the game. But that was harder than i thought. There’s only one set of hex tiles i particularly liked, they were made by David Baumgart and posted on his journal:

I especially like the blending effect seen in the zoom-in part of the image. As much as possible i would like to hide the fact that the game map is based on hexagons and create a much smoother, visual look. But that is still a long way out and i don’t even know if that’s possible on the iPad. I’ll definetely dig into that though.

Tagged with:  

This article draws a bleak picture of games on the iPad.

I bet the reality will draw a different picture. Market analysis, polls, etc. they don’t mean much if people have to tell their intention for use of a device that hasn’t been released yet.

I’m sure *everyone* will surf the web and check e-mails on that device, so that is a no-brainer and everyone thinks of that first. But get people to *admit* that they would be playing games on a $500+ device without even so much as knowing the games that will be released specifically for the iPad – hardly going to happen. Yet, they will play, i’m sure of that.

And once we get past the pass-time games of the iPhone/iPod and make them visually appealing and playful on the large screen, people will come to love the iPad games and in no time they’ll be among the most downloaded Apps on the iPad App Store. I’m sure of that, too.

But i’m obviously biased being a game developer. 😉

Tagged with:  

The iPad Sex Story by Touch Reviews

On March 25, 2010, in Oddities & Fun, by Steffen Itterheim

When i read the Touch Reviews article on the very soon launch of the iPad, it was hardly unnoticable that the author is already in love with the device. I took the liberty to mash-up his article by using his own words, leaving only the crucial and telling parts. Fewer love letters to an electronic device were this … uhm, smooth.

I dubbed it “The iPad Sex Story” because i’ll get more hits that way. 😀

“The first pleasure .. beautiful packaging .. get their hands on .. envisage the initial handling .. enjoying the sleek lines and curves .. the weight in my hands .. overall beauty .. more than just skin deep .. lifeless in my hands .. rifling through the accessories .. just soaking in .. one of the first things .. i anticipate .. do the activities .. watching those .. keeps me coming back for more again and again .. larger area to play with .. placed perfectly .. left over from my other activities .. clean, smooth .. full-blown .. my initial impression .. piece.”

Tagged with:  
Page 1 of 41234