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

  • Last visited

  • Days Won

    155

Posts posted by geckoo


  1. Hi Reaperkan. I hope that all is fine for you :)

    We live another era on forum - just a few people share their scripts, an opinion or something else.

    You can find always some questions or request so as to "add multiplayer to FPSkit", but nothing more.

    In other words, we die - slowly but surely. It's a pity ++


  2. Hello friends. Just a few words so as to share with you a recent experience. Working on my project Please login or register to see this link. , I updated my Unity version to 2019.1 expecting some minor changes - as usual, it's always a little bit disturbing to update Unity for a newer version because sometimes old projects are broken or don't work correctly anymore. A little bit anxious I launched STR!PES on my new Unity version (I used Unity 2018.2 before) - and I noticed more or less 70 errors. I erased all previous log files, keeping only Assets folder with scripts, sounds, shaders, etc. After a project reconfiguration, all works fine as expected, but...
    Previously my project was good - oscillating between 25/45 batches. Now it stays constant - exactly 17 batches during all process and main execution is really really more smooth. With naked eye I notice a real improvement. I tried searching some explaination, willing to understand what it means, but I don't understand all features which have been added in newer Unity version. Now I am checking my previous projects (abaddon, theorem and more) so as to evaluate them under Unity 2019. I am very surprised by the result - better than I expected. Have you noticed too some improvement with your own projects? Have a nice day (like me today) ++


  3. A simple script so as to test the previous :

     

    SimplePoolSystem.PreLoadInstances to fill pool,

    SimplePoolSystem.GetInstance to activate an object,

    SimplePoolSystem.StoreInstance to store it for a next use ++

     

    Please login or register to see this code.

  4. Creating objects, usually we instantiate them. Then we can destroy them after use. However it requires some resource and when many instantiated objects must be created, there is an acceptable limit before lag. To avoid wasted resource, it is recommended to use a pooling sustem which preloads those objects, setting them active and storing them for a new use. This way, we limit objects in scene, using always the same (but you have to reset them) ++

     

    Please login or register to see this code.
    • Like 1

  5. Displaying a text on screen, usually we create a canvas as UI and it works very well on Unity. However I wanted to code a script which could apply a text or a value as a sprite - in other words, I tried to create an alternative UI, setting some features, creating my own font, etc. As an example, the basical code below allows to display time.deltaTime, checking values, applying modification, reading an array of booleans (according an integer) so as to paint some pixels on sprite (5*3). Also it could be used on a weapon so as to show how many bullets are available in the cartridge or maybe for health, and more. Simply put it on a game object. I hope that it will be useful someone ++

     

    Please login or register to see this code.

  6. Thank you Isaak for your interesting answer. I was a little bit disappointed by the first answer which didn't give any solid explanation - excepted a single line. Yours is more detailled and convinced me. I am trying to reach the best optimization coding my project STR!PES on which I am working. Actually it runs using a few batches (between 35/45 maximum) but I continue to find a way to go down. Finally I can reach a really low execution - enough to be playable on a old mobile device. Procedural generation and geometry in games are just fascinating. When the game is really speed with many stripes rushing on the center, I have those values in inspector ++

     

    CPU : main 13.0 ms (at start 11.9)

    render thread 1.7 ms (at start 1.1)

    batches : 43 (at start 25 with an easy level)

     

    I noticed that I totally forgot to talk about game itself - just expanding some explanation about code. At the link below you can find my game STR!PES :)

    Please login or register to see this link.

     

    • Like 1

  7. Often I use this script so as to create a little health code using the old GUI which is not bad. Of course, it's could be better to use Canvas, but it's a good stuff. It displays a thin line with colors according screen resolution - like in my game Please login or register to see this link. (and others). It creates a few textures at start. Also I implemented a couroutine to decrease progressively health and another one if player recover his health (bonus function). You have to call the damage function setting a value and you will see health line decreasing green to red. Only put this script on an object - no more. You can use this script as a timer too - it's the same logical process. I did that so as to answer to a question on our forum. I hope that it will be useful someone ++

     

    Please login or register to see this code.

  8. Interesting question. At first, I would like to say that you have to inform players that your game collects some info during process.

    But in the same time, there is nothing inside these user data - it's like a leaderboard but anonymous. By consequence, I don't know...

    If you take a look at the request from GooglePlay, we read those lines :

     

    Google Play requires developers to provide a valid privacy policy when the app requests or handles sensitive user or device information.

    Your app requests sensitive permissions (e.g. camera, microphone, accounts, contacts, or phone) or user data, but does not include a valid privacy policy (bla bla bla)...

     

    According what I read I think that you have not to include a privacy policy because you are not collecting sensitive user information - only a winner/looser state.

    However, I am not an expert in laws. The best you can do - ask them directly ++

     

    • Thanks 1

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

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

    Take a look at isLocalPlayer ++

    Please login or register to see this link.

     


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

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

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


  14. 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 4
    • Sad 1

  15. 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
×
×
  • Create New...