Recommended Posts

Alberth    9525

Start simple, make a monster that exists (and does nothing).

Then gradually expand things in small steps:

- let it walk around randomly

- let it detect the player nearby

- let the player know the monster found him/her (or maybe not, if you want to surprise the player)

- pop up in front of the player (or whatever it should do to scare you).

Share this post


Link to post
Share on other sites
KnowItAllGames    114
2 hours ago, Alberth said:

Start simple, make a monster that exists (and does nothing).

Then gradually expand things in small steps:

- let it walk around randomly

- let it detect the player nearby

- let the player know the monster found him/her (or maybe not, if you want to surprise the player)

- pop up in front of the player (or whatever it should do to scare you).

Yeh thats the thing you see im having trouble with the script to make it walk around randomly and making a jumpscare but i guess thats a whole other thing to work out

Share this post


Link to post
Share on other sites
Scouting Ninja    3963
41 minutes ago, KnowItAllGames said:

Yeh thats the thing you see im having trouble with the script to make it walk around randomly and making a jumpscare but i guess thats a whole other thing to work out

Walking is easy. If you use Unity then use a script to transform the location.

Next you should place waypoints on a level map, then by moving the monster using a script you target the waypoints. If it's a strait path then there will be no need for complex collision detection.

If you want more complex movement you need to read up on path finding. For your game the simple strait move will be enough.

Edited by Scouting Ninja

Share this post


Link to post
Share on other sites
KnowItAllGames    114
38 minutes ago, Scouting Ninja said:

Walking is easy. If you use Unity then use a script to transform the location.

Next you should place waypoints on a level map, then by moving the monster using a script you target the waypoints. If it's a strait path then there will be no need for complex collision detection.

If you want more complex movement you need to read up on path finding. For your game the simple strait move will be enough.

You see its set in a forest and i would like my monster to just wander the forest aimlessly until it gets in range of the player(Its not a huge forest)

Share this post


Link to post
Share on other sites
Scouting Ninja    3963

Check the Unity NavMesh for this, remember that when you downloaded Unity it also downloaded the manual and scripting guide. All these things you are looking for is explain in there; keep them open at all times while working with Unity.

 

Now when it comes to navigation meshes Unity is limited, however it has all you will need for a game like yours.

Share this post


Link to post
Share on other sites
Binkiklou    104

Do you have any code to show? Well, first thing did you do pathfinding? It will follow a path and you randomly generate a number for the path you want him to choose, if it see the player then you can make it automatically run to him or jump scare him or you can generate(again) a random number to tell if it has seen the player. If your code doesn't work I can fix it. 

Share this post


Link to post
Share on other sites
KnowItAllGames    114
1 minute ago, Binkiklou said:

Do you have any code to show? Well, first thing did you do pathfinding? It will follow a path and you randomly generate a number for the path you want him to choose, if it see the player then you can make it automatically run to him or jump scare him or you can generate(again) a random number to tell if it has seen the player. If your code doesn't work I can fix it. 

I've actually just created the NavMesh but im not sure how i get my creature to roam the NavMesh do you think you could help?

also what kind of code would you like me to show you?

Share this post


Link to post
Share on other sites
Binkiklou    104
Just now, KnowItAllGames said:

I've actually just created the NavMesh but im not sure how i get my creature to roam the NavMesh do you think you could help?

also what kind of code would you like me to show you?

Do you have code that you try to make it work? 

Share this post


Link to post
Share on other sites
KnowItAllGames    114
6 minutes ago, Binkiklou said:

