tulamide's Forum Posts

  • Please don't apologize. There is no need to! This is the help forum - where if not here could one ask for help? <img src="smileys/smiley1.gif" border="0" align="middle" />

  • Hey 00Rez,

    I like your work so far. Just keep on going, I think it is the right way.

    For the rendering "issue": You might want to try deleting every object that is not lit.

    I made the tests and I think there is something wrong either in the fps calculation or the code itself. But first the results:

    pretty example: 8-9

    rad 1: 56-60 (22-25)

    rad 3: 56-61

    rad 5: 58-62

    rad 7: 60-64

    rad 8: 47-51

    rad 9: 36-40

    rad 10: 29-31

    rad 11: 24-27

    rad 12: 21-22

    Now the thing is, to me it makes no sense that the framerate decreases if I decrease the radius from the starting 7 down to 1. But more obviously there is another issue. If I decrease the radius from the starting point down to 1 the resulting framerate is 56-60. But if I get to radius 1 by increasing from the starting point all the way up to radius 12 and still increasing, where it automatically switches back to 1, then the resulting framerate is 22-25. So there is something wrong, although I don't know what :)

    This is a very good project. It shows the hesitating people, like me, how far you can already go with C2. I will use this project (if you will post further updates, that is) to see the progress of C2 and my browser's speed :)

  • Set text doesn't change anything. It just does what you tell it to. You order the text box to set the text to the word "Lives".

    A global variable is adressed with the keyword global.

    Here is a cap showing how you have to do it.

    Also, please have a look at the wiki. It really helps with issues like this one :)

  • <img src="smileys/smiley5.gif" border="0" align="middle" />

    Previewing isn't working anymore.

  • Have a look at the image:

    Object A is the one that moves, Object B is the one that moves around Object A. The green rectangle defines the region in which Object B moves around Object A.

    You have to do two steps: Create a movement within a region with origin (0, 0) and set the boundaries relative to Object A's hotspot.

    Let's say, the green rectangle represents a region of 200x300 pixel. The points P1 to P4 then are (0, 0), (199, 0), (0, 299), (199, 299). Object B has 7 private variables: nx, ny, ox, oy, cx, cy, t

    cx and cy represent the current position within the region, nx and ny represent the new position that Object B has to reach, ox and oy the last position that was reached and t is the t-value for the lerp expression.

    Some random starting position (you could as well just set the initial values of the PVs):

    + Start of layout

    -> Object B: Set 'cx' to 80

    -> Object B: Set 'cy' to 90

    -> Object B: Set 'nx' to 80

    -> Object B: Set 'ny' to 90

    -> Object B: Set 'ox' to 80

    -> Object B: Set 'oy' to 90

    -> Object B: Set 'tx' to 1

    If Object B reaches nx/ny set a new position (use 'Pick by evaluate'):

    + ObjectB: Pick by Round('cx') = 'nx' and Round('cy') = 'ny'

    -> ObjectB: Set 't' to 0

    -> ObjectB: Set 'ox' to 'nx'

    -> ObjectB: Set 'oy' to 'ny'

    -> ObjectB: Set 'nx' to Random(200)

    -> ObjectB: Set 'ny' to Random(300)

    While valid calculate the current position within the virtual region and make the region relative to Object A's position:

    + System: Always (every tick)

    -> ObjectB: Add 0.5 * TimeDelta to 't'

    -> ObjectB: Set 'cx' to Lerp('ox', 'nx', 't')

    -> ObjectB: Set 'cy' to Lerp('oy', 'ny', 't')

    -> ObjectB: Set position to ObjectA.X - 100 + 'cx', ObjectA.Y - 150 + 'cy'

    This is just one movement style for Object B. You would have to adapt your own to this scheme. For example, the region is set centered around Object A's hotspot. You might want to have it not centered. Then calculate the "hotspot" of the region accordingly in the last action of the "always"-event. But the basics stay the same: "Move" the object within a virtual region. Then set the region relative to the first object's position.

    Here is the .cap: http://www.mediafire.com/file/tkk496k08okk65q/relative.cap

  • The "pause" happens, because "alt" is a system hotkey that sets the focus to the window's system menu (restore, minimize, maximize, exit, etc.) This menu exists if the window has a caption bar (it is the one you get if you left click on the icon in the title bar, or rightclick the title bar). So the quickest way to prevent this behavior without python or some plugin is to disable "caption" in Application Properties/Window Properties, or to go fullscreen.

    To be honest, this is the first time that I see this behavior. It is an issue that should be avoided by Construct if possible.

  • Good work. Running 60 fps in the 40x40 cells demo, needing 1.5 seconds to re-calculate.

    I don't know your algorithm, but make it flexible enough to only calculate rows and columns, instead of the whole scene. Then, while moving the camera only calculate the next one or two (depends on the speed of the camera movement) rows/columns.

    If the camera goes to the right, you only need to calculate one or two columns to the right, if the movement hits the next column (grid-based, in this case column 41 would be needed, etc.). Same for all other directions. The heaviest impact would be a diagonal movement, where both, row and column needs to be calculated.

    EDIT: Forget about it. Was writing quicker than thinking. It doesn't solve the problem of light cells that may influence the rows/columns. Sorry.

  • Yes, by replacing the system cursor with a sprite (set the sprite's hotspot to the upper left corner just like a windows mouse cursor). The MouseKeyboard object has an action called "Set cursor visible", which you set to invisible. Also add one event:

    + System: Always (every tick)

    -> mouseSprite: Set position to Clamp(MouseX, 0, DisplayWidth), Clamp(MouseY, 0, DisplayHeight)

    EDIT: You may also make the range smaller, if it suits your needs. Just change the values for X and Y, eg. Clamp(MouseX, 20, DisplayWidth - 20), Clamp(MouseY, 2, DisplayHeight - 16)

  • Just as a remainder: Audiere has problems playing mp3s on all systems. Make sure to test on some different systems, before shipping your game.

  • Might sound rough although not intended: What hinders you to quickly export two executables and compare their sizes?

  • EDIT: Here is a quick implementation of the plugin version using pre-calculated light/sight arrays. Left click to create a "House" which blocks sight. PLEASE NOTE: The slow down is caused by the number of black blocks, not related to the plugin! This is just a simple example to show the speed difference so nothing fancy!

    And what a difference it makes!

    The event driven demo runs with 4 to 26 fps on my pc, the plugin version runs with 58 to 65 fps (slowing down to 26 as soon as the black blocks are drawn).

    But I must say the event driven demo reminds me more on some topdown minecraft thingy :D

  • DirectX uses specific functions of the gpu.

    Of course it does. That's what "hardware accelerated" means ;)

    Also minecraft is java if I'm not mistaken, not javascript.

    My bad. I mixed it up. Sorry about that.

    Well, if it turns out that browsers in general don't reach stable 60 fps yet, it kind of relieves me. I really thought it is just an issue with my pc again.

    I don't see why I should buy some expensive hi-end graphic card just to be able to see 60 fps in low resolution canvas-games, when my current equipment is fully capable of doing it. I mean, it even runs flash games with highest demands and sizes solely based on the cpu with stable 30 fps. I expect at least the same power from HTML5.

    So I will wait just a little longer. (I don't like google, that's why I won't install chrome, I'll stick to firefox)

  • Hurray to Tom!! <img src="smileys/smiley41.gif" border="0" align="middle" /> [<:o)]

    Just tested the preview button again - and it actually shows something! Well, the font isn't displayed correctly, but everything else (the quotes, the links, the images...) seems to work.

    Thank you, Tom :) <img src="smileys/smiley31.gif" border="0" align="middle" />

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • The topic wasn't meant to say anything about or against C2. Its whole purpose was to see if I could get help here for a more general problem. I still doubt that Firefox really is using the hardware to accelerate the canvas.

    I can see this in little issues. For example, FishIE Tank is nothing more than a background with lots of fish spritrs running fullscreen. How come that the framerate jumps to certain values back and forth? I mean, there are no in between steps, it starts at ca. 32 fps, after a second it instantly jumps up to 60, half a second later it falls back to 32, a second later it falls down to 15, and then that whole loop repeats again and again.

    Out of interest, what's the lowest FPS for the Space Blaster game? At times, it drops to around 11 or 12 FPS when screen is busy for me.Where can I see the framerate in the online demo?

    HTML5 will run fast in every major browser pretty soon. Of course the hardware and OS combination probably won't be allowed to be too outdated. I'm actually more worried about mobile performance. That should improve too once the technology gets more popular.

    From my second little HTML5 performance test one could roughly talk about an average 44,2% improvement regarding the five biggest browsers in the last 6 months. If this keeps going, we are on a good path. <img src="smileys/smiley1.gif" border="0" align="middle"> And now it becomes even more mysterious: I followed your link and tried the sun-demo (Nice blog, btw!). According to your explanations and comparing my system with your system, that demo would need to run significantly slower for me than you experienced. May PC is just an older Athlon II with 3 GHz, the gfx card just a NVIDIA 9400 GS. But guess what? I had 46 fps instead of your 32 fps. Significantly higher.

    I mean, all I want is having a simple backdrop with 50 sprites in fullscreen running at 60 fps. With DirectX I can manage to do this with more than 1000 fps, so I don't think it is overcharging (and btw, Minecraft is javascript, too. It runs with solid 130 fps in FullHD-Fullscreen). I just don't know, where to start looking for the causes. Is it javascript? Is it Win XP? I know C2s demo is by far the slowest, but on the other hand I experience issues with demos too, that weren't created with C2 (although less processing hungry). So it isn't C2. It might be that a problem with javascript will be somehow enhanced through C2, which would be a good thing, as it would serve as an indicator to the robustness of the underlying javascript language.

    So, it seems, there is no solution to this obvious problem I'm experiencing?

  • Thank you for the fast replies!

    With "can't find any message, if Firefox is using the hardware or not" I meant some feedback from fierfox, that it found the hardware and will be using it. That's where Ashleys tip was very helpful!

    Firefox 4+ uses hardware acceleration, but only if your drivers are up to date. Go Firefox menu -> Help -> Troubleshooting information, and under "Graphics", check "Direct2D enabled" is "true".

    I did so and following is the text file created from 'Troubleshooting'. It's a german version, but the important part is under 'Grafik' (= Graphics). There is no item where it says, "Direct2D enabled". The very last entry says "GPU-accelerated windows" and lists 1 with Direct3D 9, but that's all I could find about acceleration at all:

    [EDIT] I also used 'about:config' to find anything about Direct2D. I found this entry: gfx.direct2d.disabled;false [/EDIT]

    Allgemeine Informationen

            Name

            Firefox

            Version

            6.0.2

            User-Agent

            Mozilla/5.0 (Windows NT 5.1; rv:6.0.2) Gecko/20100101 Firefox/6.0.2

            Profilordner

              Beinhaltenden Ordner anzeigen

            Aktivierte Plugins

              about:plugins

            Build-Konfiguration

              about:buildconfig

    Erweiterungen

            Name

            Version

            Aktiviert

            ID

            Adblock Plus

            1.3.9

            true

            {d10d0bf8-f5b5-c8b4-a8b2-2b9879e08c5d}

            Download Statusbar

            0.9.8

            true

            {D4DD63FA-01E4-46a7-B6B1-EDAB7D6AD389}

            DownloadHelper

            4.9.5

            true

            {b9db16a4-6edc-47ec-a1f4-b86292ed211d}

            Java Quick Starter

            1.0

            true

            jqshjs@sun.com

            Microsoft .NET Framework Assistant

            0.0.0

            true

            {20a82645-c095-46ed-80e3-08825760534b}

            Java Console

            6.0.24

            false

            {CAFEEFAC-0016-0000-0024-ABCDEFFEDCBA}

            Java Console

            6.0.26

            false

            {CAFEEFAC-0016-0000-0026-ABCDEFFEDCBA}

            Mehr Leistung und Videoformate f?r dein HTML5 <video>

            2.1.2.126

            false

            {23fcfd51-4958-4f00-80a3-ae97e717ed8b}

    Modifizierte Einstellungen

          Name

          Wert

            accessibility.typeaheadfind.flashBar

            0

            browser.places.importBookmarksHTML

            false

            browser.places.importDefaults

            false

            browser.places.leftPaneFolderId

            -1

            browser.places.migratePostDataAnnotations

            false

            browser.places.smartBookmarksVersion

            2

            browser.places.updateRecentTagsUri

            false

            browser.startup.homepage

            about:home

            browser.startup.homepage_override.buildID

            20110902133214

            browser.startup.homepage_override.mstone

            rv:6.0.2

            extensions.lastAppVersion

            6.0.2

            network.cookie.prefsMigrated

            true

            places.database.lastMaintenance

            1316176172

            places.history.expiration.transient_current_max_pages

            64400

            privacy.donottrackheader.enabled

            true

            privacy.sanitize.migrateFx3Prefs

            true

            security.warn_viewing_mixed

            false

    Grafik

            Karten-Beschreibung

            NVIDIA GeForce 9400 GT

            Vendor-ID

            10de

            Ger?te-ID

            0641

            Karten-Ram

            Unknown

            Karten-Treiber

            nv4_disp

            Treiber-Version

            6.14.12.8026

            Treiber-Datum

            8-3-2011

            WebGL-Renderer

            Google Inc. -- ANGLE -- OpenGL ES 2.0 (ANGLE 0.0.0.686)

            GPU-beschleunigte Fenster

            1/1 Direct3D 9