Toby R's Recent Forum Activity

  • 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.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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!

  • 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.

  • Just from the top of my head. Not tested.

    X=6, Y=4 are the cords of the field according to which you are searching for the nearest field with a value of 0.

    set searchOffset = 0;
    
    while not fieldFound (or whatever loop, this one is not important to specify)
    {
    	add 1 to searchOffset;
    	for "loopNameX" (X-searchOffset) to (X+searchOffset)
    	{
    		for "loopNameY" (Y-searchOffset) to (Y+searchOffset)
    		{
    			if Array(loopindex("loopNameX"),loopindex("loopNameY")) == 0;
    			//Do whatever you need
    			stop loop 
    		}
    	}
    }[/code:56q4jfsh]
  • If you mean Intel XDK then you might be interested with my ebook (link in the footer). It will walk you through step by step with explanations. And you can always email me if you don't understand anything.

    You can also simply post a topic on the forum with the particular problem you have.

  • Happy it works for you .

    What have you used for mobile version? Intel XDK or CocoonJS?

Toby R's avatar

Toby R

Member since 23 Mar, 2015

Twitter
Toby R has 18 followers

Connect with Toby R

Trophy Case

  • 9-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • x6
    Coach One of your tutorials has over 1,000 readers
  • Email Verified

Progress

14/44
How to earn trophies