• Unity3D - Discussion
    5,004 replies, posted
Yeah, but I don't think the income he gets would be reliable enough for that.
[img]http://puu.sh/bmhyV/b1834f98bc.PNG[/img]
I came back to this HUD I made to significantly clean up the back end functionality of it in the hope of eventually selling it on the asset store. The goal of last night's work was to separate the HUD from all the gameplay elements that it was hooked into. Instead of pulling data from an assumed and specifically set up player, the player is now responsible for feeding the data to the HUD. It's now completely portable and no longer polls outside information. I've also exposed some internal things as callable functions such as changing the color of the HUD. The only exception is that anything that can be targeted (the drones in this picture for example) must have a HUDTarget component. It doesn't really do anything, it just stores information that the HUD requires to display the target box and properties such as type, name, etc. Visually it's pretty much identical to the last time I showed it. The only things I've added is an optional TGT for mission critical targets on the target box and a warning box (not shown) that can be triggered to be shown or hidden. There's still a few other things I want to do such as recoding the pitch ladder to be dynamic and based off of the field of view rather than carefully hand placed and requiring a 60 degree FOV camera. [t]http://38.media.tumblr.com/17dd6a13c7957ea65ec716a51ed133af/tumblr_nbeva7kGcA1r9waklo1_1280.jpg[/t]
Dafuq, OnCollisionEnter(Collision collision) returns me a trigger.. collision.collider is a box collider marked as trigger. How is this possible?? [editline]5th September 2014[/editline] That trigger is now on another layer, collision matrix set so it can't collider, yet OnCollisionEnter still returns me that same entity / trigger box. What the heck really.
Regarding bolt, I've completed the tutorial and all, and I am currently implementing multiplayer on my project! However, I've got a question, could anyone please help me? I'd be grateful. In my game, players are greeted with a "class selection" screen, and only spawn after clicking on a button. This button currently calls an Instantiate function with the player prefab. The thing is, it seems that for this to work out in Multiplayer, I'd have to make it so that the player prefab is spawned by the SERVER, right? How can I do that? Can I just spawn the player prefab as the client and relinquish all control to the server instead? I am honestly surprised as to how Bolt handles things, it's all so smooth I gotta say.
It's not strictly necessary, but if the server spawns it then the server gets full control over it (which IS necessary for server authoritative networking) I would raise an event telling the server that you've picked your class. The server would then store the class and proceed with spawning. In fact, the way I would probably handle it is by having the client essentially tell the server when it is ready to spawn. The server would just keep some bool somewhere (isReadyToSpawn perhaps?) and handle the rest of the spawn logic (respawn timers and whatnot, that way the player can't cheat the respawn time by issuing a spawn command too soon)
[QUOTE=Zazibar;45885247]Figured I mention this here considering I just bought it myself. If you're a student (and can verify it i.e. have a student ID card) you can pre-order the pro version of Unity 5 from Studica and save 57%. [url]http://www.studica.com/us/en/unity/unity-pro-5-game-development-software-student-commercial.html[/url] It's a full license so it's the same as if you bought it directly from Unity. It's not the poopy student version that adds a watermark and some other nonsense. Also you get a pro license for 4.x included for free. Their sale ends September 30th.[/QUOTE] Shit man, my student card just expired like 5 days ago guess I could use my brother's? How should I go about this
I'm still having lightmap issues and it's really starting to piss me off. I cleared the lightmaps in the scene and i can see the realtime shadows. If I close the lightmap window I can't see the shadows on the terrain anymore. If i open up the lightmap window the real time shadows magically appear again. But if I close it they disappear. I can't find anything on the internet describing this issue. It's only the terrain. It has no lightmaps on it and I unchecked the box that says "Use Lightmaps" [editline]6th September 2014[/editline] The shadows casted onto the terrain are actually there, but much much lighter than the rest of the shadows
How's Bolt as a solution for persistent online worlds?
Eh, for some reason, Bolt keeps giving me this odd error now. [IMG]http://i.imgur.com/aFXpJgA.png[/IMG]
Anyone know how to make a box in a custom editor window to put things in? [img]http://puu.sh/bokRg/067260eaa8.png[/img] This but I want to put buttons and what not in it.
GUI.Box?
[QUOTE=Kidd;45909785]Anyone know how to make a box in a custom editor window to put things in? [img]http://puu.sh/bokRg/067260eaa8.png[/img] This but I want to put buttons and what not in it.[/QUOTE] Here you go: [url]http://docs.unity3d.com/ScriptReference/Editor.html[/url]
GUI.Box only accepts text and images. Duskling, I looked through all editor reference stuff and couldn't find anything. Either I missed it or there isn't anything obvious that I saw to help.
[QUOTE=Kidd;45910055]GUI.Box only accepts text and images. Duskling, I looked through all editor reference stuff and couldn't find anything. Either I missed it or there isn't anything obvious that I saw to help.[/QUOTE] Do GUI.BeginVertical(GUI.skin.box); then all your buttons and stuff and finally GUI.EndVertical();
Worked some more on my HUD. I basically re-wrote the pitch ladder entirely. Before, it was hard coded with hand-placed increments. This was a huge pain in the ass to create, extremely inflexible, and inherently inaccurate. It also required a camera with a 60 degree field of view to work correctly. Now, those increments are generated through code based on the field of view so that the camera and HUD can now function at any arbitrary field of view. They can also be set to change dynamically in real time like Ace Combat so that when you zoom in or out, the ladder stays accurate. The spacing between increments can also be set, so for example you could have increments every 10 degrees, every 5 degrees, and so on. Semi-unrelated, but I also significantly re-worked that TrackIR Unity script. It was really messy and unintuitive to use and set up. It's now very user friendly and I passed it off to the guy making Enemy Starfighter because he currently lacks TIR support. [sp]I hope senpai notices me.[/sp] [vid]http://a.pomf.se/gojygk.webm[/vid]
Does anyone know what could be causing this? [URL]http://forum.boltengine.com/viewtopic.php?f=6&t=328[/URL] I'm using the newest Bolt release. This basically broke my game right now. So I'm trying to figure out what I have to change to fix it. I know they changed the way maps/scenes are loaded now, with some new callbacks. But I have no idea how to use them.. Edit: This is a bug with Bolt atm, fholm is fixing :)
Does anyone know how to use the gyroscope? I'm basically looking for the axis that goes from the bottom of the phone to the top of the phone. We're making a game where a player falls down and by tilting you have to direct him. I tried playing around a bit, but I was only able to get the giroscope to work in an X shape (tilting to left would make it go to the left top, tilting to the right make it go to the right bottom)
I have around 25kb of GC allocation every frame. Is this bad?
I dunno. If you see GC.Collect calls showing up frequently in the profiler and you're seeing frequent "pausing", then you may want to do something about it.
I overhauled the target box back end so that they no longer pull outside information. They now draw all their information from what the HUD knows, and nothing else. I also added a locking animation, which was a lot easier to get good looking than I thought it would be. (It's literally two lines of code.) With that, the HUD is basically done. I just want to polish it for ease of use purposes and then I'll sit on it until 4.6 is officially released and hopefully put it on the asset store. [img]https://38.media.tumblr.com/af73dddfbc83949335cd1b604d337aca/tumblr_nbk09r9dGU1r9waklo2_r1_500.gif[/img] No idea on what price I should sell it at and honestly the whole idea of selling something like this goes against the very open way that I usually operate. It makes me uncomfortable but I want to try putting something on the store to see if I can get any Unitybux. Does anybody have thoughts/experience on selling this on the Asset Store? Is this a good idea? Should I just release it for free? What should it cost?
you are totally able to price that at a reasonably high cost. Afaik nothing like that exists on the market and it really looks perfect for what it's trying to be. If someone was paying you to create that for a game how much would you want to be paid for it? That should be the starting area in choosing a price. I'd say start in around the area of $20, even though I could see it selling for higher.
I'm really considering buying Bolt, mainly because of the appraisal it gets but also because it's close to Source's networking in many terms. We're currently using Photon for our main game, mainly for their room based cloud services, but creating your own servers is a hassle. Is it possible to create and use lobbies with Bolt, or does it have to be done externally? Also Bolt is 50% off for 48 hours for their new 0.3 release: [URL="http://www.boltengine.com/Buy.aspx?CODE=L96QSFFDFRG9Y"]http://www.boltengine.com/Buy.aspx?CODE=L96QSFFDFRG9Y[/URL]
I am going to ask a question and it might sound stupid but I can't find an answer. Most multiplayer games are on websites where you can buy slots to create a server.(Like a gameserver) Would you be able to do the same thing with bolt?
[QUOTE=BoowmanTech;45931247]I am going to ask a question and it might sound stupid but I can't find an answer. Most multiplayer games are on websites where you can buy slots to create a server.(Like a gameserver) Would you be able to do the same thing with bolt?[/QUOTE] To my best knowledge.. Yes? I thought gameservers were just a server box/computer that hosts a dedicated client of the game, in which you can specify how many players slots there are and what not. Since Bolt can handle dedicated servers, and a lot of "player slots", it's really up to you do the rest. Atleast, that's what I understand. --------- I'm trying to "focus" on a InputField, in the new UI. It'd be for my chat box. I've got everything working on it, networking and other things, but I'm not sure how I'd focus on the InputField upon pressing a key, such as Y, or ENTER. Anyone know how?
Speaking of Bolt, 50% off for the next 48 hours. [URL]http://www.boltengine.com/Buy.aspx?CODE=L96QSFFDFRG9Y[/URL] [B] edit:[/B] Very late.
I have a quick question. [code]using UnityEngine; using UnityEngine.UI; using UnityEngine.EventSystems; public class Chat : BoltCallbacks { public Scrollbar scroll; public RectTransform content; public Text chatLine; public InputField input; private bool chatIsOpen = false; public override bool PersistBetweenStartupAndShutdown () { return true; } void Awake () { input.onSubmit.AddListener (SendChat); } void Update () { scroll.value = + -0.01f * Time.deltaTime; if (Input.GetKeyDown(KeyCode.Y) && !chatIsOpen) { chatIsOpen = true; input.gameObject.SetActive(true); EventSystemManager.currentSystem.SetSelectedGameObject(input.gameObject, null); input.OnPointerClick (null); } } void SendChat (string line) { chatIsOpen = false; input.value = ""; input.gameObject.SetActive (false); if (line == "") { return; } IChat evnt = BoltFactory.NewEvent<IChat>(); evnt.text = PlayerNamePlate.playerName + ": " + line; BoltNetwork.Raise(evnt); } public override void OnEvent (IChat evnt, BoltConnection cn) { Text newLine = ((GameObject) Instantiate(chatLine.gameObject)).GetComponent<Text>(); newLine.gameObject.SetActive(true); newLine.rectTransform.parent = content; newLine.text = evnt.text; } }[/code] I'm trying to bring up my chat upon pressing Y, and I've basically done that. However, when I press Y, the chat pops up, and actually types Y. This can be very confusing and ends up with a lot of y's in front of messages. I've tried setting the input.value upon pressing Y, but the first y still pops up.
[QUOTE=sarge997;45933437]I have a quick question. [code]using UnityEngine; using UnityEngine.UI; using UnityEngine.EventSystems; public class Chat : BoltCallbacks { public Scrollbar scroll; public RectTransform content; public Text chatLine; public InputField input; private bool chatIsOpen = false; public override bool PersistBetweenStartupAndShutdown () { return true; } void Awake () { input.onSubmit.AddListener (SendChat); } void Update () { scroll.value = + -0.01f * Time.deltaTime; if (Input.GetKeyDown(KeyCode.Y) && !chatIsOpen) { chatIsOpen = true; input.gameObject.SetActive(true); EventSystemManager.currentSystem.SetSelectedGameObject(input.gameObject, null); input.OnPointerClick (null); } } void SendChat (string line) { chatIsOpen = false; input.value = ""; input.gameObject.SetActive (false); if (line == "") { return; } IChat evnt = BoltFactory.NewEvent<IChat>(); evnt.text = PlayerNamePlate.playerName + ": " + line; BoltNetwork.Raise(evnt); } public override void OnEvent (IChat evnt, BoltConnection cn) { Text newLine = ((GameObject) Instantiate(chatLine.gameObject)).GetComponent<Text>(); newLine.gameObject.SetActive(true); newLine.rectTransform.parent = content; newLine.text = evnt.text; } }[/code] I'm trying to bring up my chat upon pressing Y, and I've basically done that. However, when I press Y, the chat pops up, and actually types Y. This can be very confusing and ends up with a lot of y's in front of messages. I've tried setting the input.value upon pressing Y, but the first y still pops up.[/QUOTE] Use a boolean that checks if it the chat is currently open at the time you press the Y? -edit- I fail to see where exactly you catch the typing of text...
Is is possible in UGUI's event system to intercept and "consume" events before they reach a control? I would think in a sane GUI system that would be how the event system is designed, but I don't know enough about UGUI to know for certain.
[QUOTE=Cyberuben;45933552]Use a boolean that checks if it the chat is currently open at the time you press the Y? -edit- I fail to see where exactly you catch the typing of text...[/QUOTE] I can't really do that... I think. I don't really know how UGUI is setup. But I can tell you, I'm using an InputField, which at the start of the script "Awake" I call "input.onSubmit.AddListener (SendChat);" which listens to my ENTER/RETURN key, then calls the bolt event, etc, etc. I just don't know exactly how an InputField is setup, like how do you set which keys can be pressed if I wanted? It doesn't seem like it gives you a lot of control over things to be honest..
Sorry, you need to Log In to post a reply to this thread.