Oblivion Game in Unity Revised (First Demo Here)

Updated:
First Test Demo now available!

Walk, scenery, level change, and animation test…
Click below…
http://cppcomputerplace.webs.com/ObConcept_IKAnimation.zip

Please let me know if it works correctly, you shouldn’t have any problems.

Instructions
There is a zipped file with everything you need to play the demo. It’s 63mb, just extract it and that’s it! Sorry but this is the only way you can get the full effect of the demo. The web player just can’t handle it. Hope you guys don’t mind.

Read First Please
When you first start out it’ll lag a little bit until it loads (3 to 7 seconds), it’s a huge game give it some time to load. Plus when you go into the house same thing, it needs to load. Try to avoid having the player physically touch complex objects, for some reason it lags really bad. It’s a bug and I’m working on it. Now remember this is only an early test so it’s not perfect. You can walk cast spells swing the weapon, and jump, sadly no enemies yet. You can go into the first building to your left from where you first start out. The inside of the house is new tell me what you guys think. Suggestions are welcome!

Higher end computers:
Crank up the graphics up as high as they’ll go to get the full effect. There’s just something about full screen, 1600 x 900, on fantastic :slight_smile:

Lower end computers:
People with lower end computers, run it windowed with 1280 x 720 on fastest and you shouldn’t have a problem. Sorry lower end computers, but it doesn’t look nearly as good in low quality.

=====================================================================================================================================

Hello,
I don’t know if anyone remembers my last attempt with trying this monumental task of creating an Oblivion replica with Unity, but I’m trying again. (I only have the Indie version sadly)

This time I think it’s turning out much better. My last attempt I did not have any key elements for the game. It was basically a fps controller walking around showing off the buildings and lighting.

This time I took a great deal of time into trying to replicate Oblivion the best I could (Changing it somewhat so it’s not exact so it’s still my game). Although I’m only a fraction of the way done, I have the key game features of an Oblivion game which makes it pretty interesting and enjoyable to play. (Only problems is that it’s made with the Indie version)

I also took some programming classes so I was able to write me own scripts and alter ones that were already available.

Only problem is that I don’t have Unity Pro so I can’t have a polished look to my game. If I had Pro I think it would look incredible because I would have all the contrast and glow effects. I’m am slowly (very slowly) saving up for Pro…

Features:

  • Fully animated arm and shield motion
  • Walk cycle, idle cycle, spell casting, and attacking are all animated and rigged into the arm and weapon of the character.
  • Full cloud system that has clouds roll in and leave (An altered version of botumys’ script)
  • An altered version of the rain particle project with which I created an impressive snow system.
  • Custom made (By me) models that resemble Oblivions objects and buildings. (Except for Unity’s tree collection)
  • A health and magic bar system (Which for some reason the position of the health bar was changed?!)
  • 2 different kinds of spells (So far, plenty more to come)
  • Mountain regions with altered versions of Unity’s foliage with snow covered trees, bushes, and grass.
  • Altered versions of Unity’s trees; because Unity makes their trees 10 feet tall which are totally unrealistic.
  • Trees ranging from 30 to 60 feet tall (Like in Oblivion) which still look great.
  • Very detailed landscape with a lot of items placed by hand to give it a better look then generated or mass placed.
  • Sound effects including swinging sword, walking, and casting spells.
  • Vast map with multiple mountains
  • And many that I will release later.

There’s a few flaws, but not bad for a week and a half of work.

Screenshots below
Please tell me what you think, I’m still in the early stage of this and I haven’t decided if it’s going to be a free Unity project, or if I’m going to keep it.

Dang I wish I had Pro…Imagine this with Pro!

Thanks Hope to here some feedback

The screenshots were taken with the game only running in good quality.



More pics



Wow, that looks amazing. And Oblivion for Unity3d is great idea. I hope, it will also work on PCs with lower graphic power.

Is there a demo online available?

Looking great, just been replaying myself. If you told me it was an Oblivion SS, I would’ve believed you.

Alright…i NEED to try this, it looks amazing. Not sure if you want to but you can use the actual formulas from the game to figure out how much mana someone hows based on their stats, how hard you are to see, etc… you can find the formulas here: Oblivion:Oblivion - The Unofficial Elder Scrolls Pages (UESP)

You can find the formulas on the respective pages (Magic for magic power/mana)

