Jump to content
This site uses cookies! Learn More

This site uses cookies!

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
  • Content Count

    2,801
  • Joined

  • Last visited

  • Days Won

    151

Posts posted by geckoo


  1. 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 ++

     

    Please login or register to see this link.

    • Like 1

  2. You can change enemies material as a local feature :

    Take a look at isLocalPlayer ++

    Please login or register to see this link.

     


  3. Please login or register to see this quote.

    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 ++

     

     

    • Like 1

  4. 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 :)

     

     

    Please login or register to see this code.

     

    • Like 1

  5. 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 :

    Please login or register to see this link.

     

    And you coul change enemies material for a simple Unlit white shader ++


  6. 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 ++

     

     

     

    • Like 2

  7. 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 ++

    Please login or register to see this link.

    • Like 2

  8. 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 ++


  9. 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 ++

    • Like 2

  10. 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?


  11. Hello friends. I have a question about Mathf.PI - The infamous 3.14159265358979 as said Unity main page information :

    Please login or register to see this link.

    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 ++


  12. 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 :

    Please login or register to see this link.

    Take a look at the script below ++

    • Like 1

  13. 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 ++


  14. 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 ++

     


  15. 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 ++

×
×
  • Create New...