armedunity.com uses cookies to improve user experience.

By continuing to use this site, you agree to allow us to store cookies on your computer.

# geckoo

Moderators

2,824

161

1. ## How to add melee for FPS Kit 1.6

What do a difference between a shoot and a melee attack? Maybe the distance. There is the same mechanic - excepted that your raycasthit go ahead, but not too far. However personally I prefer to use a OverlapSphere. Create a position a little bit beyond player and set a radius. If an enemy is inside the sphere, you hit it. This way you can simulate a swipe movement ++ https://docs.unity3d.com/ScriptReference/Physics.OverlapSphere.html
2. ## Thermals?

You can change enemies material as a local feature : Take a look at isLocalPlayer ++ https://docs.unity3d.com/2017.4/Documentation/ScriptReference/Networking.NetworkBehaviour-isLocalPlayer.html
3. ## Prime Numbers

My understanding of code doesn't mean that it's always for a game. But in the same time, I remember a game in which you have to escape using doors with numbers - only prime numbers guarantee safe rooms - others are traps This game is called Bryan Audley's Numbers - it's not a really good game, but its mechanics are interesting. Also the main gameplay of this game reminds a great movie - Cube which I highly recommend ++
4. ## Prime Numbers

Yesterday I saw a disturbing video about prime numbers and their paradoxes. Then just for fun I decided to code a script so as to generate an infinite list with prime numbers. This script below shows as debug messages some prime numbers, starting from 1 until ... how many time you can wait using System.Collections; using UnityEngine; public class PrimeNumbers : MonoBehaviour { int n = 2; bool IsPrime(int number) { // remainder operator if (number % 2 == 0) return false; for (int i = 3; i <= Mathf.Sqrt(number); i += 2) if (number % i == 0) return false; return true; } private void Start() { Debug.Log(2); // this is our first prime number StartCoroutine(checkInteger()); } IEnumerator checkInteger() { if (IsPrime(n) == true) Debug.Log(n); yield return null; n++; StartCoroutine(checkInteger()); } }
5. ## Thermals?

Do you meant something like in CoD:MW - a kind of thermal cam (enemies are white and world around gray) ? This one could be interesting : https://assetstore.unity.com/packages/vfx/shaders/fullscreen-camera-effects/thermal-vision-free-56092 And you coul change enemies material for a simple Unlit white shader ++
6. ## STR!PES

STR!PES is my entry for the 44th LudumDare. This is a procedural game. In my project there is only code - some procedural generation for shapes and stripes - no sprite, no prefab, no physics, no implicite value (excepted a radius PI). I optimized each part of code so as to reach the lowest execution using a simple (but efficient) pooling system and an improved implementation of coroutine. Also I use a leaderboard on-line so as to save best scores. Take a look at the video below. STR!PES is available for free on Itch.io ++
7. ## 44th LudumDare

This is the end of the 44th LD. I did a SuperHexagon clone - all is displayed using procedural generation, pooling system and an improved implementation of coroutines ++ https://ldjam.com/events/ludum-dare/44/strpes

What is a sandstorm FX? Do you have an example to show us?
9. ## ACOG Sight. (Textured) DIF + NRM + SPEC

+1 Maybe because it has been shared here almost 6 years ago? Sérieux mon ami (et très respectueusement) tu gagnes le prix du déterrement de vieux messages. Bravo ++
10. ## Latence after execution

Hello. I have a little question which is not a problem or a bug - just a misunderstanding. When I execute my latest project in the inspector, when it finishes, I have to wait a few seconds (maybe 10 or a little bit more) before I can work again on code, values in inspector, etc. I don't understand why there is this latence - like if Unity has to clean memory or something else before to be available. My project is entirelly procedural (no sprite, no prefab, no defined material or something else) with more or less 3000 lines of code - no warning no error - and it works really good using just a few batches (less than 30), CPU main - 13/16ms maximum and a high FPS. As an executable under Windows, there is no latence. Have you an explaination? Thank you for your help ++
11. ## 44th LudumDare

As usual, just a few words to say that soon starts the next Ludumdare session. If you dare, accept the challenge - create a game in less than 72 hours. according a chosen theme. If you want to participate, share here a link and this way I can take a look at your project. I will evaluate it with pleasure. I am in ++
12. ## The Return: Survival (Unity Game)

Impressive graphics. Gameplay seems really intense ++
13. ## Mathf.PI

Thank you for your answer. Do you mean that each float number use the same 32-bit system? 3.14f and 3.14159265359f have no difference for CPU ressource?
14. ## Mathf.PI

Hello friends. I have a question about Mathf.PI - The infamous 3.14159265358979 as said Unity main page information : https://docs.unity3d.com/2017.3/Documentation/ScriptReference/Mathf.PI.html I read somewhere that using long float numbers wastes some CPU ressources. I don't know if it is a bullshit or a fact which has been proved. In my project which is essentially a procedural shapes generation I use often Mathf.PI - an infinite float number. Do you think that I have to change it for something shorter like 3.14 or there is no real incidence? Thank you for your advice. I really appreciate it. Have a nice weekend ++
15. ## free FREE Black hole shader and other effects

Nice. I know that an extrem fisheye allows to create a similar effect. Yours is good ++
16. ## A dog?

Maybe it's a joke for the first day of April - or this is a real feature under Unity. I don't know There is a dog as a primitive prefab : https://docs.unity3d.com/Manual/PrimitiveObjects.html#Dog Take a look at the script below ++
17. ## Broken car project

Contact author
18. ## Array of arrays

Don't be sorry boy. As I said you really helped me - and I have to do the work ++
19. ## Array of arrays

I tested you code today and it doesn't work as expected because there is a little mistake. You used the same lenght for all arrays (even the main). allSequences.Lenght is not allSequences[sq].Lenght - for each sub arrays... However you helped me so as to enlighten this part. Thank you ++
20. ## Array of arrays

Ok. Thank you for your explaination. I have no time today - I will test it tomorow ++
21. ## Array of arrays

Hello. I need to create a double loop - one for each segment, reading each integer inside them. [0] [0] do something (checking lenght) [0] [1] do something (checking lenght) [0] [2] do something (checking lenght) [0] [3] do something (checking lenght) - it read all integers [1] [0] do something (checking lenght) [1] [1] do something (checking lenght) [1] [2] do something (checking lenght) [1] [3] do something (checking lenght) - it read all integers [2] [0] do something (checking lenght) ... etc etc - until it read all sequences To do simple, I want to read all sequences as a single line, starting at [0][0] to [3][3]. I don't understand how I can increment for each array(s) its index. Thank you ++
22. ## Alien Ant World: Recruiting

Are they animated? Are you using mecanim? T-Stance position is required ++
23. ## Array of arrays

Again me. This part of code is driving me crazy. I didn't understand something and I cannot find any efficient answer on Unity forums. I did : int[] seq0 = new int[] { 1, 2, 3, 4 }; int[] seq1 = new int[] { 5, 6, 7, 8 }; int[] seq2 = new int[] { 1, 3, 2, 1 }; int[] seq3 = new int[] { 5, 4, 3, 2 }; int[][] allSequences = new int[][] {}; allSequences = new int[][] { seq0, seq1, seq2, seq3 }; So I have all sequences in a unique array of arrays, but I would like to read all segments in a loop - the first seq0, when it is over the second (seq1), then the third (seq2), etc - but sometimes they have a different sizes - so I use their lenght as limit. I am stucking on this part of code. Really a help will be very appreciated. Thank you my friends ++
24. ## Array of arrays

It's basic - when you know the semantic. Thank you ++ I prefer this one - thank you for your help. I really appreciate ++
25. ## The Future of Unity!

×
×
• Create New...