Tobye's Forum Posts

  • tap - Thanks for the suggestions, but how it is now it just doesn't resize at all without direct canvas. All the solutions you mentioned work fine with DC. Heh, no matter what I try with appMobi so far I always end up between a rock and a hard place. Here's hoping I get somewhere with it soon ^^

  • tap - thanks, I tried it out and it did centre the image, but it still doesn't resize it to fill the screen. Still looks much better though and maybe I can play around with it to get a suitable fit later.

  • tap - I found a spritefont plugin, but it is no longer being developed and does not work in appMobi. You can check it out here if you like:

    scirra.com/forum/plugin-spritefont-28th-august-2012_topic45876_page1.html

    And yep, that's the problem! Sorry but I don't know how to 'wrap the canvas tag in center tags or set the style so its centered.' Something I need to do inside of one of the .js files I take it?

  • tap - yeah I have been through that pretty thoroughly a few times. I can get fullscreen to work on everything (previews in Construct, Visual Studios and Direct Canvas apps), just when I don't use direct canvas and go through appMobi the game bunches up into a corner (I would show you a picture, but I actually don't know how to do it on these forums...).

    I have another question though, is there any way to work with dynamic text in Direct Canvas? I have been making some little 10 minute RPGs for Windows 8 while waiting for DC and would like to port them over when it's ready, but lack of text object makes it seem undoable.

  • Joannesalfa no I did not...where can I find that? I thought I finally had a decent handle on where things were.

    EDIT: Just did a little test and found fullscreen DOES work properly, but only when using DC. This is a bit sad, as DC doesn't work for me. tap any way to fix this for non-DC projects?

  • iunkn no, I had to turn it OFF. However my first two test projects worked fine with the minify ON and the test message does not appear for them. No idea why!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Joannesalfa I noticed in your pic that your app takes up the entire screen nicely, however I can never achieve this without setting the window size to exactly the same dimensions as the test device. I have it set to full screen and have tried all different versions, but it just adds black borders and pushes it into a corner.

    So I just want to know how to accomplish true fullscreen mode? Am I missing something?

  • Hi iunkn,

    I have been using your plugin with no problems, until recently when I tried out a new project. I used exactly the same method as the last 2 but it comes up with this error when I try to preview it in VS:

    Unhandled exception at line 317, column 254 in ms-appx://e290a0ad-2288-4897-b4ad-abea770ee896/c2runtime.js

    0x800a01b6 - JavaScript runtime error: Object doesn't support property or method 'Nr'

    Highlighting this line:

    (new Windows.UI.Popups.MessageDialog("Note: this Windows 8 app is in Test Mode, designed for testing purchases. Before publishing, be sure to set Test Mode to 'No' in the Windows 8 object's properties.")).Nr();window.addEventListener("resize",function(){a.dl=

    Do you have any ideas what might be causing this or how to fix it? Thanks!

    EDIT: Sorry, figured it out. I hadn't minified the script upon export, although I hadn't done that with previous versions either, and they never had a window appear warning I was in test mode either. Ah well, so long as it works! And thanks, this is really a great plugin :)

  • keepee & superkew

    Thanks for your help guys! Keepee's method works just fine, but out of curiosity, how is that different from what I was doing? I mean it looks like your method and mine should achieve the same results.

    And thanks for debugging tip Superkew, I can see that being useful :)

  • Knifegrinder Ah okay, thanks for that! I'm not too good with technical stuff, but eager to learn, so it's good to have an idea to work with at least.

  • Thanks, but that won't work as the objects don't change angles themselves. I want the object to always remain at angle 0, but to calculate the angle they would have if facing another object/location. This is because they are side-on sprites so if they rotated towards any position it would look crazy ^^

    When they use 'moveto', they do not change angles. They just move in that direction at the current angle.

    I have managed a solution, where it manually checks the instance of the minion and that of the pointer, then sets the animation. It is very doable actually, but nowhere near as clean as I'd like, doubles the number of sprites on screen plus I'm interested to see why what I currently have doesn't work.

    EDIT: Actually it seems my work-around doesn't work, as they get stuck on frame 1 when travelling in any direction except right for some reason.

  • If you want to add or change the speed of a bullet using a calculation you can use dt, so say you want to add 1 to the bullet speed 60 times per second, you go: everytick > set bullet.speed to bullet.speed+(60*dt).

    However, if you adjust the timescale bullets will automatically move in accordance with the new timescale. So if your bullets move at 50 pixels per second, then you set timescale to 2, they will move at 100 pixels per second instead without you doing anything else.

  • Then yeah, use dt. So if you want it to rotate 60 degrees per second, use 60*dt. 120 degrees, 120*dt and so on. It really is very simple once you get used to it, and really makes a big difference on slower devices!

  • Bullet behaviour uses delta time, I have used it a lot :) No need to do anything. I often use a gradual increase to delta time (e.g. everytick > set timescale to timescale+0.001) to have things speed up over time, and it works on bullets.

    If you want to exclude something, just set their time scale to 1 every tick too.

  • One method, if you want it to fade in in relation to the player, is to set the opacity of the object depending on the distance between object and player.

    So, set object opacity to 100-(distance(player.x,player.y, object.x,object.y*0.1)) for example.

    This way its visibility will always be in relation to distance, instead of just fading all the way in or all the way out. Not sure if you want this, but just thought I'd give an idea :)