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.

Leaderboard


Popular Content

Showing content with the highest reputation since 03/23/2017 in all areas

  1. 6 points
    Theorem is an abstract relaxing 3d puzzle game in which you have to roll a cube so as to reach a goal, but one of its faces is forbidden. Each colored tile has its own behavior - you can enable/disable mecanics, teleport yourself on another place, climb up blocks, make use of impossible geometry, etc. This is my latest project which I want to share on Steam/Itch.io/Desura as a casual game for 1 or 2 bucks. Now I need a little help. I would like to share my project with someone just to try the main gameplay. So you could write a brief feedback (just a few lines, playing 15/20 minutes or more). I did 50 levels. Please, if you like solid puzzle games, send me a private message. If you don't like puzzle games, I guess that you will don't like it. Forget it. Thank you ++ https://imgur.com/a/YjRYU
  2. 6 points
    Hello everyone. I'm interested to work for a project that includes modeling and texturing. I can model weapons and props for games. Below is some of my previous work. If interested, contact me https://www.artstation.com/artist/laxman130
  3. 5 points

    Version 1.51f

    6,318 downloads

    I GOT AN ALL NEW KIT OUT HERE: https://sellfy.com/p/QBYx/ Check it out! If you like it or have any questions, just ask or leave a comment! Don't forget rate If you want more, please subscribe! V2 Will include chat and finished mecanim controller. Guys, important Bug Fix!! Replace MainMenu.cs with this: http://pastebin.com/9r6hwPMe and replace FixThings.cs with this: http://pastebin.com/e1UR2mmP The bug: When Client A spawns on server before Client B joins, Player of Client A will be deleted on Client B. That means Client A's player will be "invisible" to Client B, but can still shoot him. Replacing the scripts will solve that. (OcularCash) Edit: Download contains a file that has the link to the mega upload file. The file is verified!
  4. 5 points
    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 ++
  5. 5 points
    this project like GTA -enter car and exit -texture de GTA V -player GTA V "trever" -city not complete -minimap -clothes -puse game + menu
  6. 4 points
    Adds smooth delay and tilt effect to camera when you look around. Q. How to use this script? A. Drop this script on camera and adjust all parameters in Inspector. using UnityEngine; public class CameraTilt : MonoBehaviour { public float smooth = 3.0f; public float tiltAngle = 5.0f; void Update () { float tilt = -Input.GetAxis("Mouse X") * tiltAngle; Quaternion targetRotation = Quaternion.Euler (0f, tilt, tilt); transform.localRotation = Quaternion.Slerp(transform.localRotation, targetRotation, Time.deltaTime * smooth); } }
  7. 4 points
    5 seconds of effort reveal that this is an ip address of the google cloud.
  8. 4 points
    So here the first sneak peak. Done in 1 Day (14 Hours of Work).
  9. 4 points
    After hours of hard work, I have my scene complete. And upon finishing the scene, I was actually... In love with it. Hope you guys enjoy
  10. 4 points
  11. 3 points
    Hi Fellows! Sometimes we use always the same functions or commands in order to code an action or a behavior. These lines are often used in scripts, but it is possible to optimize code. I would like to share some tips here just to start a new section. If you have an useful idea (maybe just one line) and if you want to share it with us, give us a brief explanation and why this alternative is better than the previous. Don't forget that sometimes the simplest things are better than hardest. Best regards ++
  12. 3 points
    hello guys started working on prop/tool pack for selling purpose . pack price would be 10 $ and will contain 32 models or more . this is models i have already finished working on, C&c welcome . For 3d viewer: https://www.artstation.com/nika7586
  13. 3 points
    Hey guys, I'm making a project to waste time, and in this project I'm using ArmedPrefs(made by Erarnitox), but sometimes I just need PlayerPrefs to save things like Resolution, Quality and etc... So I wrote this script to "make it more easier". What are the advantages? 1st - You can load things in two ways now: Ex: DataManager.GetInt("MyInt") Or you can define a "default value" in the final of the function, so if this key do not really exists it will return this value, create and save a new key with the name and the value you used. Ex: DataManager.GetInt("MyInt", 100); // it will return 100, create and save the key if it not exist. 2nd - You can now save and load boolean variables. Ex: DataManager.SetBool("MyBool", true); Ex: DataManager.GetBool("MyBool"); Ex: DataManager.GetBool("MyBool", true); 3rd - Set functions are now saved automatically, so you do not need to use PlayerPrefs.Save(); or DataManager.Save(); 4th - If you want to use this instead PlayerPrefs, you just have to change "PlayerPrefs" to "DataManager". The miracle code This script is very simple, but I hope it can help someone DataManager.cs
  14. 3 points
    This is just an example project showing how you can use particle bullet marks without instantiating and pooling. Nothing much more to say than just particle weapon effects example. The project I put it in was something I was working on sometime ago and just never got around to finishing it, fixing some of the issues or actually doing something with so thought I'd just use it for this reason here. Download Here edit: warning: this does not account for parenting to moving objects. If it hits a rigidbody, you have to use an instantiated object and parent the mark to the rigidbody per normal
  15. 3 points
    I've got a question to ask here about Graphic Design, i made this today and it's supposed to be the logo of the name i will have behind the games being developed for Google Play by me, what do you guys think?. https://imgur.com/a/YuPBO
  16. 3 points
    Hello everyone, I am very happy today to present the Closed Alpha of Pylow The project is configured as a FPS Arena with frantic features, where the skills of the player are essential to overpower their opponents in the matches that will be played. The world is set in the near future where the technologies of virtuality had a drastic impact on the life of teens all over the world.To counteract this phenomenon of "involution" the global governments applied drastic measures: decreeing the complete illegality of any VR system. A follow-up of all habitual users of VR are forced to choose between one of two possible paths: to live in illegality, in order not to break away from a world in which it's possible to live eternal happiness, or to face reality as it presents itself. Over the years hacker groups implemented the aforementioned abandoned technologies and created the "Mind" Hamer ", a machine that allows different people to connect in a crash, where to vent all their rage and frustrations through extreme fighting. In a short time it became a global phenomenon even for those same entities who had previously banned its use. A turnover of clandestine bets that took advantage of poor people from all the world was making the most powerful people of the globe billions of dirty money. So "Mind Hammer" competitions were organized in order to decant the strongest fighters without pouring a drop of blood, or almost. The game actually makes the mind feel all that the character is subjected to, so when you die you really feel like you're dying. It’ll be possible to participate to the game in different ways (F4A, TDM, CTF ...) in which to test skills in fighting in Arenas. The graphics, which are very cartoonish, refer to an imaginary world where every fantasy becomes reality and anger becomes a weapon. You can look for weapons of all kinds that adapt to your tactical needs. For the rest, there's nothing left to do if not to understand if you have got the courage to look at and experience what you are afraid of the most... TRAILER Has the video intrigued you at least a little? If so know that you can subscribe to the closed alpha of the game directly from our website: www.codevstudio.altervista.org Registration is limited! Do not miss your chance;)
  17. 3 points
    Hello everyone! I'm working on a few projects here and there, but this one started in college and we have been constantly working on it from then till now (Out of college). We're currently enjoying making this game and I thought I would share our progress! Currently, there are two people working on Ghoulie's Dungeon! What is Ghoulie's Dungeon? It's a very small project, we work on it along side our jobs. It's just a dungeon runner based game, that we hope to work a lot more on in the future. We want the game to contain a lot of enemies, humour and overall a fun experience. The aim of the game is to get as far as you can. Each room you explore the counter goes up. So far there are a few enemies and 3 bosses in the game, we plan to add a ton more of these as well as more variation to the rooms. (We have a lot planned for this project). We have a story in place, and excited to put it fully in to the game in the future! GIFS: Some dungeon enemies: A boss (MOTM) intro: One of MOTMs Attacks: We have a Twitter and a Discord for this project! Twitter : https://twitter.com/GhouliesDungeon The discord is linked on our twitter! We now also have a patreon if you wish to support this project! We would love to work on it full time. You can support us >here< This project is early in development! We hope you like what we got so far!
  18. 3 points
    https://www.humblebundle.com/store/the-bureau-xcom-declassified? A gift before Xmas Another game is now shared for free on Humble Bundle - and not the least : The Bureau:XCOM declassified. This game has ben rated 78/100 on Steam (mostly positive). Its graphics are good with fun FX and its story seems to me really interesting - something during the 50th years with aliens who want invade our earth - usual, but often efficient. This game reminds me the Resistance Trilogy which I liked a few years ago on PlayStation3. It is like an old movie. Take a look at the clip below ++
  19. 3 points
    https://www.humblebundle.com/store/outlast-deluxe? May the Almighty Lord forgive me - I am trying to corrupt your soul Be a good boy. Don't download this curse... Not suitable for children under 18 years : Intense Violence Blood and Gore Sexual Content Nudity Strong Language Mum ... I peed my pants :/
  20. 3 points
    Just showing some of the tanks i have made already well....armored vehicles i should say. IF YOU NOTICE, each vehicle has a specific color pattern and that will be connected to the "faction". BUT some changed will be mad eto the color. the yellow tank will be switched to purple, and the massive tank in the back (P1000) will be changed to a green color pattern. animation and making these tanks have been the MOST DIFFICULT thing ive ever done to date, even harder then the AI controls. BUT i am happy with the overall results. 10 more tanks left to build then im finished making ALL heavy armored vehicles. sorry for just 1 photo. been working on fixing the Panzer II and the 2 orange vehicles. so after 1 photo i was too tired to care about other screen shots ENJOY
  21. 3 points
    I don't know anything about this game, except one thing - it's free but for a limited time. However a game which has been rated "very positive " on Steam cannot be bad. Grab it ++ https://www.humblebundle.com/store/psychonauts All these creatures seem to me very weird...
  22. 3 points
    A render of an R32 model made by me
  23. 3 points
    http://nolfrevival.tk/ Do you remember this excelent game - No One Live Forever (or NOLF) which has been released 15 years ago? It is so kitch with an amazing OST and many many humor. NOLF was a FPS with stealth gameplay elements which has been developed by Monolith. In this game you play Cate Archer - a beautiful woman during the '60 - a spy who travels around the world so as to fight against crime - the UNITY organization (this is not a joke). A re-release of NOLF by an indie team (the first and second episode) is now available for free - even if nobody can say if this is really legal. Many players claim that this game is one of the best FPS which has been ever created on PC - like DeusEx, Half-Life, etc. Of course, we talk about another era, but I think that it is a good stuff. Take a look at the main page ++
  24. 2 points
    The same, but allowing to create a background. Create an empty gameobject and put this script on it ++ using System.Collections; using UnityEngine; // convert time to sprite [RequireComponent(typeof(SpriteRenderer))] public class TimeToSprite : MonoBehaviour { Texture2D mTex; private Sprite mySprite; // sprite size which can be using like a fontSize [Range(1, 10)] public int fontSize = 5; // font and background color public Color _color = Color.red; public Color _background = Color.black; // each number use 5x3 pixels + 1 as space between them int marging = 4; // size int width; int height = 7; // five pixel + two for contour float time; // for deltaTime string str; // time as string string[] sChars = new string[] { "x", "x", "x", "x" }; // saved chars // each column will be displayed according a bit code int[] num0 = new int[] { 31, 17, 31 }; int[] num1 = new int[] { 17, 31, 16 }; int[] num2 = new int[] { 29, 21, 23 }; int[] num3 = new int[] { 21, 21, 31 }; int[] num4 = new int[] { 07, 04, 31 }; int[] num5 = new int[] { 23, 21, 29 }; int[] num6 = new int[] { 31, 21, 29 }; int[] num7 = new int[] { 01, 01, 31 }; int[] num8 = new int[] { 31, 21, 31 }; int[] num9 = new int[] { 23, 21, 31 }; int[] _dot = new int[] { 00, 10, 00 }; void Awake() { this.transform.localScale = new Vector3(fontSize, fontSize, 0); width = ((4 * marging) + 1); // because we use only 4 chars - 00.0 if (mTex == null) mTex = new Texture2D(width, height, TextureFormat.ARGB32, true); mTex.wrapMode = TextureWrapMode.Clamp; mTex.filterMode = FilterMode.Point; // pixel it mTex.Apply(); this.GetComponent<SpriteRenderer>().flipX = false; this.GetComponent<SpriteRenderer>().flipY = true; // fill sprite with background color for (int i = 0; i < height; i++) for (int j = 0; j < width; j++) mTex.SetPixel(j, i, _background); } // clear only concerned part of the sprite according a new pattern void refresh(int shift) { int x = 1; // a value to center process (one pixel inside sprite) for (int i = x; i < height - x; i++) for (int j = x; j < marging; j++) mTex.SetPixel(j + shift, i, _background); } void UpdateTexture() { mTex.Apply(); // apply new texture as sprite after modification var mySprite = Sprite.Create(mTex, new Rect(0.0f, 0.0f, mTex.width, mTex.height), new Vector2(0.5f, 0.5f), 100.0f, (uint)0); this.transform.GetComponent<SpriteRenderer>().sprite = mySprite; } void timer() { // we use only one digit str = time.ToString("00.0").Replace(",", "."); for (int i = 0; i < str.Length; i++) { // check if the new number is the same (or not) than the previous if (str.Substring(i, 1) != sChars[i]) { // erase the previous pixel zone for this index refresh(i * marging); if (str.Substring(i, 1) == "0") pencil(i * marging, num0, _color); else if (str.Substring(i, 1) == "1") pencil(i * marging, num1, _color); else if (str.Substring(i, 1) == "2") pencil(i * marging, num2, _color); else if (str.Substring(i, 1) == "3") pencil(i * marging, num3, _color); else if (str.Substring(i, 1) == "4") pencil(i * marging, num4, _color); else if (str.Substring(i, 1) == "5") pencil(i * marging, num5, _color); else if (str.Substring(i, 1) == "6") pencil(i * marging, num6, _color); else if (str.Substring(i, 1) == "7") pencil(i * marging, num7, _color); else if (str.Substring(i, 1) == "8") pencil(i * marging, num8, _color); else if (str.Substring(i, 1) == "9") pencil(i * marging, num9, _color); else if (str.Substring(i, 1) == ".") pencil(i * marging, _dot, _color); } // save the char at its index so as to compare it with the next sequence sChars[i] = str.Substring(i, 1); } // update our texture UpdateTexture(); } // convert a number as a bool array private bool[] ConvertByteToBoolArray(byte b) { bool[] r = null; r = new bool[height]; // don't read all bit for (int i = 0; i < r.Length; i++) r[i] = (b & (1 << i)) == 0 ? false : true; return r; } void pencil(int shift, int[] seq, Color color) { // read each integer as pixels column for (int i = 0; i < seq.Length; i++) { var lol = (byte)seq[i]; var ss = ConvertByteToBoolArray(lol); // read bool array to know where a black pixel must be displayed for (int j = 0; j < height; j++) if (ss[j] == true) mTex.SetPixel((shift + i) + 1, j + 1, color); } } ////////////////////////////////////////////////////////// // as an example, we show deltaTime IEnumerator Start() { timer(); while (true) { yield return new WaitForSeconds(0.09f); timer(); } } private void Update() { time += Time.deltaTime; // set max if (time >= 99.9f) time = 99.9f; } }
  25. 2 points
    Hey all! I've finally been able to work on my multiplayer FPS Gunmetal again and it's coming along pretty well. I've been able to redo the menu and add a custom game launcher that is able to patch, add more weapons, and the ability to go prone. The map is also a new addition. Let me know what you think along with what I should add or remove. Thanks for the support and the feedback! Hopefully, I will be able to release a stable Alpha soon for testing.
  26. 2 points
    Thank you for such an amazing kit. I made an army men mod from your kit for a class in school to show off my level design project. I chose your kit because I found it to be free. It's the perfect solution for a top ramen-surviving college student like me that can barely afford anything on the Unity app store. Very quickly I think it's important to mention that I don't have any intentions to make a commercial game from your FPS kit. I'm sure you wouldn't like that. Moreover, after dissecting your game and trying to make my own enemies, I came across a variety of issues. I made my enemies exactly like yours and yet they walk up to the player but don't shoot. I shoot them and they run away. Therefore I wanted to ask, how did you set up your enemies? Perhaps more specifically how did you make them fire and attack the player? I was wondering if perhaps quick documentation would be a good idea. I would love to learn more about how you set up this kit; if you have the time. Also, I noticed an issue where the AK clip doesn't show up on reload animation and for both guns there is no ammunition pickup. Anyhoo, you're kit is amazing and using the Unity HDRP render pipeline makes everything look even more amazing. I'll add some screenshot bellow.
  27. 2 points
    In WeaponScriptNEW find function Deselect() and replace: if(canvas) canvas.crossAlpha.alpha = 0f; if (aimMode == Aim.Sniper) scopeTexture.color = new Color (1,1,1,0f); with: if(canvas) { canvas.crossAlpha.alpha = 0f; if (aimMode == Aim.Sniper) scopeTexture.color = new Color (1,1,1,0f); }
  28. 2 points
  29. 2 points
    before i started my fps project i was just making random 3d models of items and guns (low poly) hoping I'd get some idea from it. learning new tools and taking advantage of the modifiers I managed to my assets look even better. i posted this and still proud of that work but it never hurts to learn even more. and at this point i need to slow down because im start to put in too much detail to classify as "low poly" so hope you enjoy and let me know if you see any flaws or tips that i could use to help save on triangle counts the m4 handle and RIS was actually resigned because i didn't like the look of squares on the m4 while the m16 used pentagons ive been doing a lot of remakes but many have'nt past 2.5k except for the crossbow....THIS IS THE FIRST and so far only, to pass 4k xD so i need to calm down with these remakes
  30. 2 points
    Привет всем! Я решил написать это сообщение на русском языке, чтоб я мог привлечь ваше внимание. Я надеюсь, что некоторые из вас попробуют на английском перевести этот краткий текст. Недавно (быть может, два года назад) Лукас Поуп создал интересную компьютерную игру, называемую «Документы, пожалуйста» - papers, please (very positive + metacritic 85). Мне очень понравилась. Действие игры происходит на контрольно-пропускной пункт в вымышленной республике, напоминающей какую-то страну из бывшего Советского Союза. Говоря проще, это на самом деле какая-то антиутопия. Вам придётся впускать иностранных гостей... или нет, рассматривая аккуратно их документы. Конечно же, вам не хватает времени. Если с документами всё в порядке, то мигранта можно пропустить в страну. А если вы ошибаетесь, позволив террористам пропустить в страну, штрафуют вас... Эта компьютерная игра стала короткометражным фильмом. Вот трейлер - и (пожалуйста товарищ) на русском языке ++
  31. 2 points
    Have you been wanting to buy MMMPFPSK but in the Unity Asset Store? Today the wait is over! Check it out here
  32. 2 points
    I highly suggest you Andrew Price's modeling series which includes everything you have to know about modeling, texturing, rendering.
  33. 2 points
    Before we i start remember this is a (pre)Release! Bench System that is used: MSI 270 Gaming Pro Carbon Intel i5-7600K 1x Evga Titan Black 8GB White Ballistix 2TB SSD(IDK) Used Unity Version: Unity 2017 When Mars told me "Hey, I have a Photon Game Kit, which is currently available for 45 €. Can you please get it and test it?" Of course, I agreed and bougth it the next day! The kit was scripted so easily that even beginners with almost no previous knowledge could it use! Unfortunately, some bugs caused by Unity 2017 as crashes and Init Fails but after repairing some errors, this has fixed everything! Mars is a good developer as you could already see in his game Vengeance and now he has used all his knowledge to create a kit! Fact is the game kit is simply perfect to learn and to develop your own game! 45 €? For opinion with all these features this is too cheap! The Question is, can you buy the kit? Absolutely Yes!
  34. 2 points
    Hey guys its Isaak here! I was working on a polygon reduction plugin for unity, but i got bored and tried to see what would happen if I manipulated each vertex in a mesh using the Mathf.Sin function. And I ended up with this: A smooth wave that works seamlessly with Unity; Plus it performs very well, and don't be put off by the framerate only staying at 70 as it continues to stay at 70 when duplicating the mesh above 100 times. How well does this script perform? The performance obviously lies behind 2 main factors: The shader used on the mesh. The image above used Unity's new Reflective shader, but works perfectly well with any other shader, including transparent or translucent. The number of verticies. This mesh is a plane, and thus wouldn't have as many vertices as a high poly character. This script could probably withstand 250 000 verticies. How to get it? How to use this script? Drag this script onto any GameObject with a MeshRenderer component attached (e.g. any 3d model basically), and press play! What variables to mess around with? Wave Speed - Just like you learnt back in high school, waves have a velocity, and yup... you guessed it... makes the waves flow faster. Wave Amplitude - Amplitude means how high and low the wave will be. Wave Length - Equivalent towards lambda in wave physics. TickFrequency - How many seconds to await for next update. In other words, despite performance, how smooth you want your wave to be. *NEW* Noise - Adds harmonic noise on a second layer to the water, to make it appear bumpy and more realistic What licensing does this code have? I normally like to use the MIT licensing, but as i kind gesture, I'm leaving this snipplet free of charge and of any copyright. You may use this for commercial and/or personal use, as long as you make it look good ( ). Have fun guys! How to fix waves that lag or appear to be choppy? Make sure you have set the TickFrequency variable for the script to a low value, ensuring fast update times. Set to 0 for smoothest results possible. Any other uses for this script? Yes! A Flag came first to my mind, plus nobody knows how to use the complicated cloth renderer first time, with wind and all that stuff. In this case, beginners just drag this script over a mesh and your done.
  35. 2 points
    How about sharing some of the arts which has been liked by many people?
  36. 2 points
    https://docs.unity3d.com/ScriptReference/MonoBehaviour.OnApplicationQuit.html using a value you can tell it whether it's logged in or out. Using OnApplicationQuit you handle the toggle if the user closes the application while still logged in.
  37. 2 points
    A short clip in which I show how each portal smoothly works in my project Azymuth. No glitch - no transition or some bad lighting effect ++
  38. 2 points
    So I'm going to post a text rendering method I'm using for LWJGL 3. Seems there really isn't any libraries supporting version 3, only version 2. So here is a rather robust but effective and quick implementation (rendering thousands of characters 'hundreds of full length strings' at over 50 fps on a old home computer). GUI.java package engine; import static org.lwjgl.opengl.GL11.GL_TEXTURE_2D; import static org.lwjgl.opengl.GL11.glBindTexture; import java.util.Map; import engine.Quad.Anchor; public class GUI { public static Color textColor = Color.white(); private static Font font = null; private static Shader shader; private static Quad quad; public static void Init() { quad = new Quad(Anchor.BottomLeft, true); shader = new Shader("GUIShader"); try { font = new Font("Roboto-Regular", 16); } catch (Exception e) { e.printStackTrace(); } } public static void Prepare() { glBindTexture(GL_TEXTURE_2D, font.GetFontTextureID()); shader.Bind(); shader.SetUniform("projection", Application.GetGUIProjection()); } public static void Label(String text, int x, int y) { Map<Character, Rect> chars = font.GetCharacters(); int xTmp = x; for(char c : text.toCharArray()) { Rect r = chars.get(c); shader.SetUniform("position", xTmp, y); shader.SetUniform("offset", r.x, r.y, r.width, r.height); shader.SetUniform("pixelScale", new Vector2(r.scale.x, r.scale.y)); shader.SetUniform("color", textColor.r, textColor.g, textColor.b, textColor.a); quad.Render(); xTmp += r.scale.x; } } } Font.java package engine; import java.awt.*; import java.awt.image.BufferedImage; import java.io.File; import java.nio.ByteBuffer; import java.util.HashMap; import java.util.Map; import static org.lwjgl.opengl.GL11.*; public class Font { private int fontTextureId; private BufferedImage bufferedImage; private Vector2 imageSize; private java.awt.Font font; private FontMetrics fontMetrics; private Map<Character, Rect> chars = new HashMap<Character, Rect>(); private final Map<Integer,String> drawChars = new HashMap<Integer,String>() { private static final long serialVersionUID = 1L; { put(0, "ABCDEFGHIJKLMNOPQRSTUVWXYZ"); put(1, "abcdefghijklmnopqrstuvwxyz"); put(2, "0123456789"); put(3, "ÄÖÜäöüß"); put(4, " $+-*/=%\"'#@&_(),.;:?!\\|<>[]§`^~"); } }; //Constructors public Font(String name, float size) throws Exception { this.font = java.awt.Font.createFont(java.awt.Font.TRUETYPE_FONT, new File("./res/Font/" + name + ".ttf")).deriveFont(size); //Generate buffered image GraphicsConfiguration gc = GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice().getDefaultConfiguration(); Graphics2D graphics = gc.createCompatibleImage(1, 1, Transparency.TRANSLUCENT).createGraphics(); graphics.setFont(font); fontMetrics = graphics.getFontMetrics(); imageSize = new Vector2((float) drawChars.values().stream().mapToDouble(e -> fontMetrics.getStringBounds(e, null).getWidth()).max().getAsDouble(), (float) drawChars.keySet().size() * (this.getCharHeight())); bufferedImage = graphics.getDeviceConfiguration().createCompatibleImage((int) imageSize.x,(int) imageSize.y,Transparency.TRANSLUCENT); //Generate texture fontTextureId = glGenTextures(); glEnable(GL_TEXTURE_2D); glBindTexture(GL_TEXTURE_2D, fontTextureId); glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA,(int) imageSize.x,(int) imageSize.y,0, GL_RGBA, GL_UNSIGNED_BYTE, asByteBuffer()); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); } //Functions public void drawText(String text, int x, int y, Shader shader, Quad quad) { glBindTexture(GL_TEXTURE_2D, this.fontTextureId); int xTmp = x; for(char c : text.toCharArray()) { Rect r = chars.get(c); shader.SetUniform("position", xTmp, y); shader.SetUniform("offset", r.x, r.y, r.width, r.height); shader.SetUniform("pixelScale", new Vector2(r.scale.x, r.scale.y)); quad.Render(); xTmp += r.scale.x; } } public Map<Character, Rect> GetCharacters(){return chars;} public int GetFontTextureID(){return this.fontTextureId;} //Conversions public ByteBuffer asByteBuffer() { ByteBuffer byteBuffer; //Draw the characters on our image Graphics2D imageGraphics = (Graphics2D) bufferedImage.getGraphics(); imageGraphics.setFont(font); imageGraphics.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_OFF); imageGraphics.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_ON); // draw every CHAR by line... imageGraphics.setColor(java.awt.Color.WHITE); drawChars.keySet().stream().forEach(i -> ProcessCharacters(imageGraphics, i)); //Generate texture data int w = (int)imageSize.x; int h = (int)imageSize.y; int[] pixels = new int[w * h]; bufferedImage.getRGB(0, 0, w, h, pixels, 0, w); byteBuffer = ByteBuffer.allocateDirect((w * h * 4)); for(int y = 0; y < h; y++) { for(int x = 0; x < w; x++) { int pixel = pixels[y * w + x]; byteBuffer.put((byte) ((pixel >> 16) & 0xFF)); // Red byteBuffer.put((byte) ((pixel >> 8) & 0xFF)); // Green byteBuffer.put((byte) (pixel & 0xFF)); // Blue byteBuffer.put((byte) ((pixel >> 24) & 0xFF)); // Alpha } } byteBuffer.flip(); return byteBuffer; } public void ProcessCharacters(Graphics2D g, int index) { char[] cArray = drawChars.get(index).toCharArray(); for(int i = 0; i < cArray.length; i++) { float charWidth = getCharWidth(cArray[i]); float charHeight = getCharHeight(); chars.put(cArray[i], new Rect(1f / imageSize.x * getCharX(cArray[i]), 1f / imageSize.y * getCharY(cArray[i]), 1f / imageSize.x * charWidth, 1f / imageSize.y * charHeight, charWidth, charHeight)); } g.drawString(drawChars.get(index), 0, fontMetrics.getMaxAscent() + (getCharHeight() * index)); } public float getCharX(char c) { String originStr = drawChars.values().stream().filter(e -> e.contains("" + c)).findFirst().orElse("" + c); return (float) fontMetrics.getStringBounds(originStr.substring(0, originStr.indexOf(c)), null).getWidth(); } public float getCharY(char c) { float lineId = (float) drawChars.keySet().stream().filter(i -> drawChars.get(i).contains("" + c)).findFirst().orElse(0); return this.getCharHeight() * lineId; } public float getCharWidth(char c){ return fontMetrics.charWidth(c); } public float getCharHeight(){ return (float) (fontMetrics.getMaxAscent() + fontMetrics.getMaxDescent());} } This ofcourse is not going to work straight out of the box because I've also got a quad class that creates the quad and stores it in a vbo and ofcourse using uniforms in the shader, etc.. etc.. But for the actual creation of the font, offsetting and label calls, it's all there. Methods are modification from THIS by TheBoneJarmer but 6000% the speed. The script found there is in a single script so it's easier to read and is standalone (out of the box), but is very very slow
  39. 2 points
    This is an invisibility shader that is similar to Halo or similar. Not much else to explain bc it's pretty well known. but first: Disclaimer: This shader was not created by me nor do I have any affiliation with the creator. This is just a copy paste topic so that you don't have to do it the hard way and scroll his youtube video to hand type it, that's it. Shader "Custom/Cloak" { Properties { [HideInspector] _dirty("", int) = 1 _Blending("Blending", Range(0, 1)) = 0 _DistortionMap("DistortionMap", 2D) = "bump" {} _DistortionScale("DistortionScale", Range(0, 1)) = 0 _RippleScale("RippleScale", Range(0, 20)) = 0 _RippleSpeed("RippleSpeed", Range(0, 1)) = 0 } SubShader { Tags{"RenderType" = "Opaque" "Queue" = "Transparent+0" "IsEmissive" = "true"} Cull Back GrabPass{"_GrabScreen0"} CGPROGRAM #include "UnityShaderVariables.cginc" #pragma target 3.0 #pragma surface surf Standard keepalpha addshadow fullforwardshadows struct Input { float4 screenPos; }; uniform sampler2D _GrabScreen0; uniform sampler2D _DistortionMap; uniform float _RippleScale; uniform float _RippleSpeed; uniform float _DistortionScale; uniform float _Blending; void surf(Input i, inout SurfaceOutputStandard o) { o.Albedo = float3(0, 0, 0); float4 screenPos7 = i.screenPos; #if UNITY_UV_STARTS_AT_TOP float scale7 = -1.0; #else float scale7 = 1.0; #endif float halfPosW7 = screenPos7.w * 0.5; screenPos7.y = (screenPos7.y - halfPosW7) * _ProjectionParams.x * scale7 + halfPosW7; screenPos7.w += 0.00000000001; screenPos7.xyzw /= screenPos7.w; float4 temp_cast_0 = (_Time.y * _RippleSpeed); float4 temp_cast_3 = 1.0; float4 temp_output_3_0 = lerp(tex2Dproj(_GrabScreen0, UNITY_PROJ_COORD((float4((UnpackNormal(tex2D(_DistortionMap, (_RippleScale * float2((temp_cast_0 + screenPos7).x, (temp_cast_0 + screenPos7).y)).xy)) * _DistortionScale), 0.0) + screenPos7))), temp_cast_3, _Blending); o.Emission = temp_output_3_0.rgb; o.Metallic = temp_output_3_0.r; o.Smoothness = temp_output_3_0.r; o.Alpha = 1; } ENDCG } Fallback "Diffuse" }
  40. 2 points
    I wasn't originally going to post anything about my game nor showcase anything outside of the premium section but I'm going to make an exception with this post. I need some feedback on what you think about the birds in it's current stage. Feel free to tell me what you really think about, please don't hold back. For anyone wondering, yes, the base to the birds flocking is the exact same base as the fish schooling topic I previously posted in the scripts section p.s. This is not a discussion on the game itself, graphics, gameplay, etc... this is just an opinion topic for the birds behavior so please stay on topic. Animations are also still a work in progress, I've spent most of the time just in the programming part and less in animations ATM.
  41. 2 points
    I dont think you understand purpose why i posted this, it's a "Basic Idea of Creating any Item list in Game", which is not dynamic. Purpose of this is exact opposite of singleton method. Instead of trying to bugger old topics which are mainly meant for complete beginners you could post an example in free scripts.
  42. 1 point
  43. 1 point
    I checked it in Blender.. The model is fine. I dont really know what happened, maybe the animation on the bear caused it. On the platform.. idk. I just remodeled both because they were my first tries on modeling anyway No problems with my new models as of yet. Thanks anyways!
  44. 1 point
    Hello Mad, you still working in the kit development or you switched your goals???
  45. 1 point
    Or you can save yourself from all the coding and just animate it on impact. void ApplyDamage(float amount) { if(animation.IsPlaying(downAndStationaryAnim)) return; animation.CrossFade(downAndStationaryAnimName); while(animation.IsPlaying(downAndStationaryAnim)) yield; animation.CrossFade(upAnimName); } is just a basic example
  46. 1 point
    Hello my friends My new Improve Asset ISMART Car A.I! https://www.assetstore.unity3d.com/...FAwTG5toziV8R7TFLs15ycYQWhTk#!/content/105065 Early Access Discount Price Get in quick! ISmart give you the power to create very easy SMART CAR!! With the top drop-down menu, providing options for create a vehicles with multiple axle types and behaviors like :Sport , Normal,Truck and custom. The project also includes a range of simple example vehicles form Vehicle Tools asset and new Smart Waypoint script! Work with Mobile and Unity 2017.XX The first video is a Tutorial and have PDF tutorial on the asset.
  47. 1 point
    Get more #free3dlowpolymodel on https://www.facebook.com/gamedevstudios/ Click the link below to download this #freelowpolyak47 http://microify.com/CGz And if you like my work and wish to support me then the best way would be to share my posts Again thnks for 150+ likes
  48. 1 point
    I made something similar a month ago. It works with all UI components with color property Also, it works in Editor Mode. To attach just drag your script on object with UI Element or use "Add Component->UI->Effects->Gradient" using UnityEngine; using UnityEngine.UI; [ExecuteInEditMode] [AddComponentMenu("UI/Effects/Gradient")] public class GradientEffect : MonoBehaviour { public Gradient gradient; private float tValue = 0; public float targetValue { get { return tValue; } set { tValue = value; UpdateColor(); } } private Graphic targetGraphic; private void Awake() { targetGraphic = GetComponent<Graphic>(); } private void UpdateColor() { targetGraphic.color = gradient.Evaluate(tValue); } } And simplier version with Update, which is not very efficient using UnityEngine; using UnityEngine.UI; [ExecuteInEditMode] [AddComponentMenu("UI/Effects/Gradient")] public class GradientEffect : MonoBehaviour { public Gradient gradient; [Range(0,1)] public float value = 0; private Graphic targetGraphic; private void Awake() { targetGraphic = GetComponent<Graphic>(); } private void Update() { targetGraphic.color = gradient.Evaluate(value); } }
  49. 1 point
    Thank you, it resolved my issue.
×
×
  • Create New...