vascco's Recent Forum Activity

  • Hello everyone,

    I am currently working on game for mobile phones and desktop computers, in 854x480 px resolution, but need to increase images quality, and now I am looking with the appropriate, higher, resolution.

    What are your opinions and thoughts, which resolution will best cover mobile phones, tablets and desktop computers, taking care not to drop fps rate too much, in the case of working with a lot of Physics objects (one layout can have and 100 objects with Physics behavior).

    I am thinking about 1920x1080px, but not sure yet because fps rate impact.

    Also, what do you think about 4k resolution, since I see that more and more fast mobile phones, with 4k screens, are coming out, how it will affect fps rate?

  • Hi dop2000, thank you for your answer. I tried and this too, but disabling / enabling physic and recreating joints always spoil the natural movement of the objects (some smaller and simpler objects can pass but complicated physics groups, with a lot od joints, make a mess).

    I still want to work with physics, but I think I will give up resizing objects and changing their positions by set position.

  • Hi,

    I have family with chain made by Physics revolute joints and trying to increase or reduce chain size in runtime.

    Tried a lot of options (Pin, Hierarchy, set positions, ...), but every time it come into conflict with Physics behavior.

    After that I tried with making Physics objects immovable and it worked during scaling, but after making objects movable, after scaling, at first they behave a little strangely, with some extra forces, before they stabilize, but that doesn't suit me.

    At the end I tried with scaling entire Layer and it works fine but, it changed layer positions because Layer pivot points is at the center of the layout. After that I tried to move family objects, to offset Layer scale but got the same situation as before.

    What should I do? Is there a maybe way to change Pivot point for one layer only, or how to work?

  • I imagine the process to be like this :

    End of level, update stars value in the array for that level

    On map screen load, update all level images based on array data

    And I like this way the most. I think this is the way I will go. Thanks a lot to solve the dilemma.

    Another way to do it is to just use variables and use 'save' game to save the state of the game. You wouldn't need a global variable for each level, probably one track to track the current level and the stars obtained then when you return to the map you update the relevant level. Problem with this is that it is not permanently stored anywhere and it's hard to track if bugs occur, but you can give the level objects 'persist' behaviour so their variables remain the same.

    I wasn’t thinking about persist behavior because I made code which is imported all data back from savegame array into sprite instances, on layout start, and updated the instances after each matrix change, purely to keep debug up to date. I will try and persist behavour, but now I am most for the first way you said.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Now I know what data you are storing it should be an array, you can link the levels to the array rows by instance variable.

    And I like that way the most -> create levels with instance variables on map and import them into array for further processing and data storing. Thank you very much for your opnion.

    But one thing bothers me. After initial importing instance variables into array these variables become unusable if I do not process them back, together with Array, because all further processing takes place within the array, with sprite calls, and and instances would only serve if there is nothing in LocalStorage, as the initial starting points.

    Is that fine, or does that mean that after each array update I have to update and sprite instance variables, so as not to confuse later during the game debug with different data. What do you think?

  • "For example, I have game level map layout, whith level numbers as well as level completion progress."

    This can be stored as global variables or in an array. If you need any other advice you should give more details about the game and what data you are storing.

    Hi , thank you for your reply.

    The map is scrollable up-down, with about 200 levels connected with roads between them. In principle, the most variables are levels and map resources (coins and energy), while other things are just aesthetic images.

    There are various types of levels and every type have its own sprite. Every level have max 3 stars and every star is shown in accordance with player progress.

    If we go with global variables for every level, would that mean a minimum of 200 global variables is needed for all levels? Isn’t that a lot of global variables just for that purpose, or is that fine?

    So far I have tried 2 ways, one with level instance variables, because each level have more instance variables like LevelType, LevelNumber, LevelCompletion, etc., while second way is with arrays.

    In first way I created all levels on layout together with instance variables. Then I put all levels into Family and and on start of layout all levels are chacked with For each level, etc.

    While in second way I tried with Image points on Map background image and connected them with Array editor via AJAX and every layout start levels are creating based on array data and Image point positions. Then I save this array on Local storage.

    Both ways give me the same result, but first way is faster and clearer for code, and second way is slower, with full of array commands insted sprite.variable, but easier for game saving and later comparation between levels.

    I'm still trying to decide which way to go. Personally I prefer to work with arrays and dictionaries, but I also like and sprite instances.

    What do you think, what should I do?

  • Hello colleague,

    For a long time I was undecided about the best method of organizing game data. I tried 2 methods:

    1. Data storage and processing within sprite instance variables

    2. Data storage and processing within Arrays, with Sprite UIDs for calling sprites

    Seems to me first method is easier and faster to work, due to visual recognition and calling variables, while second method is easier for storage saving (AsJSON), as well as for data comparing, but visual recognition is harder (the form of the array and content should be written down somewhere).

    For example, I have game level map layout, whith level numbers as well as level completion progress.

    Shall I:

    1. create everything on level map layout and give instance variables to all levels (LevelNumber, LevelCompletion, etc.), with writing neccessary data to Array for saving game to local and cloud storage, as well as with data export from Arrays into sprite instance variables on start on layout; or

    2. create map background only, with multiple image points for creating levels positions on every layout start, based on Array editor and AJAX importing, while sprites would have only ArrayColumn instance, for array orientation.

    What are your experiences in that area? Which method is better for game organizing for you, or there are some other ways?

  • You need to create a Github account first. Then click on "New issue" on the above Github link and follow the instructions to describe the bug.

  • Hi eleanorjmorel, you can report a bug on the Construct 3 Github page: github.com/Scirra/Construct-3-bugs/issues

  • Just tried with Samsung mobile and works perfectly. Also, works fine on Windows.

    Seems the problem is somewhere between Construct 3 and iOS (tried on Safari and Chrome and sometimes it works and sometimes it doesn't work, for the same code), unless I missed something.

  • Hello colleagues,

    I did the following, with PlatformInfo object type:

    Event:

    System -> Every tick

    Action: Set canvas size -> Width: PlatformInfo.WindowInnerWidth; Height: PlatformInfo.WindowInnerHeight

    Fullscreen mode: Off

    After running on Windows 10, Chrome, every tick the canvas adapts well to the free space after every window resizing. Also,it adapts well after iPhone 11 Pro rotation (portrait to landscape and vice versa).

    The problem arises after screen rotation on iPhone 6s, when the canvas covers only about half of the screen. iPhone 6s has the latest software (iOS 13.6).

    Did i miss something or is this a bug?

  • Then it is a good solution. Let’s say someone manages to hack game data on the device, I believe that would be a very small number of players compared to the total number playing games, so I guess it is okay.

    Thanks again a lot for the help.

vascco's avatar

vascco

Member since 12 Feb, 2017

None one is following vascco yet!

Trophy Case

  • 7-Year Club
  • Jupiter Mission Supports Gordon's mission to Jupiter
  • 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
  • x7
    Quick Draw First 5 people to up-vote a new Construct 3 release
  • Email Verified

Progress

13/44
How to earn trophies