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,786
  • Joined

  • Last visited

  • Days Won

    147

Posts posted by geckoo


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


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

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


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

     


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


  6. I can only say that if you see magenta color, it means that your material shader has an error.

    If you click on this shader in the inspector, you can see where is the bug - the line which generates an error.

    Sometimes Unity changes its semantic - and we have to modify code ++


  7. Hello friends.

    I am trying to find a way to create an array with many arrays using integers. As example I have :

     

    int sequence1[ ] = new int[ ] {1, 2, 3, 4, 5};

    int sequence2[ ] = new int[ ] {6, 7, 8, 9, 10};

    int sequence3[ ] = new int[ ] {11, 12, 13, 14, 15};

    etc.

    I want something like this main principle (but in one line if it is possible) :

    int allSequences[ ] [ ];

    allSequences[0] [ ]= sequence1;

    allSequences[1] [ ]= sequence2;

    allSequences[2] [ ]= sequence3;

     

    so allSequences[1][3] is 9, allSequences[2][2] is 13, etc.

     

    I would like to create only one array with all these arrays, but I tried many ways - and it doesn't work because I cannot find the right semantic.

    It became a little bit confusing for me. Do you have an idea? Thank you ++


  8. Hello everyone. Today I want to write a last post in this section so as to explain how grab free games on web - of course, legally :)

    I posted so many messages here when I noticed on different sharing platforms a game for free. I think that today it became a way to gather players around a new company - like EpicGames Store which is trying, offering a new game each two weeks, to increase its audience. Why not? A free game is not a bad thing. There is a site on web which lists all these offers - this is IsThereAnyDeal. You can find the best platform for games, considering the best price, some informations - and where are given some free games (giveaway). Take a look at the link below. I hope that it will be useful for players :

     

    Please login or register to see this link.

     

    So be careful, often taking a look at this main page (the board at the top - cyan color references) because I will not write anymore something about free games as of today.

    Have a nice day ++


  9. Tacoma for free on Humble Bundle :

    Please login or register to see this link.

    Oxenfree on EpicGames Store :

    Please login or register to see this link.

    • Like 1

  10. Work with colliders, raycast and tag. It seems to me that in the UA FPS kit, you have some clear explainations how to climb, jump, slide player, etc.

    You could find a first help taking a look at this package. I wish you the best ++


  11. A few years ago I did a package which was available on Unity Asset Store for one buck.

    Now it is released for free - a good stuff for beginners. It uses the old canvas system GUI, also Please login or register to see this link. ++

    Please login or register to see this link.


  12. Well. I tested a few years ago FPS creator, but respectfully I had disliked it - too slow, not optimized, not really efficient...
    I hope that this one is well done - more than their previous tool ++

    • Like 1

  13. Unity - I cannot imagine me working on another game engine. I spent so many time so as to master Unity code - I don't want to restart now a new learning process. However there is a new way to create a solid project - GameGuru. For a few hours the main application is free on Steam, but you have to buy asets and packages on the same platform. Take a look at this link below. Personally I want to test it ++

    Please login or register to see this link.


  14. Please login or register to see this quote.

    Actually I am working on a game which integrates many coroutines. For this reason I tested different ways so as to reduce ressource wasting. When you use Unity's default coroutines you will have to be very careful about how you use them or else they will allocate memory that the garbage collector later has to clean up. So  I assume that your explaination is good. However testing different ways I noticed that the best way to use coroutines is this one - MEC (free version) :

    Please login or register to see this link.

    Easy and intuitive I saved many resources - and now I don't use anymore the classical Unity coroutine process...

    If you want to optimize your project I recommend it ++


  15. Your request is not really clear. At first, do you want to use a procedural generation ? I guess - because you want to test a path. I could do this way (but I assume that another way could be better) : create a 4x4 tiles board using some simple loops. Add each tile in a list. Select randomly a few of them as an obstacle or mines. You can check, using booleans, a free way starting from your goal to the base. If a tile is free, check if this new tile has a free way (...) until your base. If there is no more free tile, return on your previous true boolean, trying to find another way - a second eventually free tile...

     

    Closing my explanation, I would like to say that if you have less than four mines (3 max), you have always a free path - excepted if they are around your base and if it is in a corner. Again, because of a lack of explanation, I guess that you can move your player in a diagonal ++

×
×
  • Create New...