Zebbi's Recent Forum Activity

  • how did you make a web view game? I don't see it as an option in XDK.. there is "cordova" but ultimately that seems (from my most recent game) to be bloaty and ran fine thus leaving me to think it's still using crosswalk.

    Perhaps I get webview if i uncheck "optimize with crosswalk"?

    Yeah, it makes a small apk.

  • The fact canvas+ (and really all non-browser engines) lacks so many features far outweighs any performance difference. Web Audio, form controls, XML parsing, standard-compliant inputs, sometimes even letterbox fullscreen, the list goes on and on. Fast and broken is worse than slower and working. If you can delete features to make something faster, it's not particularly useful if you need the features that got deleted. Note that (at least in the past I saw) it has other problems that come in to play as you increase the scale of your game, such as lacking the memory management that browsers have, so games tend to crash due to running out of memory where they would work in a real browser engine.

    We deprecated non-browser engines a long time ago and I firmly believe no C2 users should use them, even if they're faster in some cases.

    Modern webviews don't have any file size overhead. For example on Android if you target 5.0+, the APK is small compared to the size including Crosswalk. By the end of the year Android 5.0+ should be on the vast majority of devices. It's already at about 2/3rds worldwide.

    Absolutely, I was impressed how small 5.0+ build webview was in compared to even canvas+, but the the performance was just terrible in compared. Do you still recommend XDK as first port of call, or is phonegap better for android?

  • >

    > *quote snip*

    >

    > Ahh, so is there a way of sorting it out so I can have a second instance of the tilemap (for backgrounds) with solids disabled and not trigger the trace?

    >

    No. This is also unlikely to change, as having the Solid behavior continue to have an influence after switching it to custom seems arbitrary. Code-wise, I would either have to used an optimized method that might break in future construct versions, or perform a second search through an already filtered list. I'm not really fond of either solution.

    IMO, this problem of yours highlights the Tilemap plugin's inability to mark a tile as having no collision. Though the Tilemap plugin has improved significantly since its initial release, these sorts of shortcomings are why I don't use it in my projects.

    I 100% agree with you, I also would have liked to have a third tilemap for jump-throughs, which would complicate issues even further, which leads me to suggest that tilemaps need the ability to set behaviors per tile/groups of tiles.

  • >

    > >

    > > *quote snip*

    > >

    > > Here's an example, sorry I used 5 traces, it's just for a experiment, but as you can see, the second instance with the solids disabled still affects the trace: https://www.dropbox.com/s/0p6rkii91i8e4 ... .capx?dl=0

    > >

    >

    > Well, I would like to look at your project, but you've got these other plugins in it.

    > [quote:1u81lm8u]

    > MagiCam

    > Simulate key event

    > Platform Plus

    >

    > While I doubt another plugin is causing a problem, it's still a good idea to keep other 3rd party plugins out of a .capx when you are reporting a bug. But most importantly, I'm lazy and don't want to hunt down and install these plugins <img src="{SMILIES_PATH}/icon_lol.gif" alt=":lol:" title="Laughing">

    >

    Sorry, forgot about those! Here's a cleaned version: https://www.dropbox.com/s/62rf3cy1y7ukn ... .capx?dl=0

    As you see with the delayed function, the added instance causes the tracer to find the obstacles.

    Well, the problem is clear as day! Remember what I said before?

    If you are using the plugin in 'Solid' mode, it will ignore any instances where the 'Solid' behavior is disabled.

    That only applies for 'Solid' obstacle mode. It doesn't work in 'Custom' obstacle mode.

    Ahh, so is there a way of sorting it out so I can have a second instance of the tilemap (for backgrounds) with solids disabled and not trigger the trace?

  • it's a moving target.. i am sure things get faster / slower / shifting all the time.. file size should be the least of your concerns.. if the game is good people will download it. if they choose not to download your game because it's too big, they are fickle and thankfully a very small % of people downloading games.

    Well, it's not a moving target, it's exactly the same as it was last year, canvas+ is fast, xdk is slow, Ashley isn't supporting for cocoon, which I can't understand. Filesize, well, I don't believe anyone would ever download anything I make, I just do them for fun, and yes, people will care if a game is 4mbs vs. 8mbs, so it's important.

  • Well, I just compiled a comparison, and cocoon's canvas+ is still massively faster, but the touch-to-keyboard plugin didn't work, which is disappointing. The filesize for XDK using webview surprisingly is about half of what cocoon's canvas+ gave me, which was really unexpected. Any ideas how to make XDK faster, or is that the best I'm gonna get?

  • The plugin draws a (virtual) line from start point to end point. (you dont need to actual draw that line)

    When that line intersects with an 'obstacle', the expressions Trace.HitX & Trace.HitY will hold the exact coordinates of that intersection.

    Trace.UID will hold the UID of that obstacle.

    So, yes, it detects obstacles only.

    Where 'obstacles' is the description that the author of the plugin gave to what you would like to see named as 'targets', i understand.

    The plugin (although based on) is not a Line-of-sight detector, it is basically the opposite.

    Don't worry, it works fine for what I need it for, I just can't get it work with that particular tilemap setup, I've updated my project and you can see the second instance interrupts the tracer when it's loaded.

  • Pick overlapping point system condition could help.

    I feel so stupid, thanks for pointing that one out, I've even seen it and didn't think to try it!

    That seems to work to check for an overlap within the shape at any point. Or is there a more efficient way I can test for this using one event?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • The distance() expression only gives you the distance between two points. To get the closest distance between a point and a shape it will be more involved. Take the example of a square shape, you'll need to get the distance from all the corners and all the edges and pick the lowest value.

    Basically you'd setup the imagepoints on your object like this:

    0---1
    |   |
    3---2[/code:ohadkwkd]
    Where 0 is the origin.
    Then to calculate the distances you'd use the distance() expression to get the distance to a point, and for the distance to a line you'd use a vector dot product to see if the the projected point is on the line, then a vector cross product is used to get the distance.
    
    Example here:
    [url=https://dl.dropboxusercontent.com/u/5426011/examples34/closest_dist.capx]https://dl.dropboxusercontent.com/u/542 ... _dist.capx[/url]
    
    Now if that is too much math you can go for an approximate solution:  Put a lot of instances all around the shape you want to get the closest distance to.  It should look like dots going around the object's edge, the closer together the better.  Then you can then do an event like this:
    
    dotSprite: pick closest to  (mouse.x, mouse.y)
    --- set text to distance(dotSprite.x, dotSprite.y, mouse.x, mouse.y)
    

    I see, so maybe distance isn't so much what I'm looking for? What I need really is an expression that tests if a points x/y is overlapping an instance. i know objects can be testing if they're overlapping, but could a point be tested with system expressions?

  • >

    > *quote snip*

    >

    > Here's an example, sorry I used 5 traces, it's just for a experiment, but as you can see, the second instance with the solids disabled still affects the trace: https://www.dropbox.com/s/0p6rkii91i8e4 ... .capx?dl=0

    >

    Well, I would like to look at your project, but you've got these other plugins in it.

    [quote:18dg7400]

    MagiCam

    Simulate key event

    Platform Plus

    While I doubt another plugin is causing a problem, it's still a good idea to keep other 3rd party plugins out of a .capx when you are reporting a bug. But most importantly, I'm lazy and don't want to hunt down and install these plugins <img src="{SMILIES_PATH}/icon_lol.gif" alt=":lol:" title="Laughing">

    Sorry, forgot about those! Here's a cleaned version: https://www.dropbox.com/s/62rf3cy1y7ukn ... .capx?dl=0

    As you see with the delayed function, the added instance causes the tracer to find the obstacles.

  • I think it's a moving target at this point.. if you really want to know right now.. make some kind of test project.. like do a "on ever tick" spawn an object or something over say 10 seconds.. and count it. see what score you get on both. Although this is just one test it should still be a quick / dirty test to see which is able to generate more content fast.

    I can't even remember how to set xdk up, hopefully the shatterbox guide will remind me.

  • Use the dimensions of the object: sprite.x + (sprite.width / 2)

    So, for instance:

    distance(tracers.HitX,tracers.HitY,badguy.X+badguy.width / 2,badguy.y+badguy.height / 2)
    Less than 16
    [/code:3sa24wrk]
    I can't get it to work evenly, I mean, that 16 could be, say, less than 2 to test for an overlap, couldn't it?
Zebbi's avatar

Zebbi

Member since 20 Jan, 2014

None one is following Zebbi yet!

Connect with Zebbi

Trophy Case

  • 10-Year Club
  • x3
    Coach One of your tutorials has over 1,000 readers
  • Email Verified

Progress

12/44
How to earn trophies