Bertie Booster's Forum Posts

  • I've seen a number of people mentioning using Globals for storage and saving level data etc.

    Is it not better (practice) to create arrays and use them, something like this?

    You need two arrays one for your user data one for the level data.

    1          2          3          4               [Userid]

    Tim      Tom        Jim        Jon             [Playername]

    1          1          2          3               [Difficulty]

    Off       Off        25        75              [Music volume]

    On        On        Off        On              [WebGL]

    On        Off        On        Off            [Particles]

    Red      Blue        Green   Yellow        [Favourite colour] etc etc.

    You will need to collect this data and these preferences to populate the array

    Something like a 6 X 8 X 1 would allow you to really let the player customise their game settings.

    (You did notice that doing it this way immediately introduces the age old concept of multiple game slots didn't you?)

    Create a "Load Game/New Game" Layout.

    Populate the load slots with the relevant usernames from the array and make them clickable linking to control panel page.

    If total num slots > number players already registered

    then make visible a new player textbox. Tip ->(Player chooses name but system allocates Playerid on submit) <img src="smileys/smiley2.gif" border="0" align="middle" />

    Both options (existing and new)should divert to control panel page for user to select their preferences. Set it up so exiting the cp will store Userdata collected thus far use Playername for individual saveslot.

    You now have a list of players and their game preferences, and if you planned ahead you might already know their last level etc or anything else you would like to tie to the player in the Userdata array.

    The levels array is simple, no levels X 2 X 1.

    0    1,4000

    1    3,1500

    2    5,2500

    3    1,0

    4    0,0

    5    0,0

    Index level status (eg locked = 0, unlocked = 1, one star = 3) and highest score to date on that level. This simple array when added to the data which you harvested into Globals from the Playerdata array gives you all the information you need to do an angry birds 1-2-3 star menu layout etc with previous highest score for each level plus a cumulative high score to date all in just two simple arrays.

    Why so simple?

    You created a number of users who are identified by name and number.

    When a new user is added to the PlayerData array, the logic creates a LevelsArray and saves it under that Username.

    Tip Don't use persistent names such a "savegame" use variables such as "savegame"&Userid or simply Username (no duplicate check completed of course).

    This probably doesn't seem particularly simple if you're unused to arrays think of it as two relational db tables joined by the key "Username". Collecting the data is as easy as using conventional HTML forms (which is basically what they are in C2 anyway)

    Before I go let's just pop back to that first 6X8X1 array we created userdata.

    Now what if we were to change the dimensions to something such as 6X8X2?

    You've just provided each player with sufficient storage for an Inventory. <img src="smileys/smiley2.gif" border="0" align="middle" />

  • While I tend to use programmatic cross level HUDS now. A visual style would be more appealing.

    I'm using a generated HUD and although it's a piece of cake to add the Hud Event Sheet as an include to any layout, a problem manifests when you want to apply the HUD to a unique layer in or on top of a Layer Sandwich. The problem is that for everything to work dandy you must have defined the layer on the layout on which you want the HUD to appear and unless I've missed a trick you can't create a new layer on the fly. Therefore you have to at a minimum visit every Layout in your game and create the "hud" Layer which as has been alluded to from the OP onwards can be very long winded.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I've been suffering from this problem and tried all the fixes suggested in this and other threads. I've use a seamless tile effect in my image editor (PSPX4) so the 1 pixel trick doesn't work full stop.

    What I did eventually discover was that if I imported the object at exactly the resolution I use it in the game the tile border effect disappears and the tiling becomes truly seamless.

    This may be a bit of an obvious fix to many but I was importing at 128X128 then resizing in the C2 image editor to 64X64. Importing at 64XX solves the problem on all the tile types I'm using. If all else fails I suggest trying to resize the affected tile in a 3rd party image editor.