16
Apr
12

Some things are different

I have realized that I sooner or later would run into something in RummyFight-Android that isn’t possible to recreate on RummyFight-iOS in the same way. I have so far been surprised at the 1:1 ratio of most functions but now I’ve stumbled upon a thing I need to rethink.

Well, it’s actually more than one thing.

It’s the listboxes in the Lobby… and also in the NewFight. They are pretty neatlty built codewise with several objects inheriting each other, sprites attached on top of sprites, dynamically created bitmaps etc. Now the problem I’m facing is such a trivial task as to strech a bitmap in X and Y. On AndEngine this was really simple. It was just a matter of setting myBitmap.setSize(100,50); which meant that regardless of the original size of myBitmap it was then stretched to be 100×50 without changing it’s scale factor.

The problem is that there is no existing function in Cocos2D doing the exact same thing. Sure you can use scaleX and scaleY to make something similar but it’s a zoom function which means that if there is some other object (like a text) attached to myBitmap it is scaled too and I don’t want that.

So maybe I will have to create a solution based on a totally different approach. I do need something similar though since a stretched bitmap is essential for the listboxes. It is the surface that all the listitems are attached to making them all scroll together when swiped.

There is however something in Cocos2D called contentsize. I will take a look at this later tonight. It might provide something I can use.

But besides this, the app now manages to login, fetch match list, update buttons, display ticker text in the top, create list boxes, populate them with match info and display them on the screen. Too bad however that because of the stretching problem the lists are displayed in 20 times zoom meaning that one single item uses up the whole screen 😉

But hey, you can’t have everything.
Cause where would you find the place to store it?


0 Responses to “Some things are different”



  1. Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s


Categories


%d bloggers like this: