playMaker

Author Topic: Starting a Youtube Channel  (Read 15295 times)

Red

  • Hero Member
  • *****
  • Posts: 563
Starting a Youtube Channel
« on: June 17, 2012, 08:37:45 PM »
http://www.youtube.com/user/BadSeedGames

So, I would like to let people know that i've started a Youtube channel so that i can go over what i've learned and share what i have learned with others.

More videos are planned but i would like to ask if there are any questions that you would like answered, feel free to ask. If you have a practical question as to how to do something specific, if it is within my ability to do so, i will give it the good old try.

feel free to ask them here or on the channel wall, whichever you feel is easier for you. if/when i've gotten a solution, i'll post it for you. I think this is also a good learning experience for myself since it'll help me to discover things that Playmaker can do in the process.

note, i'm not going to try and take the wind out of other people's sails so if i know of a tutorial that covers something you're asking about that someone else has already done, i'll post their vid if i know about it.

-Basic Enemy A.I. system

-Intermediate Third-Person perspective Camera system
« Last Edit: November 27, 2012, 11:00:58 PM by Red »

Red

  • Hero Member
  • *****
  • Posts: 563
Re: Starting a Youtube Channel
« Reply #1 on: June 20, 2012, 03:38:36 PM »
Hey there, just going to give a bit of an update... i've been putting together a basic enemy AI system tutorial to help control an enemy character. i've gotten about 5 videos in so far and a couple more planned.

This is also a learning experience for me though too... but i'm hoping to have this series done in the coming week or so.

You can find the AI tutorial here:
http://www.youtube.com/playlist?list=PLCFBBA6A7A7BB34F8

future videos will cover integrating attacking sequences, health management, status management (such as buffs/debuffs/damage-over-time) and wiring it up to a monster spawning system.

pustur

  • Guest
Re: Starting a Youtube Channel
« Reply #2 on: June 20, 2012, 04:01:31 PM »
interesting! i subscribed even before seeing the first video ;)

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3998
  • Official Playmaker Support
    • LinkedIn
Re: Starting a Youtube Channel
« Reply #3 on: June 20, 2012, 09:03:52 PM »
Great tutorials!! ;D

artician

  • 1.2 Beta
  • Sr. Member
  • *
  • Posts: 318
Re: Starting a Youtube Channel
« Reply #4 on: June 21, 2012, 09:49:10 PM »
Very Nice!!

Red

  • Hero Member
  • *****
  • Posts: 563
Re: Starting a Youtube Channel
« Reply #5 on: June 21, 2012, 11:05:41 PM »
Thank you for the support!

i'm going to keep going with the AI tutorial and i'm going to see how far i can go with it.

admittedly, it's a learning experience for myself as well... but hopefully i can come out of this with a better understanding so as to make my own game-dev experience much better.

artician

  • 1.2 Beta
  • Sr. Member
  • *
  • Posts: 318
Re: Starting a Youtube Channel
« Reply #6 on: June 21, 2012, 11:12:07 PM »
I just watched your AI series.  It's very good.  I created my own AI several months ago, so it's refreshing to see how someone else works.  I was curious about your approach.  I didn't use any raycasting because it can get so expensive and I want to avoid that, so instead I used multiple triggers for AI player-detection.  Both check for collisions on every frame, so I'm wondering if I chose the right path.  Thoughts?

Either way, looking forward to watching the rest of your videos, and any new ones you post up.  I wanted to do the same when I started my PlayMaker/Unity experiments, but I thought the overhead for recording, narrating and encoding tutorials was too much for me. 

Curious how much development experience you have, and where you're located in the world. 

Cheers!

Red

  • Hero Member
  • *****
  • Posts: 563
Re: Starting a Youtube Channel
« Reply #7 on: June 21, 2012, 11:30:22 PM »
I just watched your AI series.  It's very good.  I created my own AI several months ago, so it's refreshing to see how someone else works.  I was curious about your approach.  I didn't use any raycasting because it can get so expensive and I want to avoid that, so instead I used multiple triggers for AI player-detection.  Both check for collisions on every frame, so I'm wondering if I chose the right path.  Thoughts?