So you need help? Send me what you did and I'll try to finish it.

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class AIScript : MonoBehaviour {

	public float fpsTargetDistance;
	public float enemyLookDistance;
	public float attackDistance;
	public float enemyMovementSpeed;
	public float damping;
	public Transform fpsTarget;
	Rigidbody theRigidbody;
	Renderer myRender;

	// Use this for initialization
	void Start () {
		myRender = GetComponent<Renderer> ();
		theRigidbody = GetComponent<Rigidbody>();
	}
	
	// Update is called once per frame
	void FixedUpdate () {
		fpsTargetDistance = Vector3.Distance (fpsTarget.position, transform.position);
		if (fpsTargetDistance < enemyLookDistance) {
			myRender.material.color = Color.yellow;
			lookAtPlayer ();
			print ("Look at dah player");
		}
		if (fpsTargetDistance < attackDistance) {
			myRender.material.color = Color.red;
			attackPlease ();
			print ("Attack");
		} else {
			myRender.material.color = Color.blue;
		}
	}

	void lookAtPlayer(){
		Quaternion rotation = Quaternion.LookRotation (fpsTarget.position - transform.position);
		transform.rotation = Quaternion.Slerp (transform.rotation, rotation, Time.deltaTime * damping);
    }

	void attackPlease(){
		theRigidbody.AddForce (transform.forward * enemyMovementSpeed);

	}
}

