[Game][iOS][Android] Jewels Treasure Hunter

[Game][iOS][Android] Jewels Treasure Hunter
0

Hi there!

I would like to present my next game built with cocos2dx: Jewels Treasure Hunter.

Download from AppStore

Download from Google Play

Jewels Treasure Hunter is a simple (at first) matching puzzle game. Your mission is simple: try to remove all the jewels from the board. Collect golden stars, unlock chests and hunt for treasures.

Thank you for any feedback.

kds

1 Like

Congratulations on releasing! I like the pirate feel, or at least it feels that way to me.

The game has really a good feeling. One point I would improve are the buttons at the bottom (on an iPhone X or later). Some more padding to the home indicator would be nice.

Another improvement is, that you could disable the home indicator, so you have to swipe up twice to exit the game. In the RootViewController.mm add that code:

-(UIRectEdge)preferredScreenEdgesDeferringSystemGestures
{
  return UIRectEdgeBottom | UIRectEdgeTop;
}

Could you give some insights into the game development time? What tools are used? What was the development duration?

@slackmoehrle Thanks! Yeah, I feel the same :wink:

@mars3142 Thank you!

I was testing on simulator and didn’t notice that. I will move bottom buttons a little bit higher in the next update. Also swapping up twice to exit the game sounds good. Thanks for the hint :wink:

I was developing this game around 4 months, but it was mainly UI (all the graphics and animations) and levels design work. Most of the core gameplay (like managing jewels in boards, game states etc.) was done while working on other projects and I am developing/maintaining this “core” for almost 3 years now.

I used cocos2dx v3.15, c++.

2 Likes

HI there @kds congratulation. it’s really nice and smooth game. We have downloaded it and tried it, feel really great while playing :slight_smile: , we are developing one poker multi player turn based game too and it’s our first game, we don’t have any senior here, so we are having some problem, if you don’t mind can we ask some of our question and may be you can guide us. again nice game, We noticed one bug cause we had it too :smile:, when we click on share and in privacy policy “to know more” button multiple time it opens up that many instance of share and browser dialog, we know it’s not big deal but just we wanted to let you know, well if you can help up us out little bit we would appreciate it :slight_smile:

Thanks @parth3535.

Hmm… that is strange :slight_smile: I clicked privacy policy button multiple times and single website is opened. What device do you have?

Feel free to ask :slight_smile:

I have clicked multiple time but it is not showing in the video but cause multiple clicks it opens up that many instance


as you can see in the picture I am closing it multiple time

Thanks, these are the questions we are looking for and not getting solved, we know it’s many but hope you can help us out

  1. What do you use for exception handling
  2. How can we get that splash screen while scene are changing in background
  3. How you are getting response back that fast from java after finishing that share or ratting dialog (or you are calling it on click button but with little bit delay - we notice it sometimes that “thanks popup” and ratting dialog box open up same time)
  4. Does this game support for how many type of ration (16:9, 18:5, etc.) devices
  5. Does this game support tablet
  6. How may assets set you have used (we have looked into the internet and found most of them are using different assets for different screen size and ration devices)
  7. And if you are using one asset set, how you manage for all different ration devices
  8. How you created assets (which software and based on what canvas size, and what is your game design resolution)

We have tried to follow PPPoker which was developed with Lua, and we are not sure but they are using only one asset set

https://play.google.com/store/apps/details?id=com.lein.pppoker.android&hl=en_IN

Thank you @parth3535 for the video. I see the problem, but I can’t reproduce it on my side :confused: Is it iOS? In the onclick callback I open website only once. Hmm… i see it for the very first time :wink:

  1. What do you exactly mean by exception handling? Do you mean c++ exceptions or maybe handling network issues?
  2. It depends how you manage your game states. You need to do the “trick” (in cocos you draw the scene only in one thread). I have the state called “loading state”. Let’s say the current state is “menu”. You create and push the “loading state”, it covers the menu state. Then you change “menu” state with e.g. “play” state. Now you just pop the “loading state” and your “play” state is visible. Do you get the idea?
  3. I call platform to rate, when it gets back to game I show the dialog. I remember that I wanted to do it in other way with tracking foreground/background events, but I finally left it how it is now.
  4. It should support all screen resolutions. For example I am running same build for iphones and ipads.
  5. Yep.
    6, 7 It depends. If you have very detailed graphics then it is good to have at least 3 sets of assets. Now it is easier at least on Android to handle it (bundles). But, you don’t really have to do it in this way. For example in case of the poker, background doesn’t have to be in very high quality. Only cards should be in higher resolution. What you can try is to use one set of the graphics, but keep cards in higher resolution and scale them dynamically in the game. Additionally, some of the graphics scale up and down very well, without any difference, when others may be blurred. It needs to be visually tested on various devices. There is no perfect answer for that. Ah, and use spritesheets for the cards. Background is usually big so it makes more sense to keep it in separate texture.

