I have made some games in the past, some were completed while others still sit with no promise of going forward. My wife suggested that I make a bible game. I informed her that most bible games suck due to the constant quizzes and bad music. I didn’t want to make one. I made her a deal, if I started the game and it looks promising, then I would continue in my spare time. But the music, quizzes and (most important) the gameplay must all work. She has agreed with my demands.
So, I began this little game. My unity project file became known as Project Moses. After a few days of tinkering with code and other ideas, I started a new project file called Exodus.
Now I did my research for level design and character models, even whether it would be realistic or low poly. I even went and watched youtube (most notably AVGN) and read articles of what bible games were worthy of playing and what was not. I found that only 2 bible games have ever been considered worthy. Those games were Spiritual Warfare(NES) and Left Behind(PC). One is a Zelda clone and the other is a simple RTS.
My problem is how do you make a game currently without some element being a clone of something. So I did what I could to avoid cloning other games, but the more I make this game, I am noticing elements of other games. Will some things change as I go? Most definitely. In fact, if you watch the videos, you will see some changes.
Please make comments and ideas or even the dreaded crit.
Enjoy!
Every game is going to be similar to some other game, there’s no way to avoid that, and just because bible games were bad in the past doesn’t mean yours has to be. In fact, it’s a good thing since yours could be one of the few good ones!
I like the aesthetics, thought the ground and grass looks a bit inconsistent with the other objects in your final video.
It looks quite difficult and finicky to aim the attacks, are you thinking of adding lock on targetting or a crosshair of some sort?
Also what platforms are you intending to release on?
One more thing, don’t dread critisism, getting honest criticism is one of the most valuable things when developing a game. It’s difficult to see your games downfalls when you’ve gotten use to them and adjusted for them. Fresh eyes will see the issues in your game and you need to embrace those opinions early on rather than showing everyone your completed project and being overwhelmed with the amount of critiques changes that are requested.
Thank you Serinx!
Yes, the ground textures are just place holders at this time. Pretty much all of the models are place holders with the exception of the character models. This level is just a setup level. I just got tired of seeing a gray texture and began adding textures as I needed for an idea for an area and design.
I have though about a target lock, but I have yet to implement it.
My plan is to release for the Xbox One, PC, web and possibly android. Xbox and PC for sure.
Small update!
Added animal AI. Basically they just wander around within a certain area.
Added the ability to pickup and carry objects when player is close to them.
Currently having a problem with the script for carrying. I want to enable the particle system, but it doesn’t want to. I am asking for a little help on that one here.
I had a little time last night to work on this. I tried to make some improvements in certain areas, but it caused another issue I wasn’t able to fix last night.
Updates:
Added a chicken model with animations. This seems to work okay, but sometimes has an issue when trying to drop. You can see in the video the issues.
Added a sheep model that roams around. The script needs some work as I would like to edit random animations for sleeping, grazing and other animations.
Fixed issues with chicken script, where the feathers turn on and off. Also fixed input.getbutton to work while using the script. This caused an interesting issue later. I will need to fix this. I think I need to add a function that checks where the chicken is so the problem doesn’t happen again. Tried to make a function to throw the chicken, but that was a fail. Might come down to another approach on how to do the same idea. I will attach the code at the bottom of this post if someone might see an alternative solution.
Started an idea for a quest template. That old find my chickens and put them where I say idea.
They are not seen, but made quite a few NPCs with interchangeable textures and animations, along with other animals that will be needed in the game. Also created a few Easter eggs to be shown in the game. I know that it is not needed, but I wanted them. To me it added something to the game. Nothing like GTA:VC Easter egg.
Something else I added, but doesn’t seem to work well is a targeting system. It was suggested and I tried to add it, but it was a fail. I will have to look into a new system. I would like to have one similar to Zelda 64(clone), but an unique one. I made one in the past, but it didn’t translate to well into unity 2017 very well. Might just be a coding error or something else.
Pretty much all I have done in this day build. I think alot of the problems I am having is trying to make the whole game work with the xbox controller. I do wish to make this an xbox game so I am trying to give it better controls than the PC. PC controls work great, but I always run into a little lag or input problem with the controller. For now everything I have done is working okay and is functioning except for FirstSelected when using UI.
Enjoy the videos!
One problem I see is that in your “drop” code you are changing the values for “agent” and “item” so that these are no longer attached to your character- so you are assuming that “agent” and “item” are pointing to the specific object that you are carrying. This may not be the case, though, because you have an onTriggerEnter code which is assigning a new value to “item” and “agent”. That means the item you are trying to drop may not even be the item that you are carrying. It could just be a different item that you walked close to.
I see some of my problem. How do I check if another game object with the same tag? Basically the trigger is there to identify the gameobject and then allow the interaction, but when two with the tag are to close, the item returns null. I am not seeing how to remove an item that has been removed because of the tag check is not there.
THe most obvious fix to the problem that I mentioned is to replace “item” with two variables: One for the item you are holding (set it only when you pick-up an item), and another one that you use for the onTriggerEnter.
As for the nav mesh agent: there is no need to have a reference to it until you actually pickup the item (where you disable the agent). Simply remove the assignment of “agent” from the onTriggerEnter and put it in the Pick-up code instead.
I’m not exactly sure why that would be, except it’s probably something to do with the way that you are using onTriggerEnter and onTriggerExit.
One thing to consider: What if you have two chickens that you can pick up (we’ll call chicken A and chicken B) and the player wants to walk past chicken A and pick up chicken B. you first get close to chicken A and it triggers onTriggerEnter, setting “item” to chicken A. Then you inch on over to chicken B, which triggers onTriggerEnter, setting “item” to chicken B. Now chicken A and chicken B are both within the players trigger collider, but the player is still trying to get closer to chicken B and is walking away from chicken A. Walking away from chicken A triggers the onTriggerExit event setting “item” to null. Now the player is standing right next to chicken B, but he can’t pick-up the chicken because “item” is set to null.
Yes that would be my issue. Trying to set the holding, but it is not working like it needs to. Might be a dumb question here, but how do I set the holding in the pickup?
I’m not supposing that this is the best way, necessarily, but here is an alternative way to implement grab-and-carry that might simplify things (back up your original code in case this doesn’t work):
get rid of the onTriggerEnter and onTriggerExit events entirely.
In your Update, check for if(Input.GetButtonUp("Fire1")) like you are doing now, but when the player presses the button use something like Physics.OverlapSphere, using your guide and range variables for the sphere parameters. This will give you an array of all the objects with colliders that are in that sphere.
loop through the array and simply set “item” to the first object that has the right tag and call your pick-up method. Break the loop upon returning so that you don’t pick-up any more objects.
Using the overlap sphere, you can check collisions instantaneously, without having to kepp track of what’s coming in to range and what’s leaving.
I was able to fix the script from leaving the chickens in mid air. Using the overlapSphere I was able to get the chickens to do what I needed. Now to the next issues.
I like it so far. Visually is very nice I think. And it’s great to see you creating a game based on (I guess) a story from the Bible. I have thought many times about making some Bible/Christian-based games. Never got around to it yet but anyway still think it is cool to see you making one. I put a Watch on this thread to follow along.
Oh and yes your game will definitely share some things with others. And that’s probably better to have things people understand and then add just enough innovation and personality to make the game stand out for that. A lot of that should just happen on its own unless a person is outright copying another game. And with you actively looking for ways to innovate you should be fine.
In this update I was able to fix a few issues with the controls and some of the scripts. I also added a random audio for the animals and set a distance in which the player can hear them. Just for fun I added a quest system, although it still needs some spit and polish, it seems to work well. I did see some issues during this last test, but shouldn’t be a problem to fix.
Next I would like to implement a good targeting system, a few more weapon upgrades, a mini boss, a big boss, a vendor system, a better controller system and a sneaking mechanic. All of these things will be used in some form or another.
I have a targeting system now, but it is not going the way it was planned. Sometime ago I made this targeting system, never really finished it. Did some playing around with it tonight, but I can’t seem to get it to only target within range or within the screen view. Without a range it finds all enemies and will target anywhere on the map. So I disabled the current enemy AI and added some wood dummies for testing.
Also tried to get the player to do a little z tracking when locked on, but I was only able to get the player to look at the target. This part is done in a few tutorials, but to me a rough code and not really more than a test to see if it could be done. One tutorial I tried would have required a complete rewrite of all my code I currently have working. So I am hoping to fix that. With some pointers in the right way to go.
What I need the code to do:
To only target enemies within a certain distance of the player.(currently targets all enemies)
The player to rotate around enemies when locked on.(currently player only looks at target)
Remove target as a potential after being dealt with.(currently states that gameobject is missing)
Lastly, remove enemy targets if the player leaves range.(currently holds all enemies)
Below is the target lock script. I know that Burgzerg arcade is the biggest contributor to this code the rest is me.
TargetLock Code:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class TargetLock : MonoBehaviour
{
public List<Transform> targets;
public Transform selectedTarget;
public GameObject player;
public Image image;
Camera cams;
public float Speed = 1.0f;
public float radius;
private Transform myTrans;
void Start ()
{
targets = new List<Transform>();
selectedTarget = null;
myTrans = transform;
cams = Camera.main;
Collider[] colliders = Physics.OverlapSphere(transform.position, radius);
foreach (Collider nearbyObject in colliders)
{
if (nearbyObject.gameObject.tag == "Enemy")
{
AddEnemies();
}
}
}
public void AddEnemies()
{
GameObject[] go = GameObject.FindGameObjectsWithTag("Enemy");
foreach(GameObject enemy in go)
AddTarget(enemy.transform);
}
public void AddTarget(Transform enemy)
{
targets.Add(enemy);
}
private void SortByDistance()
{
targets.Sort(delegate (Transform t1, Transform t2)
{
return (Vector3.Distance(t1.position, myTrans.position).CompareTo(Vector3.Distance(t2.position, myTrans.position)));
});
}
private void TargetEnemy()
{
if(selectedTarget == null)
{
SortByDistance();
selectedTarget = targets[0];
}
else
{
int index = targets.IndexOf(selectedTarget);
if(index < targets.Count - 1)
{
index++;
}
else
{
index = 0;
}
Deselected();
selectedTarget = targets[index];
}
Selected();
}
private void Selected()
{
selectedTarget.GetComponentInChildren<Renderer>().material.color = Color.red;
myTrans.LookAt(selectedTarget);
//image.transform.position = cams.WorldToScreenPoint(selectedTarget.position);
}
private void Deselected()
{
selectedTarget.GetComponentInChildren<Renderer>().material.color = Color.white;
}
void FixedUpdate()
{
if(Input.GetButtonDown("Fire3"))
{
//image.enabled = true;
TargetEnemy();
}
if(Input.GetButtonUp("Fire3"))
{
//image.enabled = false;
Deselected();
}
}
private void OnDrawGizmosSelected()
{
Gizmos.color = Color.green;
Gizmos.DrawWireSphere(transform.position, radius);
}
}
In Start you are using OverlapSphere to find enemies within range, but when you call AddEnemies, it’s doing this: GameObject.FindGameObjectsWithTag("Enemy"); so you’re actually adding all of the enemies (multiple times, even) and that has nothing to do with the enemies in your overlap sphere. Maybe in your Start function, you meant to call AddTarget(nearbyObject); instead?