Do any of you have any idea of how to make Flying NPCs? Its pretty easy to use the inbuilt NavMesh for ground based test NPCs but I'm wondering about Navigation in 3d space...
[QUOTE=LuaChobo;42527657]You could try doing what source used to do, have invisible entities that the NPCs grab positional data from and just calculate the closest route.
though that would end up clogging your scene view so not the best[/QUOTE]
You mean air nodes and stuff like that? That is actually a pretty good idea.
I tried to learn Unity by ripping off a game where you protect an egg from things.
[unity]https://dl.dropboxusercontent.com/u/24554595/unity/egg%20builds/web/Egg/Egg.unity3d[/unity]
The egg doesn't break because I haven't tried making the broken pieces in Blender yet.
[editline]17th October 2013[/editline]
also, C# is the love of my life
So i've sort of decided to do a high speed racing game for my graduation project this year, but I need some general guidance beyond what i've looked up on the net
I plan for the game to be in the style of games like F-Zero or Wipeout but much more heavily inspired by Star Wars Episode 1 racer, a.k.a the only racing game I have ever liked, and will have extremely hazardous tracks, 'vehicles' which are basically rocket engines with chairs on them and constant explosions of all kinds
The biggest difficulty I can already foresee will be the vehicle physics - i've already found this useful post on polycount - [url]http://www.polycount.com/forum/showpost.php?p=1496881&postcount=7[/url] that gives a general overview of how physics are done in the wipeout games, which will probably apply closely to what I'm trying to do.
I essentially need the vehicles to act similarly to how a pod racer would, floating a meter or so off the ground, but being able to glide in the air, take damage on the underside from landing too hard, slide on certain surfaces etc. I consider myself more of an artist than a programmer, but I still have a lot of general programming knowledge
Could anyone tell me
a. if there are any decent resources to comb over/key words to search up (springs & dampeners?)
b. if I am a madman for even trying to code physics for a racing game and I probably shouldn't try
[QUOTE=Zero Vector;42558541]also, C# is the love of my life[/QUOTE]
C# is the shit.
[QUOTE=Zero Vector;42558541]I tried to learn Unity by [URL="https://dl.dropboxusercontent.com/u/24554595/unity/egg%20builds/web/Egg/Egg.html"]ripping off[/URL] a game where you protect an egg from things.
The egg doesn't break because I haven't tried making the broken pieces in Blender yet.
[editline]17th October 2013[/editline]
also, C# is the love of my life[/QUOTE]
Love it!
[img]http://i.imgur.com/XYYIBMa.jpg[/img]
FYI, upgrading to Windows 8.1 seems to break unity for a lot of people, myself included. Symptoms include crashing when using the viewport and Unity Pro licenses breaking. If you have the crashing issue, I found this post in the Unity forums that worked for me:
[QUOTE]Solution to crashing editor in Windows 8.1
I was having the same problem. After upgrading to Windows 8.1 the Unity Editor stopped working. Inspector, Project, and Hierarchy tabs still showed, but the 3D viewport did not load and the editor crashed entirely. So I looked around and found a solution that forces using Direct3D 11. Adding the " -force-d3d11" parameter to Unity.exe did the trick.
This is what worked for me:
1. Make a shortcut to the Unity.exe, open its properties
2. Change the target so Unity.exe gets opened in d3d11 mode:
YOUR_PATH\Unity.exe -force-d3d11
3. OPTIONAL: IF you suffer from BLURRY TEXTS/FONTS in the editor: In the 'Compatibility' tab check the "Disable display scaling...". Apply your changes and you are good to go
Hope this helps until an update fixes this issue.[/QUOTE]
[QUOTE=Pelf;42574374]FYI, upgrading to Windows 8.1 seems to break unity for a lot of people, myself included. Symptoms include crashing when using the viewport and Unity Pro licenses breaking. If you have the crashing issue, I found this post in the Unity forums that worked for me:[/QUOTE]
That fixed the fonts looking like garbage for me, thanks!
[editline]19th October 2013[/editline]
[QUOTE=LuaChobo;42460255]Not a lot of progress, but still some.
Only really been working on this like 20 minutes a day, so yeah.
[unity]http://puu.sh/4Lgp7.unity3d[/unity]
Changed it so it does the gravity shit on mouse release, holding it down just does a line out to where you are aiming.
Added more blocks, You have to switch between colours with 1-2-3
Added temporary hud element saying what color it is
Also done a lot of work on stuff thats just outright not done yet.
And modeler is making some generic sci-fi glove for me to use soon.
It's still not much, but I'm just happy I finally found a project that I'm somewhat interested in, even if I'm still pretty shit at C#, and even though I love python boo makes me cringe a little.[/QUOTE]
I don't think I would have grasped the concept without reading the posts about it - at first I thought I was guiding the cube where I pointed, but when that didn't work about 60% of the time I was just really confused. I think you should show maybe some kind of indication that gravity is shifting upon mouse release, maybe something emanating from the surface you're pointing at. I also had difficulty jumping on top of cubes unless I shoved them against a wall. Pretty interesting though!
What would be the best/easiest way to send player scores to a server so they can be processed? And what would be the best way to fetch scores saved on the server?
[editline]19th October 2013[/editline]
And how would I even set up a server to handle that?
[QUOTE=Pelf;42579002]What would be the best/easiest way to send player scores to a server so they can be processed? And what would be the best way to fetch scores saved on the server?
[editline]19th October 2013[/editline]
And how would I even set up a server to handle that?[/QUOTE]
Raw TCP connections to a predefined port.
You can use ncat in an infinite loop to just dump the data somewhere and let another program do the processing, then serve the results from a file on another port.
If you want a serious solution, you can basically take any language or environment and open a TCP listener, then spawn a new thread for each request or put them in a queue that accumulates data until it can be processed.
The waiting for a connection is usually blocking, which is why you should probably have more than one thread.
Port 80 would be a good choice because it's usually not blocked by firewalls.
Whatever you do, make sure there's some check that prevents people from blocking your system with giant requests.
[editline]20th October 2013[/editline]
If the amount of data is always very small, you can use UDP too, but then you have to handle unreliable connections manually. The advantage is that it's a bit less demanding for the server.
[editline]20th October 2013[/editline]
People almost certainly will try to cheat if you don't upload whole replays for validation though.
[QUOTE=Pelf;42579002]What would be the best/easiest way to send player scores to a server so they can be processed? And what would be the best way to fetch scores saved on the server?
[editline]19th October 2013[/editline]
And how would I even set up a server to handle that?[/QUOTE]
The easiest way to do it would be to just use a simple PHP script. Sure, people can be jackasses and cheat but some sophisticated system would be overkill. You could even do some sort of sanity test to make sure the score is reasonable. Like, not negative or greater than a million. Possibly even calculate the maximum level score based on number of enemies, time, or whatever you base it off of.
You could probably find free web hosting or at least get it super cheap. Many flash games use this technique and if you google it you can probably find some scripts!
Still working on this. Working on a mecanim event system of some sort.
[unity]https://dl.dropboxusercontent.com/u/51366441/Project/UnityTest.unity3d[/unity]
[QUOTE=CrashLemon;42586750]Still working on this. Working on a mecanim event system of some sort.
[unity]https://dl.dropboxusercontent.com/u/51366441/Project/UnityTest.unity3d[/unity][/QUOTE]
I think you forgot to make the material for the crosshair transparent D:
Nice work on the animations and stuff :)
[QUOTE=CrashLemon;42586750]Still working on this. Working on a mecanim event system of some sort.
[unity]https://dl.dropboxusercontent.com/u/51366441/Project/UnityTest.unity3d[/unity][/QUOTE]
[t]http://i.imgur.com/1CEHMvd.png[/t]
What'd I win?
[QUOTE=Zero Vector;42558541]I tried to learn Unity by ripping off a game where you protect an egg from things.
[unity]https://dl.dropboxusercontent.com/u/24554595/unity/egg%20builds/web/Egg/Egg.unity3d[/unity]
The egg doesn't break because I haven't tried making the broken pieces in Blender yet.
[editline]17th October 2013[/editline]
also, C# is the love of my life[/QUOTE]
More, please :v:
Is there any news on when the next version of unity is out? I have an interesting idea but need 2D
[QUOTE=Richy19;42599265]Is there any news on when the next version of unity is out? I have an interesting idea but need 2D[/QUOTE]
Fuck 2D, we need the new GUI system.
You can do 2D in Unity without the new system, it might just be a small hassle. There are some public scripts available for sprite atlasing and animations, or you can download that free 2D animation system of which I forgot the name.
[editline]21st October 2013[/editline]
[url]http://forum.unity3d.com/threads/95827-Orthello-2D-Framework-100-FREE[/url]
[QUOTE=Asgard;42599525]Fuck 2D, we need the new GUI system.
You can do 2D in Unity without the new system, it might just be a small hassle. There are some public scripts available for sprite atlasing and animations, or you can download that free 2D animation system of which I forgot the name.
[editline]21st October 2013[/editline]
[url]http://forum.unity3d.com/threads/95827-Orthello-2D-Framework-100-FREE[/url][/QUOTE]
Shouldn't GUI's be easier to make once the 2D system comes out, though?
I really hope it will came out before next LudumDare.
2d feature looks very good, Unity will be perfect for fast dev of 2d games.
[QUOTE=Asgard;42599525]Fuck 2D, we need the new GUI system.
You can do 2D in Unity without the new system, it might just be a small hassle. There are some public scripts available for sprite atlasing and animations, or you can download that free 2D animation system of which I forgot the name.
[editline]21st October 2013[/editline]
[url]http://forum.unity3d.com/threads/95827-Orthello-2D-Framework-100-FREE[/url][/QUOTE]
You can do GUIs without the new GUI system
[QUOTE=garry;42605887]You can do GUIs without the new GUI system[/QUOTE]
But you've experienced first-hand how much of a pain that is. Especially if you don't want to spend any money.
So the same as 2D?
So I wanted to reset all gameobjects (position,rotation) in my scene and tried to think of best possible way.
Obvious answer would be just to reload the scene with Application.LoadLevel, but I didn't want to do that otherwise I would have to reconnect all clients over and over every time I reloaded the scene.
Next idea I had was to check and record each position/rotation of each gameobject that needed reset, which was a stupid and slow idea so I never even attempted it.
Then I came up with just cloning the objects each time the scene "resets" and hiding the template ones. Which works great.
If if it's just position and rotation, could you just add a component to each object (either programatically or manually in the scene view) which records the position on Awake()?
Then just do BroadcastMessage( "RestorePositions" ) and have a RestorePositions function which sets the position of the object back to those positions?
[QUOTE=Asgard;42599525]Fuck 2D, we need the new GUI system.
You can do 2D in Unity without the new system, it might just be a small hassle. There are some public scripts available for sprite atlasing and animations, or you can download that free 2D animation system of which I forgot the name.
[editline]21st October 2013[/editline]
[url]http://forum.unity3d.com/threads/95827-Orthello-2D-Framework-100-FREE[/url][/QUOTE]
I don't mind the Unity GUI for majority of stuff, as a GUI is one of the last things I really care about (I rather have something function, function well and then make it pretty)
Also, wouldn't the whole 2d stuffs make it easier to make GUI's?
I heard SendMessage or BroadcastMessage is very slow compared to delegates in C# and I was wondering if any of you guys have an idea of how to do a simple hook system?
Should I make an "Hook" script on a master class which stores references of functions of other scripts or what?
People complain about SendMessage and BroadcastMessage all the time. They're useful and they're fine - but just don't abuse them. Don't make game logic that happens 100 times a frame use them.
Alright I got a working Mecanim Event script of some sort, feel free to use it.
[code]
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
public class MecanimEvents : MonoBehaviour {
// Variables
public Animator animator;
public string prefix = "AnimEvent";
private AnimatorStateInfo _curState;
private AnimatorStateInfo _lastState;
private AnimatorTransitionInfo _curTransit;
private AnimatorTransitionInfo _lastTransit;
private string _state = "None";
private Hashtable _stateTriggers = new Hashtable();
private Hashtable _transTriggers = new Hashtable();
// Use this for initialization
void Start () {
// If we don't have the animator, try to fetch one.
if ( !animator )
animator = GetComponent<Animator>();
}
// Update is called once per frame
void Update () {
if ( !animator ) return;
_curState = animator.GetCurrentAnimatorStateInfo(0);
_curTransit = animator.GetAnimatorTransitionInfo(0);
OnStateChange();
OnTransitionChange();
_lastState = _curState;
_lastTransit = _curTransit;
}
// This is called when the state is changed.
void OnStateChange(){
if ( _curState.nameHash == _lastState.nameHash ) return;
// Check if my triggers exists.
if ( _stateTriggers.ContainsKey( _curState.nameHash ) )
ChangeState( (string)_stateTriggers[ _curState.nameHash ] );
else
ChangeState( "None" );
}
// This is called when the transition is changed.
void OnTransitionChange(){
if ( _curTransit.nameHash == _lastTransit.nameHash ) return;
// Check if the triggers exists.
if ( _transTriggers.ContainsKey( _curTransit.userNameHash ) ){
ChangeState( (string)_transTriggers[ _curTransit.userNameHash ], true );
}
}
#region ChangeState
// Change the current state if its not the same as the actual one.
void ChangeState( string state ){
if ( _state != state ){
SendMessage( prefix + _state + "End", SendMessageOptions.DontRequireReceiver);
_state = state;
SendMessage( prefix + _state + "Start", SendMessageOptions.DontRequireReceiver );
}
}
// Overloaded to force a state change.
void ChangeState( string state, bool forced ){
if ( _state != state || forced ){
SendMessage( prefix + _state + "End", SendMessageOptions.DontRequireReceiver);
_state = state;
SendMessage( prefix + _state + "Start", SendMessageOptions.DontRequireReceiver );
}
}
#endregion
#region State Additions
// Adds a desired named state and which mecanim state will trigger it.
public void AddStateTrigger( string state, string stateName ){
_stateTriggers.Add( Animator.StringToHash( stateName ), state );
}
public void AddStateTrigger( string state, string[] statesTable ){
foreach( string name in statesTable ){
_stateTriggers.Add( Animator.StringToHash( name ), state );
}
}
// Adds a desired named state based on a desired triggered transition.
public void AddTransitionTrigger( string state, string transName ){
_transTriggers.Add( Animator.StringToHash( transName ), state );
Debug.Log (Animator.StringToHash(transName));
}
public void AddTransitionTrigger( string state, string[] transTable ){
foreach( string name in transTable ){
_transTriggers.Add( Animator.StringToHash( name ), state );
}
}
#endregion
}[/code]
Any recommendation on books/ learning sources for targetting smartphones with unity?
Making a wurm clone so i can learn more unity. :v:
[IMG]http://i.imgur.com/egVPzRv.jpg[/IMG]
[URL]http://87.96.169.80:8080[/URL] if you want to try it out.
Controls:
Left click = raise terrain corner
Hold shift + left click = lower terrain corner
Hold alt + left click = replace grass with dirt in whole "tile"
Using default particle asset for fire.
[QUOTE=Dj-J3;42672780]-snip-[/QUOTE]
I managed to clip through the ground, but I can't seem to replicate.
Sorry, you need to Log In to post a reply to this thread.