Even if you have multiple sets you still need to adjust sprites to the current screen resolution and position them properly.

  1. All the graphics are created in 4k resolutions. My game design resolution is 480x854. Photoshop, Illustrator. I outsourced the graphics, I am not so talented :stuck_out_tongue_winking_eye: :slight_smile:

You can always switch to multiple set. First create the original graphics in high resolution, so that you won’t have to recreate them later if you decide to use higher set.

If PPPoker is using one graphics set and it looks good then it is good.

1 Like

ohh, okay

not IOS, I have tested on Android (video from Android Device)

Yeah we are talking about c++ exceptions

yeah we got but, we didn’t know about this state thing, how can we apply that in our game, can you provide US demo code, we want to apply that in our game, it makes the game feel smooth

we are not getting this :smile:

hmm okay

Okay, that’s good, When we play the game on the tablet it loos something like this

and phones like this,

as you can see on the tablet it got to mess up and looks everything big, how you overcome this problem any suggestions

Thanks for the tips about background, cards and sprite, We have only one assets set (what we are confused about is that, suppose we have one image created in 16:9 (1280*720) based canvas now when we are using that image in 16:9 based ration and around that ration device it scale up and down perfectly but if we run it on device which has different ration it starts to stretch)

oh thanks, one question why you have selected 480x854, and not any other, and if you are using assets based on 4K , does’t game gets too big

Could you share Android version and device type?

It is up to you how to handle it. I am usually checking for return values. I didn’t have to use c++ exceptions.

Game state is something “logical” in my game. What exactly do you want to achieve? Do you want to show the splashscreen while loading the game? I see that you already have some “loading” in the game.

What is your resolution policy?

That is only design resolution. I am managing my sprites internally in the game. Some of the graphics are in lower and some in higher resolution (like jewels).

Android 8 (oreo), Device - Redmi 5A

Okay

yeah, we want to apply splash screen while loading, we have loading but it shows when it enters in scene and between scene transition we are getting black screen, so sometimes it takes a bit noticeable time and it feels bad, on the other hand, your method looks cool, cz you can see only loading even it takes more time while changing scene, i have tried looking for state and I found something like this [Tutorial] Hierarchical Finite State Machine this is somethong you are applying?

this is in my appdelegate

  glview->setDesignResolutionSize(glview->getSafeAreaRect().size.width, glview->getSafeAreaRect().size.height, ResolutionPolicy::SHOW_ALL);

you mean we can use any design resolution we want or it depends on device screen ration and resources (canvas size)? cause we mention early if use image which is created in one 16:9 and use it for 18:9 it stretches, so i wondered, how you are not having the problem even your game design ratio and assets ration are not same? can you please explain, we really need to solve this problem, having since start developing game

Sorry for the late reply.

It is all about organizing your game in logic parts. FSM is really good for that, but if you want to have smooth transitions between states it will get more complicated.

I don’t know how you game is built, but basically: put all your main menu elements in one “nodeMenu”. Then put all elements from game screen in another “nodeGame”. Now create loading “nodeLoading”. Create “nodeManager” node. Add nodeManager to the scene. Add nodeMenu to nodeManager. Now user presses something. Add nodeLoading to nodeManager (nodeLoading will cover nodeMenu). Remove nodeMenu and add nodeGame at the same “z” position as nodeMenu. Remove nodeLoading. nodeGame is visible to the user.

Now create super node as a base for the states (nodeMenu, nodeLoading etc.). Add some extra methods for transitions. Extend nodeManager to make it easy to manage everything. You are done :slight_smile:

You still can do whatever you want (I love and hate cocos for that :P). Usually background graphics are bigger than screen with regions that can be hidden/cut/invisible. If you scale the height by “s” then make sure that you scale width by the same value (and vice versa).

Change policy to “fixed_width” and rearrange your UI withc % screen coordinates, e.g. don’t put setPosition(10, 20), but setPosition(0.1f * screenWidth, 0.2f * screenHeight).

1 Like

No need to sorry, thanks for answer :slight_smile: As you mentioned we have taken one Scene and then we have converted other scene into layer so now when we want to change layer, we put loader layer then remove current layer and then add new layer, Do you think is it okay to use only one scene for whole game?

we have changed policy to “fixed_width”, and about the position, we are taking it the way you mention,

like this, thanks

will it work if we have asset set created on canvas size (1280x720)(16:9) and then when game run on a device which ration has different then (16:9) I think it will stretch, we have found something on the internet, we just can’t understand how did they do it maybe you can,

slide number 23, thanks for the help

A benefit of using true scene management is the ease of push/pop/transition etc. You will have more work and potential code mess using only layers. In iOS that would be the loose equivalent of only 1 view controller for an entire app. Just my 2cents there. But, it is always what is most comfortable for you to work with. No 2 developers are alike.

1 Like

Thanks for the answer @tdebock oh, yeah you are right about scene management and if chose to use layer it is increasing complexity but I guess it bit faster then scene :slight_smile: