ca59eb38-e0ad-4975-9634-a2379c986d93's Forum Posts

  • Well, you could create a system which can update the positions of your objects so that they always stay in a relative position to the window size, and stretch (with/without preserving the aspect ratio, maintain size relative to screen width/height) them as necessary.

    Here's a thread where i posted how the end result should look like (proof that this is very much possible in C2), however it isn't made with the best practices and therefore would introduce bugs into something faster paced such as games: http://www.scirra.com/forum/your-c2-tests_topic41840_page57.html

    Also, a direct link for the lazy: https://dl.dropboxusercontent.com/u/80437109/LimbaziLive/web-test/index.html

    Something that i should mention is that you'll probably have problems with the touch controls / mouse input coordinates when using the scale outer mode, i had to re-create a new system (2 global variables for both the X and Y coordinates) that takes the viewport sizes into account, just to be able to precisely read the input... :/

  • Well, the way i see it, they aren't flipped, but just rotated, as you rotate the whole sprite, not just the speed vector.

    If you want to change the movement direction by 180 degrees, you could either:

    1.) set the speed to a negative value, for example

    "when sprite at necessary position / collides with the border -> sprite(bullet)speed = sprite(bullet)speed * (-1)"

    2.) rotate the sprite by 180 degrees and flip it vertically, you'd do this by setting the height to a negative value

    "when sprite at necessary position / collides with the border -> spriteheight = spriteheight * (-1)"

    horizontal flipping could be necessary, also.

  • *sigh*

    I am now considering making something in CC that would parse the content of such sites. Either way, i guess i'll just stick to the dropbox for now.

  • It works perfectly in Node-Webkit (and probably other browsers). It appears that i might have to switch browsers (assuming that this is isolated to chrome). >_>

    Update: It appears that it indeed might have been have a problem with the host, as images from dropbox load just fine. But why did the Webkit work, then?

  • Aphrodite I already checked the manual, but i've also tried about 4 or 5 different images including ones from Photobucket, which supposedly allow cross-requesting. A google search turned up a StackOverflow page, in which people claim that this is a bug with chrome... >_>

    Edit: However, images can easily be loaded from a base64 string. Any idea how i could convert an image to such a string somewhere online and then just retrieve the string to be loaded?

    also, ninja'd

  • Update (and a shameless bump), the console of the chrome browser shows the following:

    Cross-origin image load denied by Cross-Origin Resource Sharing policy.

  • This feature of the sprite object doesn't seem to work at all!

    I need to have an image loaded from a URL and displayed in my application, however i cannot get this to work properly with the default sprite object.

    Here's what i'm trying to do:

    Keyboard | On Space pressed --- sprite | Load image from "http://gamemakerblog.com/wp-content/uploads/2011/02/construct-2-logo.png" (Resize to image size)

    I even tried to add a text object which would show when the image is supposed to show, but this shows me that the event fired by pressing the space triggers, however the "On image URL loaded" never triggers. Testing in Chrome without WebGL, internet connection is fine.

    The test image i use:

    <img src="http://gamemakerblog.com/wp-content/uploads/2011/02/construct-2-logo.png" border="0" />

    Nothing is displayed. What am i doing wrong?

  • You do not have permission to view this post

  • You do not have permission to view this post

  • You do not have permission to view this post

  • Pretty surprising, actually. Now (when and if we get more results) i'll have to cook up something to compare the physics engine and other such features...

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Joannak

    <img src="http://i.imgur.com/1d7roJG.jpg" border="0" />

    Although i have to say the the speed seems off, it's a pretty good clone! :D

  • You do not have permission to view this post

  • Well, i won't mind if anyone does (as i said, anyone can do whatever they desire with it). I, on the other hand, most certainly won't do it because of... hmm, reasons? Yes, that sounds about right.

  • I updated the benchmarks now, pixel rounding is now off (although i didn't get very much improvement after re-running the tests).

    SgtConti If i'm not mistaken, then the framerate of C2 is locked to 60fps (or perhaps that's just the refresh rate of your monitor?) and while it should be the same in CC, i had to figure out a way of manually calculating the current fps, which probably isn't too precise (the project has it set at a fixed rate of 60)...

    As for the time testing takes, it is so because new sprites are created every 5 ticks, as opposed to every single tick. If you want it to be faster, you should download the .cap(x) files and edit it to say "every tick", i can update the .cap(x) files for you, if you want this (although giving you pre-made .exe files will take a couple of minutes, as my upload speeds are not the best).

    Update: I made a version, which should work 5 times faster and thus be more useful for modern computers. Just get the "every tick" version...

    Aphrodite I used the latest version of CC (r2) and a somewhat recent one of C2 (r15X), i'll check and update the main post. Also, it's a bit too early to speak of playable games that can be used to compare the performance, as there still are a couple of problems that need to be solved, for example, the speed at which the applications run (what SgtConti had) and the optimal parameters for both CC and C2, so everything is fair...