This is my movement code for my creature and its all i have towards actually making it actually roam the NavMesh

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Similar Content

    • By Affgoo
      About us:
      We are a team of 14 developers developing multiple mid scope games both are over halfway complete. We polish all of our games and focus on quality.


      We are a small team, everyone currently on the team and future teammates must be interested in game development as a whole and not just one role, being a small indie company it is very important that you can wear a few hats and not just one. Everyone on our team is a game dev.

      looking for:
      3d Artist (hand painting a huge plus)
      3d Animator
      entry level Software engineer with reasonable skills in c# / shaders. 

      ^ requirement for all positions: A true love of game development and to be very self motivated.
      We are a very active team, you must be too. 


      If interested or for more information add me on skype: nicholas.boucher4


      Atlas Sentry art style: (art complete)(code complete)
      http://www.slidedb.com/games/atlas-sentry

      Rat n Gat art style: In Devlopment

    • By FunInfusedGames
      Description:
      Platinum Kill is a fast paced, run and gun shooter featuring lots of action, weapons, and a tongue in cheek sense of humor. It will feature six unique levels each with a challenging level end boss. The game features a chiptune soundtrack with a unique song for each level. The graphics will be a low res pixel art style. The game is playable with 1 to 5 player local co-op (4 gamepads and 1 keyboard player) and up to 4 AI players (limited to 5 real and AI players total).
      This game also features AI helpers that are unlocked when you reach kill streak milestones. These helpers are slightly intelligent characters that you play alongside you, giving you the illusion of playing with friends even if you're all alone. They stay with you until they die or your player is killed.
      Interested in feedback and anyone willing to playtest.
       

      The obvious comparison with Platinum Kill is going to be with Contra. Contra certainly is a big influence on this game (the original two NES titles mainly) but it is my hope that Platinum Kill can do enough different and better that it can stand on its own as not a copy but rather an envolution of the genre. There have been other entries in the genre since Contra and Super C, but I feel like those failed to really capture the excitement and pace of the original games. I want to recapture that as my starting point and layer improvements upon it. Think how the new Doom still feels like the original Doom games but then expands upon it.

      The original game this started as (see History section below) took about a month and a half to complete and I've been working on this version since January of 2017. I'm hoping I can complete this in the next 3 months but I'm bad at estimates and it'll probably end up taking way longer. I do all the programming and design myself and UI graphics and then contract out for in-game graphics and music.
      I want to talk about my game here, share what I am doing and gather feedback on how I can make the game better. If you want to playtest my game yourself and can use Steam on Windows, just drop me a line.

      Screenshots:
      http://www.funinfused.com/images/PK_SlimeMonster.png
      http://www.funinfused.com/images/PK01.jpg
      http://www.funinfused.com/images/PK02.jpg
      http://www.funinfused.com/images/PK04.png
      http://www.funinfused.com/images/PKBoss1Emoji.gif

      Videos (newest to oldest):
      https://www.youtube.com/watch?v=a1AYpxt4EC4
      https://www.youtube.com/watch?v=3OCgf9eaQgg
      https://www.youtube.com/watch?v=vtfCtKpu-l0
      https://www.youtube.com/watch?v=uXrLNczWMdQ
      https://www.youtube.com/watch?v=yzRybGbitH8
      https://www.youtube.com/watch?v=NyVwYudnXNw
      https://www.youtube.com/watch?v=Xl3fykqJ1c4&t=2s
      Engine:
      Custom built using C# and MonoGame.

      Platform:
      Steam (Windows). Maybe PS4 down the road.

      Game History:
      Platinum Kill started off as Ultra Aktion for XBLIG and later ported to itch.io. My hope was that I could do monthly releases of titles and be able to support myself as a full time indie dev. Because of the short timeframe, I did all the graphics using simple colored rectangles and instead focused on making the gameplay as fun as possible. To this end, I think I succeeded well, but in a flooded marketplace and even at just a dollar, Ultra Aktion didn't stand out. XBLIG, where I released it initially, was also near the end and had a plethorea of issues (such as the game showing up in new releases but not being able to be downloaded for over a week before Microsoft finally fixed the issue). After the itcho.io release, I placed Ultra Aktion in Steam Greenlight was the comment that if it got appproved, I'd turn it into a full proper game. Well it did and that's what I'm doing now.
      https://www.youtube.com/watch?v=9LAI7DURjaU

      Dev History:
      I'm the developer and founder of Fun Infused Games. My focus has always been on creating 2D old school styled games, games that I grew up playing and have a special place in my heart for. I started making games back in 2009 with XNA and released 8-9 games for Xbox Live Indie Games (XBLIG) over the next few years. After XBLIG folded, I tried a few other platforms, releasing one game on iOS (Hypership Out of Control) and two on Ouya (ugh, waste of time). For the past few years I have been doing Steam releases and have released improved versions of four of my XBLIG titles on the platform. I also have a PS4 dev kit and a mostly working version of one of my games, but I have since gotten distracted doing Steam games. One day I plan to get back to PS4 stuff and release an actual game there too.

      Links:
      Website - http://www.funinfused.com
      Twitter - https://twitter.com/funinfused
      YouTube - https://www.youtube.com/channel/UCtzFZwb1UhLKp8edddZbq8g
      Facebook - http://www.facebook.com/pages/Fun-Infused-Games/261073264705
      SoundCloud - https://soundcloud.com/user1903103
      Ultra Aktion on itcho.io - https://funinfusedgames.itch.io/ultra-aktion
      Current Steam Releases - http://store.steampowered.com/search/?developer=Fun Infused Games
    • By EvaBalikova
      Main menu in Feudal Alloy. 
      twitter
    • By BG109
      Hi guys!
      I would really appreciate some feedback and advice from you guys on the game I'm developing
      The game I'm working on is a 2D ARPG single/multiplayer using my own custom engine which is a 2D OpenGL engine inC++.
      The game have two distinct areas: outdoor world environments and dungeons. Right now I have reached a point where I'm starting to feel quite satisfied with the outdoor environments but the dungeons feel very lacking right now. Whereas the outdoor environments have at-least somewhat of a depth feeling to them the dungeons just feel... flat...
      I am not sure how to improve the graphics in the dungeon areas to get a bit more depth and/or vivid feeling. Outdoor was easier as I could play a bit with sun-shadows and parallaxing but I cant quite use that in the dungeons which is causing problems.
      I have posted a few images below on both the outdoor world and the dungeons for comparison as well as a small update trailer if you want to just get a feeling for the current dynamics of the game. Any feedback or ideas on how to improve upon the dungeons would be greatly appreciated. This is the first real game I have developed so I'm sure you guys have a lot of ideas I haven't really though about yet
       
      Best Regards BG109




       
      Trailer/Update Video:
      https://www.youtube.com/watch?v=aZthsgv1zPg
  • Popular Now