tomsstudio's Recent Forum Activity

  • Ashley

    But since i have the downscaling set to 'high quality', shouldn't the last frame be the same as all the others?

    You say setting it to high quality would fix this case, but its just the same as before. What setting do i need to adjust so the last frame appears smooth like the others?

    Regards,

    Tom

  • Problem Description

    High resolution sprites with a uneven number of frames on export are having their last frame skipped in the "spritesheeting phase".

    https://dl.dropboxusercontent.com/u/57190534/renderingtest/index.html

    Attach a Capx

    https://dl.dropboxusercontent.com/u/571 ... gtest.capx

    Description of Capx

    Too see the result you will need to export.

    The capx contains 2 of the same sprite, one with an even number of frames, and one without.

    I just added an extra frame to the second sprite with a blue dot.

    Steps to Reproduce Bug

      Export to nodewebkit or html 5 Speeds are set to 1 frame per second, so be patient. Observe on the last frame of the first sprite the jagged appearance.

    Observed Result

    If you unpack the package data in the nodewebkit export, you will see construct 2 will correctly sprite sheet the first 4 frames of the first sprite, but not the last. You always see the second sprite sheet with 6 frames has been sprite-sheeted correctly.

    Expected Result

    I expect the all frames are treated the same.

    https://dl.dropboxusercontent.com/u/57190534/renderingtest/index.html

    Affected Browsers

    • Chrome: (YES)
    • FireFox: (YES) NA

    Operating System and Service Pack

    Windows 8.1

    Construct 2 Version ID

    Construct 183, also tested on 182, 181, and 180.

  • I have an event set to destroy an object on the layout if not the host.

    My problem is, the game never thinks I am the host.

    I dont know if others have had this issue before or not. but I am stuck here.

    As the code is, the player gets destroyed when this should not be happening.

    You are calling the multiplayer.host check before multiplayer can connect.

    So even before it can join the room, its realising its not the host because its not connected, so it destroys the player.

    You need to have,

    on.multiplayer.joined.room

    is host : Associate player with multiplayer.peerid

    Else

    <invert>is host</invert> player.destroy

    Hope this helps,

    Tom

  • One way you could do this is run through all the animations on start of layout and save the animation name for each frame to an array.

    Everything can be done with a little event work.

  • You need to set both player and enemies default controls to "no", this is done while making the game.

    To move the player around,

    if keyhit.key(rightarrow) player.simulate.moving right ,, etc etc

  • This is not a bug.

    The layer background is blue when you save the game using savestate.

    You can change the background color in the project but once you load the it up again, the game loads the previous state you had saved on start.of.layout

    The save state had a blue color background, so what you see is correct.

    You will have to either override the saved state on the start of the layout, or change the background color in game with set.layer.backgroundcolor and then save it.

  • This is not a bug, you need to add the file name to where to you are copying to.

    So nodewebkit.copy( nodewebkit.appfolder & "package.nw") to nodewebkit.appfolder & "copy\package.nw"

  • Hey, any chance of uploading the streams to youtube?

  • I'm trying to set a list and another text box from a dictionary by using the st from json action with the expression dictionary.asjson but none of them seems to respond

    The way your using .asjson wont work.

    When you try and load a text box with .asjson, the text box is looking for the text box format json. As you are trying to load a 'dictionary json format", the text box will not recognize it.

    If you want to insert raw dictionary data, then go textbox.settext > "" & dictionary.asjson.

    If you want to get sequential values from the dictionary, then i highly suggest using an array.

    But it can be done with dictionary.

    One way is to use numbered keys, i.e. key: "0"="bob" key: "1" = "sam" etc etc.

    Now we create a for loop.

    For i = 0 to 9

    Textbox.appendtext "" & dictionary.get(system.loopindex("i") & "") & newline // Here we convert the numbered loopindex into a string so we can address the dictionary key to get the data.

    I hope this helps.

  • rexrainbow

    You little beauty, Just what i was looking for!

    Thankyou So much!

  • Have anyone made a MMO game made by Construct2? If so that will be totally awesome! Since MMO games are a communiy game & players can interact , fight each other, etc... If so please link it!

    There are so many popular MMO Games, but if there is no MMO games, hope some developers do one. and Ashley maybe adding a MMO template in c2 would be a nice idea I think. Well Let's discuss this.

    An MMO?

    Doubtful... But to Ashley 's credit, the multiplayer feature, given a few tweaks + Chrome, is extremely powerful.

    I went quarters with a few friends who were renting a couple of servers for minecraft. So i could run some tests before they started using it.

    The servers had an xeon quad core 2.2 ghz, 128gb ram, no dedicated graphics, 1gbps up/down link.

    1 server ran all the clients, the other ran all the hosts. I had over 75 tabs open on one server each running 250 objects bouncing around with physics + multiplayer syncing.

    The 'client' server pulled 300 tabs open with 4 tabs connecting to each 'host' and receiving the syncs from the host.

    At this point the network was running at max(both servers on same rack), cpu was around ~30%, ram was negligible.

    I Had the servers running for about half an hour before a few tabs on the host crashed(i think due to network congestion), but what amazed me, is that it didn't affect the other tabs that were running.

    If you host a server built with C2 that utilizes multiple tabs within Chrome, or Nodewebkit, you will find the game will scale terrifically as each tab uses a separate thread(assuming your running a intel processor with hyper threading).

    I have also found in separate tests each tab can access around 1.5gb of ram before crashing.

    Hope this help,

    Best Wishes,

    Tom

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • While somewhat hacky,

    The way i use layers may be suit your game.

    The game i'm making has a base grid of 64x64 px. It's isometric so i have to have a efficient z ordering system.

    This only works if all your objects have a base the can be divided by itself. For example units use a base of 1x1, walls 2x2, big buildings 3x3 etc etc.

    I translate the layout angle to itself -45, thus giving the feeling of 'isometric'.

    So if the base grid is 1x1(*32px), and say the width and the height of the world is 50x50. Then i have 99 layers in game.

    For static objects, on.created move to layer int(object.x/32 + object.y/32).

    For moving objects, such as player or monsters, for each object, move to layer int(object.x/32,object.y/32)

    If your game is using a normal angle, then you can simple add 1 layer per y height / base tile.

    So now on create move to layer int(object.y/32) ` same with every tick.

    In game this works really well.

    However the downside to this is when debugging. The debugger will be checking every layer, so its runs at a crawl.

    I hope i explained it well. I can post a screenshot of how it works if you need.

    Best of luck,

    Tom

    For static objects

tomsstudio's avatar

tomsstudio

Member since 29 Aug, 2013

None one is following tomsstudio yet!

Connect with tomsstudio

Trophy Case

  • 11-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Regular Visitor Visited Construct.net 7 days in a row
  • Steady Visitor Visited Construct.net 30 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

16/44
How to earn trophies