cjbruce's Recent Forum Activity

  • Interesting. A javascript-> php interpreter?

    What it is that you are looking to do with php? The language is pretty simple to learn to get the basic functionality working.

  • Do you know news about the existence of any of these plugins or any other web technology-based plugin?

    I'm not sure what you mean by a php "plugin". php is a server-side scripting language that has nothing to do with the device that the Construct project is on.

    Maybe you are referring to the AJAX plugin that can be used to communicate with a server running php? The AJAX plugin works great, and I have used it in many projects to communicate with a php server.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Ok, so here's my basic idea for a game and I'm trying to decide if it'll work in C2/3 or if I need to slog through Unity.

    The game is basically going to be a moba. There will be a login/matchmaking server. Once a client readies up for a game and the matchmaker finds players it will create and start a game server. Clients are then transferred from the login server to the game server. Once a match has ended the clients are transferred back to the login server and the game server shuts down freeing resources (think LoL or Dota2). I definitely don't want this to be a p2p multiplayer. I want it server controlled.

    I think I know how this can be done using C2 with Ajax, PHP and MySQL. What I'd like to hear is how you'd approach this type of configuration using C2/3. In particular, how you'd handle the game server. Would you do an NW.js export and just have PHP copy and run the game server or ????

    Thanks

    A LoL/DOTA-style MOBA or RTS is pretty ambitious using these technologies. I think you are going to run into two major issues:

    Message rate limitations: In my experience, trying to send more than a few messages per second to a php/MySQL server will quickly overwhelm your server, as it has to receive the message and read/write to the hard disk synchronously every time. In something like LoL or a traditional RTS, each player might clicking several times a second, and each of these might generate a message to the server, quickly overwhelming it. This is just for a single game. If you have 10 games going on simultaneously, each game might require its own server, quickly driving your costs through the roof.

    Lack of an integer data type: Because of the large number of units involved, MOBAs and RTS games don't try to send the entire game state over the network. This would require gigabytes of data every second. Instead, they only send player inputs, and each computer is responsible for computing the results of all of the inputs. This requires a deterministic computation. To do this, you really need to be using integers instead of floating point numbers. Because it runs in a browser, you don't have direct access to integer data types in Construct, and this will introduce errors and inconsistencies between different player's computer's versions of the game.

  • Yes, I have done several versions of quizzing apps for students over the years in C2.

  • This sounds like a classic game audio question. I think the answer might be to get a clip of automatic weapons fire and use it instead of just a single gunshot sound. The brain is forgiving in that the sound doesn’t have to be perfectly in sync with the visuals, just as long as it is close.

  • Also, check the collision box of your grass. You might have to bring it down a little so the character doesn’t stand on the tips.

    Or, better yet, use an invisible solid box for your collision object, then position the grass over the top of it.

  • I think it might be worth noting that Doppler Effect can’t possibly tell you anything about the distance to an object, only the speed at which it is getting closer or farther. What you might want instead is something much simpler, the loudness of the sound, which is related to distance, and is very easy to adjust programmatically.

    Sorry, the physics teacher in me couldn’t resist.

  • It is a pain, but you will need a way to “zero pad” to the right to make sure everything gets carried out to the cent. I typically create a function for this type of thing.

    1. Use the floor function to get the whole number part.

    2. Concatenate a “.” to the string.

    3. Multiply by 100 and use the modulo operator %100 to get the decimal part.

    4. Concatenate the decimal part to the string.

  • nope just a 3d really vbasic paint app, not so advanced, just something to paitn on a 3d surface without bum,s no pbr etc

    I'm thinking that the following would require some three.js work:

    1. Setting triangle vertex colors so that you could get color gradations across a surface.

    2. Assigning UV values to a texture for each triangle so that you could get basic diffuse color texture maps onto a surface.

    3. Wrapping a texture around a surface. This one gets really complicated, as you have to figure out how to UV map the texture based on projections.

    Creating a 3D paint program with textures is significantly more complicated than creating a 2D paint program. It took me about 2 hours to cobble together a basic 2D paint program in C2. Most of this time was spent on creating the UI. I anticipate that it would take me about 200 hours to get a very basic 3D version working, and I have already spent probably 50 hours studying and watching videos how to do this.

  • 12thmix

    Based on the image you posted, it looks like you are ordering the array, but aren't doing anything to update the visuals for more than just the first row.

    In the event shown, you are setting only the first instance of Text and the first instance of Text2. In order to update a whole list, you will somehow need to iterate through each array element and create or update an instance of Text and an instance of Text2 for each row.

  • It didn't work when i tried to sort it for some reason

    Can you post a copy of the events you are using?

  • Containers work well for this. Since the name and score texts should always appear together, you can put them in a container so that they are created, picked, and destroyed together. You can then position the name text, and then position the score text object 200 pixels to the right of the bame text.

cjbruce's avatar

cjbruce

Early Adopter

Member since 25 Apr, 2013

Twitter
cjbruce has 4 followers

Connect with cjbruce

Trophy Case

  • 11-Year Club
  • Forum Contributor Made 100 posts in the forums
  • x3
    Coach One of your tutorials has over 1,000 readers
  • Educator One of your tutorials has over 10,000 readers
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

17/44
How to earn trophies