• Advertisement


  • Content count

  • Joined

  • Last visited

Community Reputation

6156 Excellent

1 Follower

About ferrous

  • Rank

Personal Information

  • Interests
  1. That should 'just work'. I mean, you have to be careful with any assumptions you're doing with your pathfinding code with regards to the adjacent nodes, but other than that, it should just work. This is basically how one would implement teleporters, elevators, jumppads or other shortcuts.
  2. Using your graphics card might cause it to fail, the fact that if failed while you were doing Unreal is just the luck of the draw. The reason you don't see CryEngine posts about graphics cards, is probably because of sheer numbers, Unreal is everywhere, CryEngine is...almost nowhere. (Or maybe CryEngine users are less likely to blame a software program instead of the the hardware or driver.) EDIT: Or...just do a search for Crysis killed video card, I see lots of entries. https://www.gamespot.com/forums/pc-mac-linux-society-1000004/crysis-killed-my-graphics-card-26123086/ http://www.pcgamer.com/crysis-blew-my-pc-up-and-taught-me-a-valuable-lesson/ http://forums.whirlpool.net.au/archive/848964
  3. Idiot friendly point & click engine

    Haven't really looked, but it seems like there are lots of options. This one is the first engine that pops up on a google search and is free and requires zero coding skills: http://age.seccia.com/
  4. Learning UniRX

    Here's another set of slides that I found helpful as well, I think I like it better for it's small concrete examples. http://slides.com/sammegidov/unirx#/
  5. how get over this feeling?

    Go work in the industry for a while? See how the professionals code? Learn a bunch, either stay or leave and do your own thing after that. Plenty of the successful indies out spent years honing their craft on AAA titles.
  6. Learning UniRX

    So, it's been a while, but @Eck posted, and it inspired me to do a post as well. I tend to code in spurts when something interests me. And I get distracted easily. I came across UniRX as a possible solution to the doldrums of writing event systems and doing SendMessage all over the place, and then decided to learn it by just starting a game from scratch with it. And using it everywhere, even if it might not be the best fit, just to see what it could do. What's UniRX? Well here's a small presentation, and here's a link to the github. So, the game? A simple RTS, a much simpler version of that turn based tank game that's forever on the back burner. So the short version Mech Commander, with Tanks instead of Mechs. Let's start with our PlayerController, it basically does two things, unit selection, and sending commands to the selected unit. public class PlayerController : MonoBehaviour { UniRx.ReactiveProperty<Controllable> _selectedObject = new ReactiveProperty<Controllable>(); void Start () { LeftClicks().Subscribe(p => { RaycastHit hit; GameObject go = null; if (Physics.Raycast(Camera.main.ScreenPointToRay(p), out hit, unitLayer)) { go = hit.collider.gameObject; } _selectedObject.Value = go ? go.GetComponent<Controllable>() : null; }); RightClicks().Where(_=> _selectedObject.Value != null).Subscribe(p => { RaycastHit hit; GameObject go = null; if (Physics.Raycast(Camera.main.ScreenPointToRay(p), out hit)) { go = hit.collider.gameObject; if(go.GetComponent<Targetable>()) { if (go != this.gameObject) { _selectedObject.Value.CommandStream.SetValueAndForceNotify(new AttackTargetCommand(go)); } } else { _selectedObject.Value.CommandStream.SetValueAndForceNotify(new MoveToCommand(hit.point)); } } }); } public IObservable<Vector3> LeftClicks() { return Observable.EveryUpdate() .Where(_ => Input.GetMouseButtonDown(0)) .Select(_ => Input.mousePosition); } public IObservable<Vector3> RightClicks() { return Observable.EveryUpdate() .Where(_ => Input.GetMouseButtonDown(1)) .Select(_ => Input.mousePosition); } Okay, so on a basic level, each unit has a Controllable component that is fairly simple, it's basically just a ICommand queue public class Controllable : MonoBehaviour { public UniRx.ReactiveProperty<ICommand> CommandStream = new ReactiveProperty<ICommand>(); public IObservable<GameObject> LatestTarget() { return CommandStream.Where(cmd => cmd is AttackTargetCommand).Select(cmd => ((AttackTargetCommand)cmd).Target); } } And then we have optional components that look at that command stream, like Moveable and Turret. Lets look at Moveable first, it's really simple at the moment. [RequireComponent(typeof(NavMeshAgent))] public class Moveable : MonoBehaviour { void Start () { MoveCommandStream().Subscribe(p => this.GetComponent<NavMeshAgent>().SetDestination(p));} private IObservable<Vector3> MoveCommandStream() { return this.GetComponentInParent<Controllable>().CommandStream.Where(cmd => cmd is MoveToCommand).Select(cmd => ((MoveToCommand)cmd).Position); } } The turret is a little more complicated public class Turret : MonoBehaviour { IDisposable rotateTowardsSubscription = null; void Start () { this.GetComponentInParent<Controllable>().LatestTarget().Subscribe(target => { if(rotateTowardsSubscription != null) { // Stop any rotations rotateTowardsSubscription.Dispose(); rotateTowardsSubscription = null; } if (target != null) { rotateTowardsSubscription = EveryUpdate().Subscribe(x => { if (target != null) { RotateTowards(target.transform.position); } }); } }); } private RotateTowards() {} // not showing this for brevity's sake, and I'm cheesing it at the moment anyway } And then the WeaponMount which does the actual firing, with a bunch of non-uniRX code culled out, I abstracted it out into separate components for multi gun turrets, or fixed guns, etc, as well as code clarity. public class WeaponMount : MonoBehaviour { [SerializeField] float ReloadTime = 1.0f; BoolReactiveProperty weaponLoaded = new BoolReactiveProperty(false); IDisposable fireSubscription = null; void Start () { this.GetComponentInParent<Controllable>().LatestTarget().Subscribe(target => { // Stop any fire subs if (fireSubscription != null) { fireSubscription.Dispose(); fireSubscription = null; } if (target != null) { fireSubscription = EveryUpdate().Where(_ => CanFireAtTarget(target)).Subscribe(_ => Fire()); } }); weaponLoaded.Where(loaded => loaded == false).Delay(TimeSpan.FromSeconds(ReloadTime)).Subscribe(_ => weaponLoaded.Value = true); } What's interesting is just how different the code looks from standard Unity code, even coroutine code (Though that's perhaps the closest). I started to really enjoy it once I managed to wrap my mind around it, it's a rather small amount of code to select, move and attack with units. Once I'd built up my vocabulary of Linq-like syntax, it makes it very easy to see whats going on and do things like the weapon reload, which is just one line. Minor quibble: I do wish Unity had greater C# version support, I want to do foo?.Dispose() and be done with it already.
  7. Missile Command Challenge

    Ah, I never played Car Wars tabletop, though I did buy a copy of the rules not too long ago. It looks like it might be a little complicated to implement as a video game, should be a good challenge to make it flow well. I need to get off my duff and at least post about my adventures learning UniRX. Maybe I'll try pivoting over and doing Missile Command using it. EDIT: Also Grrrr, not being able to shoot through your own explosions was annoying! =)
  8. Missile Command Challenge

    Nice, I have to admit, I was tempted to get in on this challenge, as someone who played lots of Missile Command, but got distracted by the holidays. Whats this about a Car Wars prototype? I feel like we need a blog post about it =)
  9. Yeah, I don't believe Unity has ever used Flash / Scaleform for it's UI. I believe the original linked article was only mentioning that there was plugin support for it. Probably still is something on the Asset Store for it.
  10. It's more goofy to me imagining why someone would put legs or arms on a giant armored vehicle at all =)
  11. Have you played Robocraft? It has a good deal of these locomotion types. Their hover is a pain to keep stable, easily tipped over, which makes for fragile craft if they take damage. Turn radius might be a problem too. Legs can turn in place, wheels, not so much. Even treads can't really turn in place easily.
  12. The Rework Begins

    What was the blunder? It helps letting others avoid the same pitfalls.
  13. Components and Messages in Unity

    I do wish Unity had a better model for events built-in. Having to use strings is error prone and cumbersome. Have you looked a UniRX at all? I'd be curious to see how it compares with your other numbers.
  14. You could also use them subjectively. Ie, for AoE attacks, don't bother showing a confirmation unless they are going to hit either nothing or a friendly, and warn accordingly. And then on top of that you can always do the checkbox with "Don't show these confirmations in the future" in that same prompt. That can mitigate it somewhat, giving things a tutorial like, hand holding feel the first time, but quickly speed up once the player has decided they don't need it anymore.
  15. Unity or Unreal engine

    Try both? Go through a couple of tutorials for each, see which clicks with you better. (Also, if you can find tutorials that directly relate to what you want to build ..that can help tremendously)
  • Advertisement