DAY 27 PROGRESS
Not too much progress over the last few days. But I did come across some useful things about UNITY I thought I should share for developers.
After adding a bunch of code for Pathing, Fog of War, Enemy Combat, etc, Unity started to slow down to the point of missing mouse and button events. I wrote some code to track FPS min/max. And during heavy code usage, the min FPS was around 30. This only lasts for 1-2 frames then pops back up.
So I stopped adding new things and started optimizing a little.
COROUTINES
I am a noob at Unity and did not feel the need to start MultiThreading the app just yet. But I did want to try using COROUTINES.
COROUTINES give you an ability to do some work in a function, give up control for a frame, then return to do more work. So it spreads heavy calcs out over time. This was very useful in the FOW calculations since I only want to update it once per second or so. Just sprinkle in some YIELD RETURN NULL commands throughout and you are good to go. No more missed clicks or presses.
AUDIO IN UNITY
I also wanted to spend some time getting the audio to play in a 3D mode. UNITY only has one normal 3D command that lets you play a sound in 3D space. However, it rudely sucks ass. Decent for one sound if you dont move. Multiple sounds and moving just created random muted noises and volumes. Horrible.
Luckily I found this guy on YouTube and his tutorials are always fantastic.
This gives you great control and management of sounds but only in 2D. Which is all I am shooting for at this point. Just a couple distance checks and I can set volume and pan of sounds with no glitching or warbling.
Good enough for me.
Profile of Rosbone
General Information
Register Time: 26 Aug 2017, 18:38 PM
Last Visit Time: Yesterday, 06:53 AM
Broadcast: https://www.twitch.tv/Rosbone_Mako
Steam: 76561198351782810
Residence:
United States
Timezone: America/New_York
Register Time: 26 Aug 2017, 18:38 PM
Last Visit Time: Yesterday, 06:53 AM
Broadcast: https://www.twitch.tv/Rosbone_Mako
Steam: 76561198351782810
Residence:
United StatesTimezone: America/New_York
Livestreams
|
|
|
82 | ||
|
|
|
1 | ||
|
|
|
166 | ||
|
|
|
13 | ||
|
|
|
4 |
Ladders Top 10
-
#Steam AliasWL%Streak
- 1.816139.854+4
- 2.47169.872+6
- 3.902305.747+2
- 4.244100.709+1
- 5.408214.656+3
- 6.347136.718-1
- 7.371195.655+1
- 8.742449.623+3
- 9.403289.582+1
- 10.12857.692+8
Replay highlight
VS
-
cblanco ★ -
보드카 중대
-
VonManteuffel -
Heartless Jäger
Einhoven Country
Honor it
16
Download
2749
Board Info
795 users are online:
1 member and 794 guests
mochavietnamtn
mochavietnamtn
2 posts in the last 24h
7 posts in the last week
20 posts in the last month
7 posts in the last week
20 posts in the last month
Registered members: 64390
Welcome our newest member, mochavietnamtn
Most online: 4501 users on 26 Oct 2025, 01:00 AM
Welcome our newest member, mochavietnamtn
Most online: 4501 users on 26 Oct 2025, 01:00 AM


