Toby R's Forum Posts

  • Just post your implementation screenshot, we're gonna check it out.

  • I'd vote for switching visibility and position. Also keep in mind that Text object is way more resource consuming than Sprite font object. So if you plan to use Text object and export it on mobile devices you will notice a small lag (at least on devices like SGS4 or so) before Text object will get rendered.

    Anyway C2 engine does not render invisible objects (as well as objects outside the game window), so everytime you create a new object C2 will have to build and render it. If you play with visibility, C2 will build it only once, put it into the memory and every next rendering will be faster.

    However if you gonna use Sprite/Sprite fonts and export it to any other plaftofm than mobile, I don't think there will be any noticable performance difference no matter which way you choose.

  • I've tested export with Crosswalk and "normal" Android using Intel XDK. Still Crosswalk performs much better on Android 5.0+ than the regular Android export. At least in my case.

  • I use the following:

    "floor(random(x+1))" if you need a range between 0 and X.

    OR

    "floor(random(b-a+1))+a" if you need a range between A and B.

  • 1. You should read manual o understand all properties, you will be able to set it up properly to suit your project well.

    2. Minimum Android version requirements you set up in Intel XDK by setting the minimu Android API requirements.

    3. This is not so important, you can set it to "no".

    4. For this you also should read tutorials and understand them. You may need to set up some plugins, depends on your project. Build setings are the most important, and most of them are self explainable. And the last one are the icons and splash screen for your game. You simply upload pictures there.

    5. It depends on your project needs - as I said above already.

    6. Various plugins, are in various places... so again - depends on the plugin.

    7. Well this is not enough to tell what is wrong. Probably you use some plugin which is not added.

  • I think you mean Text object not TextBox object.

    1) You can use "System -> Create Object" to create any object instance whenever you need, or you can spawn it from another object.

    2) Text object will bring you a lot of performance issues especially if you want to scale it on the fly. I stronlgly recommend to use SpriteFonts, and then you treat them like sprites, so you can easily scale/resize.

    3) You can create an invisible sprite called for instance "pinBoard". Then every visible/movable (by scrolling/sliding) objects should be pinned (Pin behaviour) to this sprite. The "pinBoard" itself should have "drag&drop" behaviour with only vertical axis enabled. This is the easiest solutions. You can of course add scroll limits etc.

  • Lenovo G780 - oryginal HDD + Samsung 840 SSD Pro 512GB. Works perfectly for any purposes. I think any laptop with i7 and SSD drive works really great.

  • You can set a background layer as non transparent and then System -> Set layer backgroud color. I haven't tried that, and I'm not sure how it will affect the performance, but it gives you a kind of freedom with the dynamic background color.

  • C2 is really great not only for mobile apps but also for HTML5 and desktop aps. As said it's easy to start with C2 and there are many things to learn which let you do even pretty complex games. However it is not a pure drag&drop. You have to tell the app how it should behave in various situations, so there is a visual programming involved (based on events and actions).

    Anyway there is a free version so you have nothing to loose, just take a look. Good Luck!

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • You need to use a C2 format.

    {"c2dictionary":true,"data":{"score":"5","high_score":"315","game_token":"xyzabc"}}

    Load this JSON to dictionary, and you will be able to read any data very easily: "myDictionay.Get("score")", etc.

    Your rails server should take care of that output format, this will make your life easier. For example my PHP server C2 core API contains following functions:

    protected function outputAsC2DictionaryJSON($data)
    	{
    		$data = array(
    			'c2dictionary' => true,
    			'data' => $data
    		);
    		$this->outputData($data);
    	}
    	
    	protected function outputAsC2ArrayJSON($data, $arrayDimensions)
    	{
    		$data = array(
    			'c2array' => true,
    			'size' => $arrayDimensions,
    			'data' => $data
    		);
    		$this->outputData($data);
    	}
    	
    	private function outputData($data)
    	{
    		header('Content-Type: application/json');
    		echo json_encode($data);
    		exit(1);
    	}[/code:1jdk7h4w]
  • As the naming suggests "global variable" is global. So you cannot treat it separately for various layouts - it is global for entire projejct.

    If you want to do a kind of global variable for the particular layout, you may do a "global" groupd in event sheet assigned to the layout and set static variable for this group. It will be visible for all subgroups as well but not for other layouts.

    Another thing is that for high scores you may want to use LocalStorage.

  • There might be a lot of reasons. Too big sprites, too many sprites, loops, text objects etc. Read performance tips and try to optimize it step by step. If it's not a big game you should be able to make it run fine.

  • You can do that with functions as nimos100 described. Or even a bit different - I would split that into two functions "setMyGlobal" (where you change value of your global) and "someActions". Second one should be invoked by the first one, and all logic other than setting a global variable value I would put to this second function. I find it more organized/semantic, but it obviously depends on what actions you need to do .

    But if you need to invoke it in the "observer" way, then each observer should have it's own trigger. So the trick with variables solves the issue then.

  • You can sell apk via your own website but Android device will warn a user during instalation that this app is from unknown source. User will have to agree on such installation. Is it legal? I believe it is, but better check. Anyway technically it is possible.

    Regarding iOS I think it is not possible. As far as I know iOS is hermetic and won't allow installs from foreign sources.

  • Yes it is only for the "first load". There is no way to do the loading progress bar between layouts. My tutorial might be a bit helpful https://www.scirra.com/tutorials/4832/h ... en-layouts, but no progress bar.