Good Luck, make sure you keep us updated, and whenever you get around to releasing a demo make sure you tell me!

It is looking good. Do you have shadows baked in or lightmaps? (I couldn’t tell from shots). If not, get baking!

You mention not being able to get a nice look without pro. Well, apart from a bit of glow (which doesn’t guarantee it looking good, more than likely make it worse), there is nothing in those scenes that would need pro.

Honetly, shadows make all the difference and are easy enough to add even in Unity Basic.

Regards,
Matt.

Hey guys, thanks for the compliments and suggestions. And fallingbrickwork yes most of the stuff is lightmapped with 3ds Max. Only problem is that I’m not the best with it and I’m still new to lightmapping. Shadows never really show up or look that good. Plus I wanted to get the shadows baked onto the map. Shadows would make this look amazing.

And yes there will be a demo very soon. I wanted to have the house inside done before I did. It’s almost done but it’s just not to my satisfaction. You can walk into and out of one house so far. A lot of items in the houses have physics and you can interact with them. Like if you shoot a spell at a table with items on it all the items on the table would react to the force of the spell. So far I have about 25 to 30 different items that have physics.

Does anyone have any suggestions on how to get the external lightmapping to work correctly? Which settings are best?

Plus I forgot to mention the pics were taken with the game only running on good quality. So lower end computers shouldn’t have too much of a problem to run it.

Looking forward to the demo.

Looks nice done asset wise :slight_smile:

As for critics: I think you need to work on the light - shadow - lightmap atmosphere. it all looks so flat and unrealistic, not emitting any kind of atmosphere or “feeling”.

that looks really good!

Yes dreamora that’s why I need Pro because if I light the scene up it looks washed out and too bright. A glow effect would really help this game out. I’m really interested in what it’d look like. Thanks for the suggestion though I’ll try to liven it up.

I wouldn’t be too worry about bloom and stuff. Yes it can add effect but it won’t add to what is not there in the first place (that is my opinion). Dreamora is spot on regarding the atmosphere but you seem to know this.

I don’t know anything about 3ds Max, but with a bit of work on the lightmapping you’d see such a difference. You can lightmap assets shadows onto the terrain too with some techniques, as I’m not sure this is automated (someone else could better comment on this than me though).

It is looking really great so stick with it! Stop making anything new and spend the time researching lightmapping etc and your game will be lifted to a new height.

Regards,
Matt.

I was wondering what you got gameplay wise? Like is there a dialoge function, or quests even? How about monsters? Any ravage wolves or bears or anything else? Maybe even a evil cube from the planes of oblivion? I really have high hopes for this game, and just want to see what you are doing…counting the days till the demo!

Thanks guy for more suggestions and compliments. There is no dialog system yet. Quests will be coming soon, I’m trying to think of the easiest way to do it. I’m thinking of binding an empty game object with a collider to the player after they kill a monster or do something specific. Then once that player has a collision with a certain character have them complete that quest. That is the easiest way I can think of it being done. I’m very new to programming so it’s tough.

Unless someone has a better way and can help me out…

As of right now there are no enemies, I have some nice looking enemy models, but just haven’t programmed them yet. I’m running into some problems when the enemies attack. They’re always turned the wrong way when they attack. Then for killing them I wanted a ragdoll effect like in Oblivion, but when I do the head constraint is always 50 feet away from the model. So when they die they stretch all weird and it looks terrible.

If anyone has any suggestions to fix any of these problems that’d be great.

Just an idea…
Also I have music from the Oblivion sound track would I be aloud to use them in the game ONLY for the demo? It seems to give it the Oblivion effect. I don’t want to do anything illegal and since it’s just for the demo and non profitable purpose it shouldn’t be a problem right? I’d make sure I put that it’s not my music and give credit to them.

The sooner someone gets back to me on the music the sooner I can release the first demo :slight_smile:

I don’t know, but to be safe I wouldn’t use it.

just change the head afterwards, manually. On a similar note, Here’s a simple code to replace the character with the ragdoll:

