DUTOIT's Forum Posts

  • Yes, it is just the way it works.

    X = width

    Y = Height

    Z = depth

  • The above is xyz

    7 x

    5 y

    1 z

    That is why I said use c2 to make your array. THen download it as json. Then use the ajax to load the json file into array. It is a long way round, but it saves you in the end.

    I actually have a build data array event sheet which I disable(don't include it), but keep around for later use.

  • JosepM

    Did a small tutawhile ago for someone else.

    Below attached a modified version - Push blue button will download the json file. To get format.

    I create a number of json files and add them as project files and use ajax to pull them in.

    Makes easier editing as you can then edit the json files directly.

    [quote:32r39d5i]How show you to the player for example the owner of each country? or the momevent?

    Pieces overlapping zones could show who owner of country.

    Or count how many pieces he has, if he has more than other player and is overlaping country X, then he has dominaince over that area. You could create instance variable "DominatedBy" and list the players id or something similiar.

    You are going to have to play around with what works best for you, and what your skill set allows you to handle. Keep it simple stupid always seems the best route.

    Dragable pieces. And using overlapping. and storing data to variable instances.

  • {
    "c2array":true,
    "size":[6,5,1],
    "data":
    [
       [   ["Z1"],      [2],[6],[7],[9]            ],
    [/code:3jcnaszw]
    I don't know why, but C2 requires the "c2array":true part etc.
    
    Best bet is to create array using c2, then download it on start of layout. THen check the downloaded file as frame of refrence.
    One big map... I used image points, which can be effective. But breaking it up like you said is also good. 
    Done both ways, each with pro's / cons.
  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • i want a 3d game engine with no coding !!!

    2d : Construct 2

    3d : ??????

    They all require coding!!!

    But this is pretty cool

    Examples: Pearl Boy

  • agree with silverforce, if it is pc, go all out and make the best game you can.

  • Lol, just saw this on twitter:

    Product of Death Cycle

    [attachment=0:48dwg73z][/attachment:48dwg73z]

  • Is there a reason for this? Are games looked down upon if made with certain tools?

    Simple answer - Yes.

    A game should stand as a completed work, and not what toolset was used to create it...But in my experience, and it is a mindset of end users, who have opinions in general that if they know how it was made they box it into what they think its "value" is.

    If a book (a) took 7 days to write and book (b) took 9 years - people assume the 9 year book is better. Its just the way it is.

    By removing any info about the creation, allows the end product to represent itself in its completed state.

    Of course sometimes it is beneficial to stress how it was made, as it becomes a great marketing venture with software creators etc.

  • Real engineering is not about clicking your fingers and magical rainbow unicorns appear everywhere. It is mostly tradeoffs, sometimes very subtle, that must be carefully balanced.

    This sums it up nicely, and why I have learnt to trust ashley's choices in making this great software.

  • Its really hard finding games that were made with C2 that stands out.

    A lot of big games don't like to disclose how they were made. In fact you go out of your way to hide that you used xyz - lol.

    My vote goes with this as sexiest c2 game

  • JosepM

    Afterthought:

    You say you got lots of objects(images) for each piece of map etc.

    You are adding those pieces to frames right? Object Sprite called world map, and each frame is country etc.

    So all under one sprite object which has instance variables. You drag image and set the initial frame...

    [attachment=0:3olqa60l][/attachment:3olqa60l]

    That way you can have map with multiple frames of individual pieces. etc etc etc

  • JosepM

    Bundle them up using families. And assign instance variable to families...

    So for each families...

    condition: instance variable bla bla

    etc etc

    Edit:

    You need to make use of of entire toolset, from families to containers. and instance variables. With turn based and movement you have to keep track of lots of data, so you need more tools for the job.

    I'm all ears for simpler way. When you start moving pieces, having pieces overlap others, having multiple players, and tons of sprite objects. Instance variables are the only way I can safely assign unique data to various objects.

    With a unique id and data, you can then save to array/dictionary/ and ultimately to webstorage (save points)

    All ears if you come up with simpler solution - shrugs.

  • [attachment=0:1fk56efc][/attachment:1fk56efc]@JosepM,

    Very Basic example.

  • Hi DUTOIT

    I explain with more detail what I want to accomplish.

    Now I have the “hard coded” version of the map definition, I mean that I defined for each zone the posibles destinations in “touch event”. Thank you for your tips.

    I want that these posibles destinations will be drive through an array. For each zone I have an array with the posibles destinations, so when the user “touch” one zone, I want repeat for each element of their array and change the frame, so maintain the zones connectors will be more easy.

    Pseudocode.

    Load from an URL or file the JSON of the arrays for each zone.

    Zone #A touched
    if active=true of Zone #A
    repeat for each element X of array #A
    	Change frame of zone X
    	Set active =true
    end repeat [/code:1r099xrj]
    
    On this way I can update the zones destinations from an array and not by “hard code”
    
    It’s posible do that? how can I refer to a sprite inside the repeat loop?
    Can I pass sprite reference to a function?
    I read about the UIID but don’t know how pass it?
    
    Salut,
    Josep M
    

    Load from json using ajax works perfectly.

    sprite.uid / sprite.iid gives you the unique id of the sprite. But I don't like to use this.

    My preferred way is to create an instance variable and name each one, that way I can control the assigned number.

    And you can retrieve it, condition it, manipulate it etc etc easy enough.

    Point is. You can now check against the array.

    So if instance variable = to any of the array numbers then sprite frame 2 to highlight possible moves, or whatever.

    You need the instance variables to use in conditions, especially when moving pieces, highlighting active/non active etc etc.

    UID/IID should never be hardcoded.

    So if zones destinations (instance variables) = array possibles destinations then ...[do this, or that]

    Don't hold me to this:

    But instance var

    City Name: London

    Zone: 1

    Section: 1

    City Name: Paris

    Zone: 1

    Section: 2

    Array

    Zone1

    :: 1

    :: 2

    Zone2

    ::1

    ::2

    if zone.zone = 1 (this automatically selects all sections)

    if you want specif section, then add another condition if zone.section = 2 (this narrows it down to paris)

    So foreach zone...

    Condition: zone.zone = 1

    change frame bla bla bla

  • Lots of folks projects (the big ones) are between 1000 - 5000. There really isn't a limit on events.

    Limitations will arise from the usual suspects.