Playmaker Forum

PlayMaker News => General Discussion => Topic started by: Red on June 17, 2012, 08:37:45 PM

Title: Starting a Youtube Channel
Post by: Red 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
Title: Re: Starting a Youtube Channel
Post by: Red 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.
Title: Re: Starting a Youtube Channel
Post by: pustur on June 20, 2012, 04:01:31 PM
interesting! i subscribed even before seeing the first video ;)
Title: Re: Starting a Youtube Channel
Post by: Alex Chouls on June 20, 2012, 09:03:52 PM
Great tutorials!! ;D
Title: Re: Starting a Youtube Channel
Post by: artician on June 21, 2012, 09:49:10 PM
Very Nice!!
Title: Re: Starting a Youtube Channel
Post by: Red 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.
Title: Re: Starting a Youtube Channel
Post by: artician 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!
Title: Re: Starting a Youtube Channel
Post by: Red 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.
Title: Re: Starting a Youtube Channel
Post by: artician 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.
Title: Re: Starting a Youtube Channel
Post by: Red 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.
Title: Re: Starting a Youtube Channel
Post by: artician 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? 
Title: Re: Starting a Youtube Channel
Post by: MkAndersson on June 22, 2012, 09:28:44 AM
Great! Thanks for sharing, will check them out. Bookmarked!
Title: Re: Starting a Youtube Channel
Post by: Red 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.
Title: Re: Starting a Youtube Channel
Post by: MkAndersson 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.
Title: Re: Starting a Youtube Channel
Post by: Red 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.
Title: Re: Starting a Youtube Channel
Post by: Uttpd on June 25, 2012, 10:02:54 AM
great initiative!
Only saw a few, already downloading the lot. AI is a great addition to playmaker tutorials

Im on my way to "build" a character controller using  mouse input. I´v only found a controller tutorial from Huton dealing with keyboard input. Strangely none of the tutorials deal with  mouse, look at, move to, smooth etc.. so if your planning doing one, give me a heads up or point in the direction.
Thanks for your work.
Title: Re: Starting a Youtube Channel
Post by: artician on June 25, 2012, 10:09:41 AM
That's good to know!  I actually avoid monodevelop as much as possible.  Bloated, slow and crashes my editor quite frequently, so I always uncheck it when installing now. 

Also: Sorry for hijacking your thread.  :(

Title: Re: Starting a Youtube Channel
Post by: Red on June 25, 2012, 03:26:37 PM
great initiative!
Only saw a few, already downloading the lot. AI is a great addition to playmaker tutorials

Im on my way to "build" a character controller using  mouse input. I´v only found a controller tutorial from Huton dealing with keyboard input. Strangely none of the tutorials deal with  mouse, look at, move to, smooth etc.. so if your planning doing one, give me a heads up or point in the direction.
Thanks for your work.

good to hear you're excited... but to be clear, i would ask that you do not repost them to either youtube or other sites. If you have a good connection, feel free to watch them as well...

to be completely frank, i'm hoping that these can generate a little bit of extra income since right as of this point, my finances are not in the best of shape. it kinda goes with the territory of being freelance... sometimes you have to scrounge when you're in between contracts. so, i'm hoping that this can be built to supplement my meager income.

this economy kinda sucks so you have to find ways of making money when you can... and this is a legit way of doing so... at least until my game launches (which is still a ways away.)
Title: Re: Starting a Youtube Channel
Post by: Uttpd on June 25, 2012, 04:27:42 PM
no worries, totally understand you
My connection is not reliable so I usually grab them while I can. Will try to watch on the tube.
Title: Re: Starting a Youtube Channel
Post by: Red on June 25, 2012, 05:54:00 PM
no worries, totally understand you
My connection is not reliable so I usually grab them while I can. Will try to watch on the tube.

Cool! and thank you!

i don't have an issue with you DLing them though... i mean, my first priority is trying to share what i've learned so that users can also learn as well but i would be lying if i said it was only for the thrill of the hunt... heck, you never know... if it gets as big as BergzergArcade, i might be able to drop the freelancing and spend more time making my games *shrugs* but i guess time will tell.

that being said, chapter 1 of the AI tutorial is done now and uploaded. 10 eps... next chapter i'm going to see about getting this AI from basic to intermediate... so, hoping to add in aggro management, waypoints for paths and if i can manage it i would love to add in a pathfinding algorithm system... but i admit i'm learning as i go and i am not an expert.
Title: Re: Starting a Youtube Channel
Post by: jeanfabre on June 26, 2012, 06:23:00 AM
Hi Red,

 Thanks you for all the work you are doing!

Can I put a page up on the user wiki to reference your videos?

 bye,

 Jean
Title: Re: Starting a Youtube Channel
Post by: Red on June 27, 2012, 09:55:16 AM
Hi Red,

 Thanks you for all the work you are doing!

Can I put a page up on the user wiki to reference your videos?

 bye,

 Jean

Sure! if it can help users learn how to harness playmaker i'm all for that.
Title: Re: Starting a Youtube Channel
Post by: brendang on June 27, 2012, 09:42:42 PM
Red,

These are terrific.  You have a great ability to communicate and introduce important concepts in a clear well paced fashion.  You're clearly talented and well versed in Unity and PLaymaker.  I have no doubt you'll see good things from this wonderful initiative.

best,
Brendan G.
Title: Re: Starting a Youtube Channel
Post by: tbelgrave on October 09, 2012, 12:10:00 PM
Cheers for this awesome thread Red, and your contribution artician, I'm now thinking of a mix of the two methods. Playmaker has been a boon for me in large part the contributions from this community. Hope you keep going Red.
Title: Re: Starting a Youtube Channel
Post by: gamedivision on October 09, 2012, 02:31:16 PM
i just have to say what an amazing job your doing,and im looking forward to your future tutorials,ive already subscribed to your youtube channel.

thanks
Title: Re: Starting a Youtube Channel
Post by: mickman on November 17, 2012, 03:58:46 PM
I gotta admit I've watched your vids over & over & over...  so much to learn here

Awesome Job....    Thanks a million   :)

Title: Re: Starting a Youtube Channel
Post by: Red on November 27, 2012, 10:58:51 PM
Thank you for all the positive vibes!

also, Just a head's up, another tutorial series is being made and the first few videos have been posted.

this series covers how to create a system to control a third-person perspective camera so as to give you the ability to control the shot composition of the game you're playing and to give a little bit more visual appeal... and a teleporter (because that kinda needs a bit of camera trickery to pull it off... but that one is going to be posted tomorrow... it's late here and i am tired. :P)

-Third Person perspective camera control system with cinematic trigger points.