var ragdollReplacement : GameObject;
function RagdollReplace () {
	ragdoll = Instantiate(ragdollReplacement, transform.position, transform.rotation);
	if (ragdoll.rigidbody){
			ragdoll.rigidbody.velocity = GetComponent(CharacterController).velocity;
	}
	var joints = gameObject.GetComponentsInChildren(Transform);
	var ragdollJoints = ragdoll.GetComponentsInChildren(Transform);
	
	for (var joint : Transform in ragdollJoints) {
		var jointName = joint.gameObject.name;
		for (var oldJoint : Transform in joints) {
			var oldJointName = oldJoint.gameObject.name;
			if (jointName == oldJointName){
				joint.position = oldJoint.position;
				joint.rotation = oldJoint.rotation;
				if (joint.rigidbody){
					joint.rigidbody.velocity = GetComponent(CharacterController).velocity;
				}
			}
		}
	}
	Destroy(gameObject);
	return ragdoll;
}

This is the code I used in my first game test (see signature). Basically if I had an enemy gameObject and a ragdoll gameObject, this would instantiate the ragdoll and it’s joints in the exact same position. It would also apply the charactercontroller’s velocity to all the rigidbodies of it, so if the enemy is running when it dies, it won’t just stop moving and fall; instead it’ll slide forward and maybe roll over a bit.

Thank you BTM this will come in handy. As for changing the head afterwards I do and it still stretches the polys because it’s connected by the constraint. I can’t figure it out. I guess I’ll just release a demo without enemies which is a let down, but I can always do it in the next demo.

Also do you know why my character animations aways turn 180 degrees when they attack my player? I’m using a slightly altered version of the Unity FPS enemy script. I looked through the script, but there’s nothing that has to do with rotations. I’ve also tried rotating the model 180 degrees in 3ds Max?! This is very frustrating, I hope I can figure it out.

Thanks again

you could make a gameObject that sits in the middle of the head and has the same parent as the head object, then move the head object so that its parent is this new gameObject. Use this gameObject as the new ‘head’, with the joint on it: so that the head deforms as it should, but this object is positioned right for the joint.

I looked at the code for the fps tutorial some time ago, but I payed more attention to the platformer tutorial. Here’s a small part of my own attacking script, just to give you an idea of what you might be overlooking:

function Advance () {
	// move towards the target if it's out of range
	while (!dead  CanSee(targeted)  !InAttackRange()) {
		interest= targeted.transform.position;
		urgency = 2.0;
		var preRot = transform.forward;
		RotateToFace (targeted, turningSpeed);
		MoveTowards (targeted, runSpeed);
		// if you can't move at all, chances are you're running into a wall. instead, use nodes to run around (prevance function)
		if (characterController.velocity.magnitude <= becomeIdleSpeed  Vector3.Angle(transform.forward, preRot) <= 0.1) {
			yield Prevance();
		}
		yield;
	}
	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
	// attack when in range
	if (CanSee(targeted)  InAttackRange()) {
		yield Attack();
	}
}
//==================================================================== *Good*
function Attack () {
	// rotate to face the target if it's not being faced
	while (!dead  CanSee(targeted)  InAttackRange()  !InAttackAngle()) {
		interest= targeted.transform.position;
		urgency = 2.0;
		
		animation.CrossFade("Walk");
		RotateToFace (targeted, turningSpeed);
		yield;
	}
	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
	// punch when in range
	if (CanSee(targeted)  InAttackRange()  InAttackAngle()) {
		animation.CrossFade("Idle");
		yield Punch();
	}
}

now, the interest point and urgency system are for something unrelated; interest point is where the enemy runs to if it can’t see the character and if it’s interested. I only set them here so that the enemy is interested in wherever it last saw the player, in case the player went behind a wall or something. This is totally unnecessary for your script. The attack function is probably the most useful; if the ‘forward’ of the enemy is facing the player and if the player is within the attack range, only then can the enemy attack.

I tried something similar to that and it didn’t really work still stretches.

And thanks I’ll try to alter the enemy script and make it work.

Do you know how to make a web player so I can share it? I know it sounds like a noobie question but its not working. I’m using 000webhost and I think they have a limited amount of size of the file…

Any other suggestions for a web host or any other way I can make a demo with the web player?

Thanks again you’ve been very helpful.

Never mind I got the demo working. It is up and running just click on the link!

why is my middle mouse button melee attack and my left mouse magic? Seems odd.

Couldn’t manage to fullscreen it, playing in a tiny window was pretty awful.

doesn’t matter because the framerate is atrocious. Not playable at all. But for some reason, when I press escape the lag seems to disappear? The camera moves more slowly but I can’t really tell because I am unable to move.

(also, dropbox is another suggestion to host your files)