Nepeo's Forum Posts

  • The below log message isn't an error.

    [C3 advert] Event (interstitial created Error () Type () Amount (0))

    The log has the format Event ({MSG} Error ({ERR}) Type ({REWARD_TYPE}) Amount ({REWARD_AMOUNT})), note how the error part is empty in your message. It's just saying that it succeeded to create the interstitial.

    I can't really offer much assistance without a project to look at.

  • Each tilemap tile can be considered equivalent to a cheaper version of a sprite, but whereas each sprite has it's own texture a tile shares it's texture with all tiles of the same type. Greatly reducing the required VRAM and number of texture swaps required to render your scene.

    This thread isn't for requesting help on the Mobile Advert plugin, I left it open in case anyone had further questions about the change. If you want to ask for help on the plugin I suggest you create a new thread.

    kyberosc the error your seeing

    ERROR: Rejection from 'advert' handler 'Configure': unsupported URL

    is caused by using an invalid URL for your privacy policy.

  • It's not just you, I totally agree about standard recursive descent. The way that precedence is decided by the control flow makes it feel quite inflexible, and you have to read a lot of code to actually understand the operator ordering.

    I've got a couple of personal projects on the go involving Pratt parsers, which are a variant on the operator precedence parser you link. The first being a JS parser written in JS and the second being a language prototype called Radiance(private repo. ATM) that compiles to JS.

    This is basically the core part of the Pratt parser logic...

    function parse (tokens, precedence) {
    	let next_token = tokens.lookahead();
    	let parselet = prefix_parselets.get(next_token);
    
    	if (parselet == null) {
    		throw UnexpectedToken(next_token);
    	}
    
    	let left = parselet.use(tokens);
    
    	while ( precedence < get_precedence( tokens.lookahead() ) ) {
    		let next_token = tokens.lookahead();
    		let parselet = mixfix_parselets.get(next_token);
    	
    		left = parselet.use(left, tokens);
    	}
    
    	return left;
    }

    It's quite flexible, you can do complex operators with multiple sub expression and non-standard precedence rules. Also changing the precedence is as simple as changing 1 number, which is nice.

    I find your parser experiments pretty impressive, it's obviously possible to implement such things using the event sheet but the type limitations must be pretty frustrating at times. Getting good error messages can require a fair bit of work, I think one of the most important parts is including an easy to understand location in the message. Some languages actually ascii diagrams of source code with arrows to the problem parts now... which is pretty nuts!

  • Right click the column you want to sort by, and select the sort direction you want. Doesn't work if you select the column header at the moment though.

  • You do not have permission to view this post

  • I've looked at the shunting yard algorithm in the past, but never actually implemented it. Most of the stuff I've looked at has been for generating ASTs for programming languages, which it isn't suited for. While the algorithms are quite different conceptually it's similar to how pratt parsing deals with precedence, but using explicit stacks instead of the call-stack.

    When working with recursive descent and a mathematical expression you don't really need to create the tree nodes, you can just evaluate each node as you reach it and return the value instead. Avoids the type limitations in construct.

    When you create an "app" on admob you select a platform, then you get an app ID for that platform. You can see on the left that you have selected Android.

    If you create another "app" on admob for iOS it will have a different app ID.

    Abhishek Thapliyal please read the manual page, it explains what a publisher ID is and where to find it. The TEST keyword is a legacy feature that was removed some time ago, I realised this morning that there was still a reference to it in the manual page so I removed it.

    The TEST keyword was basically a substitute for the example Admob ID values, but Admob considers them a special case and hence they often work when a real Ad unit ID wouldn't. Making them pretty useless for testing.

    Abhishek Thapliyal

    if you choose an invalid value for your app ID the application will be crashed by the SDK on startup

    It's a requirement by the SDK, it will not get your account banned. What the documentation says is that you should use testing mode with adverts during development. If you do not use testing mode then you will see real adverts that Admob are charging some company for, hence why they consider it a ban-able offense. Testing adverts will have a small label at the top that says "test ad", if you do not see this close the application immediately and rebuild it with test mode enabled. They are normally lenient if you see 1 or 2 by accident

  • Good point by if you do need to check the count I'd advise that you use greater than or less than where possible instead of checking for equality in most situations. Helps if you make a bad assumption on the possible range of a value or you fall foul of floating point error.

  • New instances don't appear to forEach and similar lookups until the next tick.

    Try adding in a "wait 1" before calling the "location" function.

  • Yeah we concluded it's probably an obscure caching bug, I've tried a few tricks to try and fix it but haven't had much luck. It doesn't look like it's synced to any of the servers though so refreshing isn't going to fix it. Your probably best off re-posting it.

  • macube I don't see your post either, but it does show up on reply. I'll talk to Tom.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • By the sounds of it you just want an app that can give your the answers to general mathematical expressions. There's a lot of subtleties to consider here, while it may seem simple it isn't. A general purpose solution to this problem involves multiple complicated steps that humans do unconsciously:

    1. Turn a list of characters into a list of words (Scan)
    2. Turn a list of words into a tree representing the expression (Parse)
    3. Calculate each branch of the tree recursively until you get the result (Interpret)

    For example:

    1. 1,2, ,+, ,4, ,*, ,2
    2. 12,+,4,*,2
    3. (add 12 (multiply 4 2)) = (add 12 8) = 20

    This area of programming is referred to as expression parsing, and while it's not the hardest thing it's quite theory heavy. I do remember somebody producing an expression parser using the eventsheet system awhile back, it was quite complicated...

    There are 2 "cheats" solutions to this. The first is to have 2 text inputs for values, and a dropdown with a list of operators that a user can select. While it obviously doesn't match up to your examples it is very simple to implement. The second is to just evaluate each line of text as JavaScript, this is also super simple but allows your users to run arbitrary code. You could run a quick check over each letter and only evaluate it if it matches safe characters ( 0-9, +, -, /, * ).

    For an intermediate solution you could create something that does the Scan, Parse and Interpret steps but uses a simpler format such as reverse polish(RP) notation 2 4 * 12 + or S-expressions (add 12 (multiply 2 4)). RP is the easiest as it is linear, not recursive, but is confusing for most people to write. S-expressions are easier to write but again aren't what people are used to writing. Both bypass the issue of operator precedence ( is 12 + 4 * 2 the same as (12 + 4) * 2 or 12 + (4 * 2) ) which is one of the more complicated issues around parsing.

    For an advanced solution I would recommend reading up on Recursive Descent parsers or Pratt parsers.