zatyka's Forum Posts

  • The first part can be accomplished by using loops. Based on your request, I'm guessing you're not familiar with loops. They are one of the building blocks of programming, so it's a very good idea to learn how to use them effectively. This tutorial is a good introduction to loops and arrays:

    Basic Loops and Arrays

    Once you're familiar with how loops work, check out this Capx.

  • scott7788 DatapawWolf

    I may not be completely understanding the movement model your looking for, but it sounds like you can accomplish it with some minor modifications to the car behavior.

    Capx

  • Yes, turn-based online multiplayer is possible in C2 using the websocket or Ajax object.   There are also a few 3rd party plugins for multiplayer, but I haven't done much experimentation with them. I created an online multiplayer card game using ajax requests, a php server, and a mySQL database. Here's the topic I posted about it. If you scroll to the bottom, there's an explanation of how the multiplayer works.

  • This has been happening in C2 for quite a while. I've had a long-standing bug report that is still open. Depending on your reason for resizing the canvas, you may be able to get away with using a centered i-frame to display the canvas from another webpage.

  • I really enjoy participating in game jams, and as I said in my previous post, I'd almost definitely participate if Scirra were to run it, but I'll probably pass on this based on how it's is shaping up. There are 2 main reasons why.

    Game Limitations

    I think the drawbacks far outweigh the benefits of limiting the events and layers. I understand that this is meant to even the playing field so that participants with a paid C2 license don't have an advantage, but is severely limits the complexity of a game. Also, I'm guessing it will pigeonhole participants into using behaviors. For example, with a 100 event limit, you could make a decent platformer because there are behaviors that replace having to use events, but you'd have a hard time creating a point and click adventure game, or really any game that doesn't have corresponding behaviors that do a lot of the work for you.

    The Judging

    I'm not a fan of the entries being judged by a handful of arbitrarily selected people. I don't mean this to be a jab at you or the judges you select, but with so few judges, the results will be weighted towards their personal preference as to what constitutes a "good" game. I think letting the participants rate the submissions is a far better idea.

    I'm hoping that Scirra puts together a C2 game jam at some point. I'm sure they come up with a very well thought-out method to running the event. A lot of the submission and voting could probably be handled through the sexy new arcade. I'm guessing there would be a good number of participants, especially if they made a blog post and/or pinned topic in the forum.

    That's my 2 cents anyway. Best of luck running the event, and to all the participants. I look forward to seeing the end results!

  • Here's a way to do it using events:

    Demo

    Capx

    There isn't a scroll bar (though there is scrolling), but it wouldn't be too hard to add one to the example.

  • If Scirra were to run a C2 game jam, I would definitely participate.

  • Results are in! Congratulations to everyone who participated. Only ~3 more months until LD28.

  • There are multiple ways to do this. Here is one way:

    For each XY Element

       (

       Set Value at (Array.CurX, Array.CurY) to (Array.CurY * Array.Width + Array.CurX)

       )

  • ghost

    I didn't find any solution, but I did work around the problem by displaying my canvas in a centered iframe rather than putting the canvas directly on the page. However, that only worked because I needed to change canvas sizes for a single tick to grab a screenshot of a specific size. After I took the screenshot, I would return the canvas size to normal (the size of the iframe). This method would not work well in most cases, especially when changing the canvas size is integral to gameplay.

  • You must make the speed in which mover sprite change angles proportional to the speed the mover is traveling. Change event 4 to something like:

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

    and it should be much closer to what you're looking for. It probably won't be perfect due to minor fluctuations in DT, but it's pretty close.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • The "All preloads complete" condition is not a trigger, so after preloaded are complete, that condition is met every tick. Adding a "trigger once" condition should fix the immediate issue.

  • cvp

    Sure, lets start with the server. All the game logic (e.g. shuffling the deck, determining who wins, adjusting scores, etc) is scripted using PHP . When a player makes a decision that changes the status of the game, such as passing his/her turn, or playing a hand, the data is sent via ajax request. The ajax identifies the table number, the seat number that made the change, the type of change, and what the actual change is. Based on that info, the PHP program updates the game info on my server. The PHP script is quite large as it covers every possible process in the game. I think it ended up being around 500 lines of code.

    Now for the client. Every second, the client sends an ajax request to a php page that pulls the game's current info from the server using a SQL query. Based on the data, the client updates whose turn it is, what cards have been played, current scores, etc.

    This SQL table contains ALL the important game info. The only data saved on the clients local machine is relevant to presenting data from the server.

    The process of sitting at a table, and playing a round goes something like this:

    1. A player signs in with their name, which is temporarily saved client-side
    2. The player goes to the lobby, and an ajax request pulls the current players at each table.
    3. When the player joins an empty seat at a table, ajax sends the username to the server to update the table occupants.
    4. When the 3rd person joins the table, the php program runs to shuffle the deck, randomly assign deal, and other game-setup processes, and the appropriate data is saved on the server.
    5. The client sees that a new hand has been dealt based on changes in the gamedata pulled from the server.
    6. If it's your turn, you will be given options for playing a hand, passing, and other things you can to do affect the game.
    7. Once you've made your turn, an ajax request pushes the changes to the php program that updates the appropriate game data on the server.
    8. The next player plays their turn... which again updates the appropriate data using an ajax request to a php program.
    9. The same process of someone playing their turn, and updating the server continues until the program realizes that one player doesn't have any cards.
    10. The round ends, the program adjusts the scores, and then restarts the process by shuffling the deck, and assigning the first turn, etc.

    This method works quite nicely since Triad is a turn based game. Ajax requests would not be suitable to active multiplayer games.

    I hope this helps.

  • I played/rated/commented on all the games here, and the LD games in the "Your Creations" forum. Nice job everyone. C2 is really a great tool for game jams.

  • In case you couldn't tell from this topic, I'm a big fan of the Ludum Dare events. For LD27, I ultimately decided to create a narrative driven game using a point and click interface. Here's what I ended up with:

    <font size="5"><center>The Ones You Love</center></font>

    <center></center>

    The Ones You Love is about reliving 10 second moments throughout the course of a day, and how your actions in the past can affect the future. Controls are simple. "M" toggles music on and off. The mouse does the rest. Click to interact with people and objects.

    I hope you enjoy the game. I'd love to hear what you thought of it.

    <center>Play It</center><center>Rate It</center>

    Please Note: You must be using a WebGL enabled browser for the game to render correctly.