Either way, looking forward to watching the rest of your videos, and any new ones you post up.  I wanted to do the same when I started my PlayMaker/Unity experiments, but I thought the overhead for recording, narrating and encoding tutorials was too much for me. 

Curious how much development experience you have, and where you're located in the world. 

Cheers!

That's actually a good question but i don't think i'm the best person to ask... my technical expertise when it comes to the deeper knowledge of CPU cycles and the overall cost of using this sort of AI system is actually rather shallow. granted, i do fully intend to put this through a massive stress test because the game that i'm working on currently will hopefully have 100+ enemies on screen at any given point and i am hoping to make it capable of being run on a netbook (not doing an iDevice/Android implementation for this one.)

maybe it's something to consider? if you could put your AI system together and see how far you can push it we can maybe collaborate to do a "which one is better for your needs" kinda deal. if you have screencasting software, i would strongly suggest putting together a tutorial and posting it. the more solutions that the users of Playmaker have access to, they'll be able to make a more informed decision as to which systems would be more suited to their needs.

artician

  • 1.2 Beta
  • Sr. Member
  • *
  • Posts: 318
Re: Starting a Youtube Channel
« Reply #8 on: June 21, 2012, 11:54:47 PM »
I don't know if I can provide a screencast yet (what do you use?  Camtasia?), but I will try to put together a test of my AI as it is.  Currently I'm roughly at the same stage you left off your test in video 7, but am using a CharacterController for locomotion (I think you just used MoveTowards, didn't you?), and have expanded on the presentation much more to include animations, full stats and combat effects, and animated meshes and whatnot.  Otherwise it's roughly the same.  I want to update it eventually with 'breadcrumb' style player-tracking, and *maybe* pathfinding at some stage, but not for the project I'm currently implementing it in.

I think, and Alex or Jean or someone who is also more experienced than I am with the technical side of things, might be able to chime in about this, but I *do* think you're going to have major issues with 100 characters running around all casting rays at the player simultaneously. 

But I like the idea of comparing notes; that's mainly why I commented on the thread, because you're essentially doing the same things I've been doing for roughly a year now, and I felt like we could share stories.  I'll see about setting up a scene with a large number of enemies and share it, but it might be a while until I can.

Red

  • Hero Member
  • *****
  • Posts: 563
Re: Starting a Youtube Channel
« Reply #9 on: June 22, 2012, 12:18:44 AM »
yeah, i've been using camtasia. it's okay, does what i need it to do.

and the raycasting, just did a test by cloning about 60 enemies... yeah, the FPS took a major hit. so, i may have to work on the ai system to see about including an "if off screen/player is more than X units away" condition to turn off the radar... i think that's do-able... i'll have to work that into the series.

and yeah, it's just using move-towards.

the breadcrumb might help address a concern that i've been dreading... because though the enemies in the tutorial are pretty stupid and a little bit of intelligence added would certainly help.

artician

  • 1.2 Beta
  • Sr. Member
  • *
  • Posts: 318
Re: Starting a Youtube Channel
« Reply #10 on: June 22, 2012, 12:29:42 AM »
Okay, good to know.  I've been warned about raycasts being heavy in the past, so I generally try to find workarounds that are as easy going as possible. 

What I did, which isn't too much of a change to your system, was instead of using raycasts, use a large (32m in diameter) trigger volume, which I call the "radar" volume, that follows the enemy around.  Anytime the player enters the volume, the enemy begins keeping track of the distance to the player (but remains in the idle/non-combat state for the time).  If the player gets >Xm from the enemy, the enemy switches to an "assessment" state, and decides to do from there (some run away, or some will chase the player and attack when at another specified range).
I have a second volume within the radar volume which is my "sight" volume.  If the player enters the sight volume, it acts like your raycasting setup, and the enemy immediately enters it's "assessment" state regardless of player distance.

Regarding the breadcrumb system, what I was going to do was basically have a single breadcrumb as a child of each enemy.  When the enemy is tracking the player within the sight volume, the breadcrumb object follows the player around.  Once the player moves out of range (or sight, but even I may need raycasts for that!) the breadcrumb object remains where the enemy last saw the player, and the enemy enters a "search" state.  The enemy will proceed to the breadcrumb, and then look around for the player.  The rest is more or less self-explanatory.

If you do use that approach, and you have to use raycasts for line of sight detection anyway, maybe you can use the raycast as a secondary system, instead of always being active.  That way your AI is only casting when in the players immediate vicinity? 

MkAndersson

  • Guest
Re: Starting a Youtube Channel
« Reply #11 on: June 22, 2012, 09:28:44 AM »
Great! Thanks for sharing, will check them out. Bookmarked!

Red

  • Hero Member
  • *****
  • Posts: 563
Re: Starting a Youtube Channel
« Reply #12 on: June 22, 2012, 02:24:40 PM »
Okay, good to know.  I've been warned about raycasts being heavy in the past, so I generally try to find workarounds that are as easy going as possible.  

What I did, which isn't too much of a change to your system, was instead of using raycasts, use a large (32m in diameter) trigger volume, which I call the "radar" volume, that follows the enemy around.  Anytime the player enters the volume, the enemy begins keeping track of the distance to the player (but remains in the idle/non-combat state for the time).  If the player gets >Xm from the enemy, the enemy switches to an "assessment" state, and decides to do from there (some run away, or some will chase the player and attack when at another specified range).
I have a second volume within the radar volume which is my "sight" volume.  If the player enters the sight volume, it acts like your raycasting setup, and the enemy immediately enters it's "assessment" state regardless of player distance.

Regarding the breadcrumb system, what I was going to do was basically have a single breadcrumb as a child of each enemy.  When the enemy is tracking the player within the sight volume, the breadcrumb object follows the player around.  Once the player moves out of range (or sight, but even I may need raycasts for that!) the breadcrumb object remains where the enemy last saw the player, and the enemy enters a "search" state.  The enemy will proceed to the breadcrumb, and then look around for the player.  The rest is more or less self-explanatory.

If you do use that approach, and you have to use raycasts for line of sight detection anyway, maybe you can use the raycast as a secondary system, instead of always being active.  That way your AI is only casting when in the players immediate vicinity?  

I may have to see about trying something similar (of course i'll give credit where it's due.) mainly because i gave it a stress test with about 50 enemies (all clones) and it gave me a fatal error crash... something about too many heap stacks? been googling that and if what i'm reading is correct, it's a flaw in monodevelop i think... and other unity users have seen it happen. not sure why it's crashing but i'm going to see about adding a chapter for optimization. things like adding in delays so the raycasts aren't firing every frame and adding in a condition where if the player is X units away, it disables the AI systems.

but at the least i am learning quite a bit from this venture.
« Last Edit: June 22, 2012, 03:57:06 PM by Red »

MkAndersson

  • Guest
Re: Starting a Youtube Channel
« Reply #13 on: June 23, 2012, 04:52:12 AM »
My AI is nothing fancy and only uses distant check between the player and itself and through that determines which state to be in. I optimized that by disabling the distant check if the player leaves the AI patrol area.
If the AI chases the player and the player leaves the area the AI stops and waits for a while then moves back to last position it had when it got aggroed. I use that to prevent kiting. Though downside with that is that you need to place the ends at a logical place so the player can't stand outside the area with the enemy close to it and it doesn't do anything.
« Last Edit: June 23, 2012, 04:59:39 AM by aegget »

Red

  • Hero Member
  • *****
  • Posts: 563
Re: Starting a Youtube Channel
« Reply #14 on: June 23, 2012, 04:20:33 PM »
Okay, did a development build and it seems that the fatal error is only when i'm previewing it in unity. i've filed a bug report but research is telling me that it's from monodevelop, not unity nor playmaker's issue. just a head's up.