Hutto's Forum Posts

  • about interacting with instances, a quick fix is to create a variable (different value in each object) and start the conditions checking for that one... similar to object's ID but I never trusted IDs

    I can't remember the exact scenario, but it involved wanting to pass data from one instance to a second instance, so I needed a reliable way to reference each of them in the same action. Doing it as Sprite.value and Family.value did the trick after I picked one with a sprite condition and the other as a family condition.

    As for the arrays, I have them in a container with a sprite so it just makes more sense to me have a way to transfer this information when switching layouts, although I suppose I could make everything in the container global and do it that way.

  • Yes, version control works exactly as you describe. There is a central location that has the complete project repository. Each collaborator has a local repository on their personal computers. They make changes and save them to their local repository. Then they can make a push (or sometimes called a commit) to the primary repository. All the other collaborative developers can then update their individual local repository with the latest information from the primary repository so that everyone is in sync. Each push is tracked so you can see what files changed and who changed them, and administrators can even undo them if necessary. Plus a lot of other stuff that is very cool.

    It is a wonderful system used by tech companies everywhere. There's no need for Scirra to try and reinvent the wheel.

    You may find GitHub for Windows to be a nice introduction to the process: youtube.com/watch

  • I have some globals that were showing up in unwanted places on other layouts. I noticed they were all on the 0 layer, so I created a new bottom layer called "Limbo" and made it invisible. Now when I switch layouts I don't have to worry about the globals showing up in places they shouldn't, and I can grab the ones from "Limbo" as needed. It's a pretty simple fix.

  • Here are some things that gave me trouble that I have figured out:

    • How to transfer lots of player information from one layout to the next

    (found a forum post suggesting saving the arrays to Webstorage and loading it on the next screen and I went with that)

    • How to interact with two different instances of the same object

    (found a forum post talking about using families and reference Sprite.X and Family.X and it worked for me)

    • How to stretch a background image to remain in proportion yet cover the background when using scale inner or scale outer of a variety of resolutions even when they are resized (like switching a mobile device from portrait to landscape).
    • Differences between windowheight and ViewportTop/Bottom, Y and AbosluteY.
    • How to anchor in the center of a vertical or horizontal side of the screen.

    That's all I can think of right now.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Happens every time I do those steps. Hardware must be a factor.

    Thanks for the reply.

  • <img src="http://i.imgur.com/EgFS5JV.png" border="0" />

  • Link to .capx file (required!):

    dl.dropboxusercontent.com/u/12155894/MalformedButtons.capx

    Steps to reproduce:

    1. Start new project.

    2. Add Text object.

    3. Add any event.

    4. Add action Text->Append Text

    5. Insert very large text. 5 paragraphs from lipsum.com works fine. Hit Enter.

    Observed result:

    Dialog boxes through the C2 application are messed up. Sometimes appearing in odd positions, but more importantly the buttons are in weird places and sometimes don't always show up completely. They still work fine though.

    Expected result:

    Dialog boxes to function as usual.

    Browsers affected:

    N/A

    Operating system & service pack:

    Vista Ultimate SP1

    Construct 2 version:

    r139 (32-bit)

  • Ethan, is the final verdict that this plugin works?

  • <img src="smileys/smiley20.gif" border="0" align="middle" /> I'm following!

    This looks like an ambitious project. If you are able to pull it off, so that client/servers can be easily written in C2, then it will be quite the achievement. I don't think any other engine out there can do that. If I can help in some way, let me know. I'm a programmer, but I have little experience in the way of networking. Or specific to gaming for that matter. So not sure how much help I can be.

  • Ashley

    This info was really helpful! I was trying to generate a forest this morning and my recursion was off a bit and it made a massive forest which got choppy on my modest laptop when I tried to move. I did a bunch of these optimizations and it was able to easily handle the massive forest.

    For some reason I was thinking the tick was every 0.16 seconds and going to 0.5 would only lessen it by ~3 instead of ~30. Thanks again for the help.

  • I was reading this blog post about not wasting time optimizing unnecessary things when I came across this:

      There are only a few select cases where the game logic takes longer than rendering and determines the framerate. These cases are usually obvious and easy to optimise as well:
      • Checking for collisions between too many objects. If you test for overlap between instances of an object with 100 instances, there are thousands of combinations of pairs of instances that Construct 2 has to check every tick, which can total over half a million collision checks per second. You can either check on a timer, e.g. every second instead of every tick, or simply reduce the object count again.

    What are some faster alternatives to collision detection? Let's say I have an RTS type game where the player and dozens of NPCS can harvest from hundreds of nodes (trees and mines). Right now I use collision detection to determine when to initiate the harvesting function. I'm worried this will bog down the game when there are a lot more instances around. Checking for overlap every second seems like it might cause the objects to miss being detected. Maybe a smaller increment, like 0.5. That might not be enough to speed it up. Does the collision detection for the Solid behavior also have this limitation?

    If the overlap timer doesn't work out, the only solution I can think of would be to break it up into smaller zones. Any other ideas out there?

  • Hey, thanks for the info. I didn't realize Eminet wouldn't work with the browser.

    I did find two games that have been made with WebRTC, so I think this approach is feasible. Of course for me the big hurdle is always time and motivation, so I have reworked the game to not require a fast connection. I'm also putting multiplayer support aside and just focusing on making a single player aspect of the game. After I get something that is playable, I'll request feedback and see if the concept is worth trying to make multiplayer.

    I'm still not clear about if it is possible to modify C2's logic code to use it as a server, but guess I don't have to worry about that right now.

  • Hello, new user of Construct 2 here.

    My background is programming, but not game programming nor networking. So far I really like how easy it is to use Construct 2 to put together games. Love that it also has things like dictionary objects, arrays, and functions. I think it is going to be very easy for me to make the core gameplay mechanics using Construct 2.

    Having said that, I would ideally like to make the game multiplayer (doesn't every newbie?) and have some questions centered around that. Would be great if someone could help out and point me in the right direction.

    1. I have the idea of there being a global variable isServer in C2. This is mostly so the game mechanics and logic can all be in the same place, and will control how messages are sent back and forth. For example, if an input message comes in and this is the server, it will execute it and return the results. If an input message comes in and it isn't the server, it will just execute it. Things like that. Then I will include with the server version an additional file that contains server only logic (networking and whatnot) and sets the global variable to true. Or I can just manually set it on after I export it. While I realize this isn't the ideal solution, it should let me keep the code together and create it within C2. Are there any potential problems with this approach?

    2.a. UDP for HTML5? The game doesn't have to require instant messaging, but certain core parts would have to be reworked to better fit with a TCP solution and it would be a little less fun in the end, in my humble opinion. I see that WebSocket is included out of the box, but has anyone got a UDP solution up and running, or something similar? I saw JohnnySheffield did one that required Node-Webkit and wasn't HTML5. HTML5 is more important to us than UDP. Does anyone have thoughts on this: EmiNet. It seems good to me, but I don't know enough about this type of thing to really tell.

    2.b. I see some posts about WebRTC, and combining that with node.js. I realize this would require changing the server logic some since there would be broadcasts going P2P in addition to going through a server. Any thoughts on the feasibility (and challenge) of doing something like this? I understand computers and programming, but am worried I'm missing something when it comes to networking protocols, servers, and the like.

    That's all I've got for now. Love the tutorials and how easy it was to jump right in! Thanks everyone!