Lou Bagel's Forum Posts

  • Hello everyone.

    First I want to thank you for this wonderful dialog system.

    Just a quick question: I wonder how to display only particular discussion or dialog.

    Let say I have sprite.. and on collision with this sprite I want to display discussion id=1

    And then I have different sprite, so on collision with that sprite I want to display discussion id=2 etc..

    Please give me advice how can I do this?

    I usually would give them an instance variable then use the instance variable in the path. As per the discussion above I might change the system to using attributes/IDs instead of different tags but here is an example:

    XML.StringValue("/content/"&Interactables.class&"/"&Interactables.name&"/message/text()")

    So in this example Interactables is family (if you can't use family just make one object with different instances) an the class is either set to NPC or Sign, but works the same way, and the name is whatever name I give it. So my xml would be:

    -content

    --npc

    ---tom

    ----message Hello!

    But planning on eliminating the tom tag and giving the npc tag an id of tom.

    Magistross, I was going to ask if you can give an example of when you have used a for each xml node? I can't think how to implement it in any of my current situations.

  • In my opinion, in this case 2 frames is not enough for a walking animation.

    I'm not happy with the walking left/right animation and plan on changing it. Probably somewhere in between my first two attempts, one looks like he has a limp and the other looks like bouncing in a full sprint:

    I am happy with the walking down animation though:

    Not planning on changing it to more frames though. Using 2 frames isn't uncommon and I feel that more would be unnecessary in this case.

  • Thank you everyone for the feedback ( famousgnu6 , , Nagval333, icestorm30). The unanimous votes have made my decision easy!

    I have started messing around with making other characters (npc) from his frame, just trying out whatever comes to mind for now so many are similar and touch-ups needed:

    Just started on attempting females - I was reluctant at first as was worried about actually getting them to look feminine. Final result of first attempt:

    ...and purely for my own entertainment:

  • Also, IDs aren't indexes, we aren't numbering stuff, we're giving names per say. I don't see how it would force us to change the previous ones as we insert new data.

    My initial post was asking why tutorials were doing:

    Id=1

    Id=2

    Id=3

    Etc

    They also had the same path and tag, so that was my suggestion to use index instead of ID. I believe that was my only time recommending using index.

    So I guess we are in agreement that using IDs to "number stuff" isn't a great practice?

  • A unique ID provides a way to associate a particular XML node to a particular Construct object. Yes you could assiociate an index, but indexes are volatile, they change as soon as you insert new data (unless you always append). IDs will stay the same until you change them, even if you insert new data right in the middle of your file.

    Suppose you are interacting with an npc, and you know its IDs, reading the right XML with XPath is as simple as /root/npcs/npc, and this statement will always return the npc node with id = "myId", even if its index changes.

    I get that but I don't get why using ID would benefit over doing this:

    root

    -npc

    --tom

    ---scene1

    ----message hello there /message

    ----message can i help you /message

    ---/scene1

    ---scene2

    ----message welcome back /message

    ---/scene2

    --/tom

    --john

    ---scene1

    ----message

    etc.

    Would you really want to have IDs that long? id=tomScene1Message1; id=tomScene2Message1; etc.

    And the indexes being volatile was actually the benefit I was initially pointing out. What if you have 20 lines of dialogue in a scene to tell a story then want to insert another line after the first—you will have to change 19 IDs. Not horrible . . .until you change your mind again ...

  • Are you talking about posting an image to facebook or pulling an image from facebook?

    Not sure I can answer but I just recently noticed that when I have posted small images to facebook they have pixelated the hell out of it. So could be same issue if Facebook treats all small images the same.

  • Hi there, I am trying to create a sub-game within my game. I would like objects to fall from the sky when the player comes into contact with a bin which will then be used to catch those objects. These objects falling will only last 20 seconds or so then it will stop. I have attached the bullet behavior to the objects but don't really know where to go from here.

    Any suggestions?

    Using bullet behavior will make them move forward, which is defaulted to the right (I believe, when creating a new sprite it's angle is 0 which is to the right). So you can just change the angle to 90 but bullet behavior is really only necessary if they are moving fast. You can use platform behavior or physics behavior. If using platform behavior be sure to turn of "default controls" in the settings (or else the player will control them). If using physics behavior the objects will bounce off other physics objects. But beware with physics objects if you use a ton it will slow down.

    You could even not use a behavior and make an event that moves the objects down every tick, or something similar. Can put that event in a group and disable it when minigame not in use.

    So many options . . .

  • scirra.com/tutorials/1461/how-to-use-the-localstorage-plugin

    Yes, are you using any method to save the game? If not it will return to default every time opened.

  • Magistross It's not that I don't understand how to use them, I am just trying to figure out which method is efficient in different situations. I am still not sure how I can make use of IDs if they are unique, but I can see how attributes can be used effectively—something like this:

    Guard1 NormalMessage

    Guard1 SpecialMessage

    Guard2 NormalMessage

    Guard2 SpecialMessage

    So you can search for multiple attributes to narrow down the result?

    I guess if using nested tags is similar to using folders then using attributes and ids is similar to a search function?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • The reason to use IDs is to uniquely identify each of the dialogue. So if you want a particular dialogue, you can retrieve it using its ID, whatever its index is in the parent node, and wherever it is in the document.

    You should always prioritize the use of attributes to distinguish nodes instead of using different tag names. The structure of your XML document will be much more robust and easier to navigate through.

    The tutorials I have seen on here have simply used IDs to number each node, id=1, id=2, Id=3, etc this could be replaced by tag[1].

    I will keep in mind to try and make use of attribute tags though.

  • Kyatric: I'm not sure what it is called exactly but node index seemed logical. Example:

    /bookstore/book[1] Selects the first book element that is the child of the bookstore element.

    For some of the examples I have seen it won't be different at all than using IDs but it can save a lot of work in some cases. A lot of times I have used xml has been for dialogue and intro/story where it is subject to a lot of change but I never have to change any id numbers or anything.

    The reason why I am asking is that not too long ago I knew nothing about xml. So I want to keep learning and figure out if there are better ways. Also, haven't done one before but was thinking about writing a tutorial on it.

    If you want to see some capx: (sorry, they aren't examples, just things I have worked on before, so lots of other stuff in them)

    Chooses random node (between 1 and node count):

    viewtopic.php?f=148&t=170355

    First time using XML, simply changes text every couple of seconds to the next line. Once at end (variable > nodeCount) starts over. I bookmarked the event:

    https://www.dropbox.com/s/fvytszs9v3bup ... .capx?dl=0

    Something I'm working on now, bookmarked a couple of events. Can talk to people and just got it working where npc can ask you a question and have a response for each answer:

    https://www.dropbox.com/s/eschjyoosogyc ... .capx?dl=0

    Take a look at the XML sheets in some of these. The Construct events probably won't vary much from your examples but the XML is more straightforward and easier to read. I was looking at your examples and was having a hard time following the XML. Your way works, so there is nothing wrong with it, and it probably helps other people so great, but I didn't want to change my whole system so figured out how to work it with what I had already.

    Let me know what you think. That is why I am asking, not to be critical but to get your insight.

    Thanks

  • Well i better like the graphics of the big one. But the walking anims looks better on the small one.

    Thanks for the feedback—appreciate it. The first one would be a much smaller sprite than the second one.

  • : I'm not sure what you are talking about (as OP posting date shows, the tutorial is almost a year old now).

    Also, as usual with my tutorials they are examples of implementation only, not absolute truths.

    I know it is a year old but you just fed me a link to it. I'm not trying to be critical—I just feel like the way I mentioned is more efficient and I don't see tutorials use it...

  • Kyatric Is there a reason you used 'ids' instead of using node index?

    All of the XML tutorials I have seen set ids to numbers which is exactly the same as using the node index but makes it completely barbaric when you want to insert a line somewhere (have to update the id numbers after each change).

    Is there a reason for choosing this way? If you are not aware of what I am referring to I can provide an example.

  • Update:

    Check out the progress here:

    https://www.loubagel.com/survive-the-day/

    Previously titled: Which Sprite looks better?

    But changed the title as I already chose the first sprite:

    But still are getting posts (which is fine) so thought I would update.

    Slowly working on more art for this, just did this:

    I might continue to update here every once in a while for those that stumble across this, but probably won't post new comments (at the bottom) as bumping this post is not my intention.

    Thanks everyone

    Original Post:

    Which of these two do you like better?

    I was pretty much an absolute beginner to art a couple months ago. Recently I have been working on this character and have started over several times. Now I can't decide which I like better between the two.

    Can see the full animations here:

    http://www.badmoodtaylor.com/archive/040216/JanitorComparison/index.html

    If you are reading this please at least reply with first/smaller or second/larger (for which one you like better). Any feedback or pointers also appreciated.