In Unity, I want to trigger an event when an audio clip finishes playing. Would it be more CPU efficient to keep checking if the audio clip is playing with WaitUntil(() => audioSource.isPlaying == false); or would it be more efficient to use:WaitForSeconds(audioClip.length); How can I run a test in Unity to see which one is more CPU efficient? … [Read more...] about Is it more efficient detect when audio clip ends with AudioSource.isPlaying or with AudioClip.length?
I have developed a turn based game using android studio.I want to add local multiplayer feature to it. Don't need a detailed explanation, a little bit of idea would be very helpful. I saw the code of bluetooth chat application. In that code, only two devices can communicate with one another. But my game has to be played with four players and I can't figure out a way to connect and communicate among four devices. … [Read more...] about How to add local multiplayer feature in a game using bluetooth?
I am an electronic undergraduate and none of my friends even in CS have idea how to become an independent game Dev or even work as a product engg./game Dev in a mobile based gaming startup.Sure they know full stack mobile app development is one part(on mobile),also working on some engine like Unity etc, but nothing more.Any idea what things are important and also some advice to non CS background guys on how to start? … [Read more...] about How to learn game development?(PC and Mobile)
I am trying to create a world boss system using PHP. But I am having a problem with how to account for all the damage while updating the health of the boss in real-time. The current damage process is as follows: Get boss' current HP from database. Reduce the HP based on the calculated damage. Update the boss' HP to database. Example: Player 1 (P1) attacks the boss. Calculated damage is 10. The boss' current HP is saved to variable $boss_hp which is 100. It will now be $boss_hp -= 10. Which is 90. The boss' HP in database is then updated. Now, imagine two player attack the boss simultaneously... P1 attacks the boss. Calculated damage is 10. The boss' current HP is saved to variable $boss_hp which is 100. It will now be $boss_hp -= 10. Which is 90. Before P1 updates the boss_hp in database, P2 also damages the boss. P2 saved the boss' current HP to his/her own $boss_hp variable which is 100 at the moment. P2 also performs step 2. $boss_hp -= 10. Which is also 90. P1 now updates the … [Read more...] about World Boss System in Web Browser MMO using PHP
I built my Unity project with WebGL. After load the resources, I can hear the music and player sounds(movements etc), but it just display black screen only. I found some similar situation in google, but couldn't find the way to fix. Here's the console result: https://drive.google.com/open?id=14Uhd6SBbDHdPN39TurY9H7QPGhPLfb_X Used Unity 2018.2.1f1, tested with Chrome 73.0.3683.86. … [Read more...] about Unity WebGL player just shows black screen