Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
DStecks
Feb 6, 2012

Rocko Bonaparte posted:

What all crap should I be worrying about when implementing pause and resume in Unity? I looked it up and got a bunch of stuff about setting Time.timeScale to 0.0f to stop time. That's half the situation. My player controller can still reorient the player, even if the player won't move. So I already know that's one thing to check. Should I generally just wrap everything in some kind of pause/resume framework?

You could do something similar to what I'm using in my TBS game to only let actors move on their turn:

All objects you want to be pausable inherit from some mother class, let's call it RockoObject. RockoObject inherits from MonoBehaviour, and implements the methods Update and FixedUpdate. However, it also has the virtual methods MyUpdate and MyFixedUpdate, which all of RockoObject's children will implement. MyUpdate and MyFixedUpdate are where you will actually write the code you want to run every frame/interval. Children of RockoObject will not implement Update or FixedUpdate, and at the end of their MyUpdate/MyFixedUpdate methods will call base.MyUpdate / base.MyFixedUpdate. RockoObject will look like this:

code:
public class RockoObject : MonoBehaviour
{
	protected virtual void MyUpdate()
	{
		//The code you'd normally put in the Update() method
	}

	protected virtual void MyFixedUpdate()
	{
		//The code you'd normally put in the FixedUpdate() method
	}

	private void Update()
	{
		if(!paused_flag)
		{
			MyUpdate();
		}
	}

	private void FixedUpdate()
	{
		if(!paused_flag)
		{
			MyFixedUpdate();
		}
	}
}
The effect will be that Update() will always call the lowest-level override of MyUpdate(), and you only need to check in one place if the object is paused.

Adbot
ADBOT LOVES YOU

ApproachingInfinity
Sep 14, 2008

Rocko Bonaparte posted:

What all crap should I be worrying about when implementing pause and resume in Unity? I looked it up and got a bunch of stuff about setting Time.timeScale to 0.0f to stop time. That's half the situation. My player controller can still reorient the player, even if the player won't move. So I already know that's one thing to check. Should I generally just wrap everything in some kind of pause/resume framework?

The timeScale thing can work, either 0 or with a tiny value as Shalinor suggested, as long as you don't need to do anything in your pause menu that depends on time passing. For example, if your pause UI uses tweens or has animations, make sure they use unscaled time (Time.realtimeSinceStartup) to proceed instead of the normal scaled time, as otherwise they'll never finish and your UI will become unusable. I don't remember for sure, but I believe Coroutines also stop running at 0 time scale. In any case things like WaitForSeconds do use scaled time, so be careful with those.

With situations like your player still being able to look around, you may still need to implement some kind of global 'isPaused' thing to get those sorts of things in line. What's happening there is probably that your mouse look code just directly sets the player/camera's transform values instantly every frame based only on how much the mouse moved. The movement code is most likely getting an input vector and then multiplying it by some values to get the final move vector, one of those values being Time.deltaTime (so that movement speed is not framerate-dependent). At time scale 0, Time.deltaTime will also be 0, so no movement. But since the mouse look isn't using that, it's completely unaffected by the time scale. You could also put Time.deltaTime into the mix for your mouse look, but then your look movement would scale up and down with framerate, and it typically 'feels' better to have mouse look in first person games not be tied to anything other than just the mouse movement. So for this, you could do something like add a globally-reachable 'isPaused' variable, and modify your mouse look script to check for that at the start of it's Update, and just return if it's true without doing any movement. Or maybe another script listens for when the game is paused, and disables the entire player controller script.

There's a bunch of ways to do pause in games, and they all have their crappy edge cases or extra work that you'll run into eventually :v:

Jewel
May 2, 2009

You could do what systems like PlayMaker have integrated, and is generally the suggestion method for these kind of things:

Your game should run via a hierachy of timelines. The global timeline is realtime (if you want to scale this it's suggested to put the scaling on a nested timeline inside that, but i guess you could if you want?) and there's nestings of timelines. Each timeline has a timescale and when you tick the global timeline, it updates the time of each inner timeline by delta * timescale. So if you have a timeline that ticks from 0 to 10s, and an inner one with 0.5 timescale, it goes from 0 to 5s. You also have the ability to completely pause a timeline so that nothing on it gets updated or processed (typically also automatically paused when it's set to 0 I think). That way you can have a Game timeline and a Menu timeline, particles and animations and updates stop happening when the game is paused, but the menu can have animations and whatever still absolutely fine.

This also instantly lets you do cool stuff like having a level and every enemy and particle in it slow down to a stop while the player stays on their own timeline and can continue moving around it freely.

Also, this doesn't just have to work for global "game start -> game end" timelines. Particles for example could run on a timeline of 0 -> lifespan, and everything still scales fine.

StickFigs
Sep 5, 2004

"It's time to choose."
How can I get a random unit vector that exists inside the imaginary cone around some vector A where the angle between the new vector and A is less than or equal to θ?



I'm trying to do simple bullet spread where the distribution inside any disc orthogonal to vector A is uniform. Everything Google comes up with is either non-uniformly distributed (when a random point inside a sphere is used) or too expensive (converting to polar coordinates then back again) or it doesn't let me describe the spread as an angle where the angle would be equal to 2θ.

Unormal
Nov 16, 2004

Mod sass? This evening?! But the cakes aren't ready! THE CAKES!
Fun Shoe

StickFigs posted:

How can I get a random unit vector that exists inside the imaginary cone around some vector A where the angle between the new vector and A is less than or equal to θ?



I'm trying to do simple bullet spread where the distribution inside any disc orthogonal to vector A is uniform. Everything Google comes up with is either non-uniformly distributed (when a random point inside a sphere is used) or too expensive (converting to polar coordinates then back again) or it doesn't let me describe the spread as an angle where the angle would be equal to 2θ.

Is converting to polar coordinates and back again really too expensive? Are you doing it like 100,000 times a frame?

Xerophyte
Mar 17, 2008

This space intentionally left blank

StickFigs posted:

How can I get a random unit vector that exists inside the imaginary cone around some vector A where the angle between the new vector and A is less than or equal to θ?



I'm trying to do simple bullet spread where the distribution inside any disc orthogonal to vector A is uniform. Everything Google comes up with is either non-uniformly distributed (when a random point inside a sphere is used) or too expensive (converting to polar coordinates then back again) or it doesn't let me describe the spread as an angle where the angle would be equal to 2θ.

1. Compute a target disk from the desired angle, direction and distance.
2. Generate a sample on the unit disk.
3. Transform the sample from the unit disk to your target disk.
4. Normalize.

Specifically for generating a uniformly distributed samples on the unit disk there are a couple of schemes. Simplest is to use polar coordinates and sqrt the radius. Possibly better (less distorting) is to use a concentric mapping. E.g. from the Mitsuba source:
code:
Point2 squareToUniformDiskConcentric(const Point2 &sample) {
	Float r1 = 2.0f*sample.x - 1.0f;
	Float r2 = 2.0f*sample.y - 1.0f;

	/* Modified concencric map code with less branching (by Dave Cline), see
	   [url]http://psgraphics.blogspot.ch/2011/01/improved-code-for-concentric-map.html[/url] */
	Float phi, r;
	if (r1 == 0 && r2 == 0) {
		r = phi = 0;
	} else if (r1*r1 > r2*r2) {
		r = r1;
		phi = (M_PI/4.0f) * (r2/r1);
	} else {
		r = r2;
		phi = (M_PI/2.0f) - (r1/r2) * (M_PI/4.0f);
	}

	Float cosPhi, sinPhi;
	math::sincos(phi, &sinPhi, &cosPhi);

	return Point2(r * cosPhi, r * sinPhi);
}
This may or may not meet your performance constraints. You're probably not going to be able to do this without using polar coordinates at some point, explicitly or implicitly.

E: Clarification, uniformly sampled polar coordinates are of course not uniform in Cartesian space.

Xerophyte fucked around with this message at 23:06 on Dec 14, 2015

Shalinor
Jun 10, 2002

Can I buy you a rootbeer?
Depending how up-your-own-sleeve clever you want to get, you could also calculate a random unit vector in the XY plane off of origin, multiply it by a 0.0 to 1.0 random, rotate that vector by whatever heading rotation you used to generate your forward vec in the first place, and then add the result to your forward vector.

That would possibly be faster, maybe? Since you're only doing a single 3x3 matrix rot mult? But we're reaching how many angels can fit on the head of a pin territory, here.

HappyHippo
Nov 19, 2003
Do you have an Air Miles Card?

Shalinor posted:

Depending how up-your-own-sleeve clever you want to get, you could also calculate a random unit vector in the XY plane off of origin, multiply it by a 0.0 to 1.0 random, rotate that vector by whatever heading rotation you used to generate your forward vec in the first place, and then add the result to your forward vector.

That would possibly be faster, maybe? Since you're only doing a single 3x3 matrix rot mult? But we're reaching how many angels can fit on the head of a pin territory, here.

That wouldn't be uniform.

josh04
Oct 19, 2008


"THE FLASH IS THE REASON
TO RACE TO THE THEATRES"

This title contains sponsored content.

I've worked up some UDP netcode using Boost ASIO to fire packets back and forth, but I'm getting worried that NAT traversal and other general networking problems might bite me in the rear end down the line when it'll be harder to rip it all out again. Any common advice for this sort of thing?

Xerophyte
Mar 17, 2008

This space intentionally left blank

Shalinor posted:

Depending how up-your-own-sleeve clever you want to get, you could also calculate a random unit vector in the XY plane off of origin, multiply it by a 0.0 to 1.0 random, rotate that vector by whatever heading rotation you used to generate your forward vec in the first place, and then add the result to your forward vector.

That would possibly be faster, maybe? Since you're only doing a single 3x3 matrix rot mult? But we're reaching how many angels can fit on the head of a pin territory, here.

Generating a random unit vector and multiplying it by a factor in 0 to 1 is a unit disk sampling. It's not directly a uniform one, which may or may not matter.

float3(sqrt(u) * cos(2 * PI * v), sqrt(u) * sin(2 * PI * v), 1) is the cheapest way to go from a uniform sample on the square uv to a uniform sample on a disk around (0, 0, 1), although it's more distorting than a concentric mapping. This also may or may not matter. Then it's indeed a 3x3 rotation + scale to transform that sample to the desired disk around the target.

There are various clever trade-offs you can make for cheap computation versus uniformity and sample quality in general, but if you want the samples to end up on a uniform disk then you're probably going to want to use a polar or concentric mapping from the square at some point.

Shalinor
Jun 10, 2002

Can I buy you a rootbeer?

Xerophyte posted:

There are various clever trade-offs you can make for cheap computation versus uniformity and sample quality in general, but if you want the samples to end up on a uniform disk then you're probably going to want to use a polar or concentric mapping from the square at some point.
This is really the take-away. You CAN do this very cheaply, but honest to god, you don't need to. Unless this is meant to run on a TI-83, you'll really be ok doing even a fair number of polar->Cartesian conversions per frame. Just do it that way first, so that someone else (or you in 6 months) stands a prayer of understanding your code, and then optimize if and only if the function crops up in your profiling as an issue.

roomforthetuna
Mar 22, 2005

I don't need to know anything about virii! My CUSTOM PROGRAM keeps me protected! It's not like they'll try to come in through the Internet or something!
I'd also question, are you really sure you *want* a uniform disc mapping for your bullet spray? Seems like concentrated towards the center (like you'd get from random angle * random distance) would be the more realistic distribution anyway.

HappyHippo
Nov 19, 2003
Do you have an Air Miles Card?
There's also a problem with Xerophyte's answer, where what's uniform on a unit disc is not uniform on a circular solid angle. This problem is small so long as θ is small. If you really care though, this should be truly uniform (adapted from here):

1. Generate u and t uniformly: u = [cos-1θ, 1], t = [0, 2 pi]
2. The cartesian coordinates are then:
code:
x = sqrt(1 - u^2) cos(t)
y = sqrt(1 - u^2) sin(t)
z = u
3. The above is distributed around the z-axis. Rotate to point along the vector A

Xerophyte
Mar 17, 2008

This space intentionally left blank

HappyHippo posted:

There's also a problem with Xerophyte's answer, where what's uniform on a unit disc is not uniform on a circular solid angle. This problem is small so long as θ is small. If you really care though, this should be truly uniform (adapted from here):

1. Generate u and t uniformly: u = [cos-1θ, 1], t = [0, 2 pi]
2. The cartesian coordinates are then:
code:
x = sqrt(1 - u^2) cos(t)
y = sqrt(1 - u^2) sin(t)
z = u
3. The above is distributed around the z-axis. Rotate to point along the vector A

This is true if you want uniformity over solid angle. The stated problem was to have a uniform distribution on the cap of a regular cone and not a spherical cone, though.

HappyHippo
Nov 19, 2003
Do you have an Air Miles Card?

Xerophyte posted:

This is true if you want uniformity over solid angle. The stated problem was to have a uniform distribution on the cap of a regular cone and not a spherical cone, though.

Well he said he wanted a "random unit vector" which I took to imply the solid angle. Honestly though roomforthetuna makes a good point that you don't necessarily want a uniform distribution if you're modelling bullet spread.

aerique
Jul 16, 2008

Triarii posted:

How is this situation handled in Git?

FWIW, there's a version control megathread: http://forums.somethingawful.com/showthread.php?threadid=3113983

StickFigs
Sep 5, 2004

"It's time to choose."

roomforthetuna posted:

I'd also question, are you really sure you *want* a uniform disc mapping for your bullet spray? Seems like concentrated towards the center (like you'd get from random angle * random distance) would be the more realistic distribution anyway.

I'm trying to simulate some error in aiming with my game's AI so I figured that uniform would make more sense but now that I think of it maybe I do want it non-uniform with bias towards the center. It probably wouldn't make sense to see a uniform distribution on a disc in nature or statistical data.

DStecks
Feb 6, 2012

I'm getting an error which seems to indicate that I fatally misunderstand something about C# events:

I have these two classes, both of which are attached to a MonoBehaviour object:


code:
public class AnimationHandler : HGComponent
{ 
    public override void Initialize(HGObject p_Parent)
    {
        p_Parent.Type<Type>().e_StateChange += new d_StateChangeEvent(AnimOnStateChange);

        base.Initialize(p_Parent);
    }

    public void AnimOnStateChange(State p_State, args_Base e)
    {
        Debug.Log("HEY! STATE CHANGE IN ANIMATION HANDLER!");
    }
}

public class AudioHandler : HGComponent
{
    public override void Initialize(HGObject p_Parent)
    {
        p_Parent.Type<Type>().e_StateChange += new d_StateChangeEvent(AudioOnStateChange);

        base.Initialize(p_Parent);
    }

    public void AudioOnStateChange(State p_State, args_Base e)
    {
        Debug.Log("HEY! STATE CHANGE IN AUDIO HANDLER!");
    }
}
I have them both registering their methods with the state change event. Bizarrely, when I run the game and experience a state change, instead of both methods printing their lines, the AnimationHandler prints its line twice, and the AudioHandler not at all. The Initialize() method runs first for the AnimationHandler, but why the hell is the AudioHandler registering a duplicate of the AnimationHandler method?

Edit: OH FOR poo poo'S SAKE

(code currently in my HGObject method:)
code:
m_Animator = this.GetComponent<AnimationHandler>();
m_Audio = this.GetComponent<AudioHandler>();
m_Animator.Initialize(this);
m_Animator.Initialize(this);

DStecks fucked around with this message at 17:03 on Dec 15, 2015

StickFigs
Sep 5, 2004

"It's time to choose."
Here's my implementation of what I assume will give me a distribution biased towards the center:

code:
private Vector3 ApplyBulletSpread(GameObject bullet, float spreadFactor)
{
	var randomNumberX = Random.Range(-spreadFactor, spreadFactor);
	var randomNumberY = Random.Range(-spreadFactor, spreadFactor);
	bullet.transform.Rotate(randomNumberX, randomNumberY, 0.0f);
}
But I still want to define the spread as the max angle from the cone's center axis...

Blasphemeral
Jul 26, 2012

Three mongrel men in exchange for a party member? I found that one in the Faustian Bargain Bin.

DStecks posted:

...
Edit: OH FOR poo poo'S SAKE
...

*snrrrk* Yeah, it took me few seconds to see, even with you pointing it out. Isn't the human brain's image processing wonderfully helpful with it's shortcuts? I try to use words that don't look similar when doing something like this, for this very reason. My recommendation would be to change "Audio" to "Sound" or "Animation" to "Movement".

DStecks
Feb 6, 2012

Blasphemeral posted:

*snrrrk* Yeah, it took me few seconds to see, even with you pointing it out. Isn't the human brain's image processing wonderfully helpful with it's shortcuts? I try to use words that don't look similar when doing something like this, for this very reason. My recommendation would be to change "Audio" to "Sound" or "Animation" to "Movement".

Sound is already the word I'm using for the game's mechanical actions-producing-sound system. As in, enemies can hear player footsteps, etc, and that system uses the word Sound to preface elements of it. And the AnimationHandler covers a lot more than just movement. In any case, I won't need to type either name very often, since both classes are going to run pretty much purely by event listening.

HappyHippo
Nov 19, 2003
Do you have an Air Miles Card?

StickFigs posted:

Here's my implementation of what I assume will give me a distribution biased towards the center:

code:
private Vector3 ApplyBulletSpread(GameObject bullet, float spreadFactor)
{
	var randomNumberX = Random.Range(-spreadFactor, spreadFactor);
	var randomNumberY = Random.Range(-spreadFactor, spreadFactor);
	bullet.transform.Rotate(randomNumberX, randomNumberY, 0.0f);
}
But I still want to define the spread as the max angle from the cone's center axis...

That will give you a square-like shape, not a disc. Also it isn't biased. If you want to do it this way (this will be biased towards the center):

code:
private Vector3 ApplyBulletSpread(GameObject bullet, float spreadFactor)
{
	var angle = Random.Range(0, 2 * Math.Pi);
	var angularRadius = Random.Range(0, spreadFactor);
	var rotateX = Math.Cos(angle) * angularRadius;
	var rotateY = Math.Sin(angle) * angularRadius;
	bullet.transform.Rotate(rotateX, rotateY, 0.0f);
}

Xerophyte
Mar 17, 2008

This space intentionally left blank

StickFigs posted:

Here's my implementation of what I assume will give me a distribution biased towards the center:

code:
private Vector3 ApplyBulletSpread(GameObject bullet, float spreadFactor)
{
	var randomNumberX = Random.Range(-spreadFactor, spreadFactor);
	var randomNumberY = Random.Range(-spreadFactor, spreadFactor);
	bullet.transform.Rotate(randomNumberX, randomNumberY, 0.0f);
}
But I still want to define the spread as the max angle from the cone's center axis...

If you want the max angle to be strict and no samples outside of it then you can still generate samples on a unit disk and map them to a target disk of radius θ, just generate the initial samples non-uniformly. For instance (I have no knowledge of your language/framework so code is approximate):
code:
// sample_spread controls how samples are spread on the disk
//    [0..1] has samples more concentrated to the edges of the disk.
//    1 has uniform sampling.
//    [1..] has samples more concentrated to the center of the disk.
private Vector2 NonuniformSampleUnitDisk(float sample_spread)
{
	var u = Random.Range(0, 1);
	var v = Random.Range(0, 1);
	var r = Pow(u, sample_spread / 2);
        var phi = 2 * PI * v;
	return Vector2(r * cos(phi), r * sin(phi));
}
Another approach is to use a known distribution on the hemisphere. You might want to look at cosine sampling. You can adjust the exponent to achieve a desired standard deviation that's related to θ, though I don't know what the exact relationship between exponent and variance is off the top of my head.

supermikhail
Nov 17, 2012


"It's video games, Scully."
Video games?"
"He enlists the help of strangers to make his perfect video game. When he gets bored of an idea, he murders them and moves on to the next, learning nothing in the process."
"Hmm... interesting."
So I'm slowly figuring pathfinding out; that is to say, it's barely functional at all. One of the many issues is that npcs sometimes just stop pathfinding, and it happens next to particular walls. I reckon it's because they run out of the grid (which isn't perfectly aligned to obstacles) because of their physical momentum or something. Another pressing issue is that they can't seem to pathfind past other npcs, either constantly or occasionally (I can't tell). In fact they end up walking into each other very often. I imagine that it happens (although it shouldn't) because they find themselves in the same cell; or maybe it's my algorithm, which works via each npc having their personal heuristic, which reports a very high cost whenever there's an npc in a cell that this npc knows of.

HappyHippo
Nov 19, 2003
Do you have an Air Miles Card?

supermikhail posted:

So I'm slowly figuring pathfinding out; that is to say, it's barely functional at all. One of the many issues is that npcs sometimes just stop pathfinding, and it happens next to particular walls. I reckon it's because they run out of the grid (which isn't perfectly aligned to obstacles) because of their physical momentum or something. Another pressing issue is that they can't seem to pathfind past other npcs, either constantly or occasionally (I can't tell). In fact they end up walking into each other very often. I imagine that it happens (although it shouldn't) because they find themselves in the same cell; or maybe it's my algorithm, which works via each npc having their personal heuristic, which reports a very high cost whenever there's an npc in a cell that this npc knows of.

We're going to need to see some code man, there isn't much to go on here.

As general advice though I recommend you add some debug code which displays each entity's current path in the game somehow. It can be very helpful to have an idea of what's going on under the hood when trying to debug issues like these.

supermikhail
Nov 17, 2012


"It's video games, Scully."
Video games?"
"He enlists the help of strangers to make his perfect video game. When he gets bored of an idea, he murders them and moves on to the next, learning nothing in the process."
"Hmm... interesting."
I really wouldn't know where to start with code.

Although quickly implementing the path rendering (which was really easy and why haven't I done it ages ago) has allowed me to see that my heuristic implementation is working far from flawlessly. Or rather, apparently I was supposed to clear the path myself every time the pathfinder updates it, which I didn't do, so consequent updates would just layer on top, and putting a heavy cost on npc-occupied cells doesn't do anything. So yep, a giant mess.

This is from my npc heuristic:
code:
	public void update() {
		busyNodes.clear();
		for (MemoryOfCharacter mc : owner.memory.getCharacterMemories()) {
			busyNodes.add(owner.pathfindingController.environment
					.getNodeFor(mc.position));
		}
	}

	@Override
	public float estimate(GridNode node, GridNode endNode) {
		if (busyNodes.contains(endNode, true)) {
			return 1000000000;
		}
		return SimpleHeuristic.getSqrDistanceBetweenCenters(node, endNode);
	}
Doesn't seem to do anything on top of what the SimpleHeuristic does.

Yeah, of course I'm using the "stock" gdx-ai A* pathfinder. Maybe I should finally dig into those guts... Oh my god! These paths are far from optimal.

DStecks
Feb 6, 2012

I only yesterday discovered that my A* algorithm was forgetting to actually stop pathfinding after it found its destination, so don't worry if it's not perfect right away. You'll be finding bugs for a while yet if you're anything like me. :v:

ToxicSlurpee
Nov 5, 2003

-=SEND HELP=-


Pillbug

DStecks posted:

I only yesterday discovered that my A* algorithm was forgetting to actually stop pathfinding after it found its destination, so don't worry if it's not perfect right away. You'll be finding bugs for a while yet if you're anything like me. :v:

If you program at all you'll find bugs forever. Don't sweat it.

The Atomic Man-Boy
Jul 23, 2007

So I've decided to go from being a hobbyist to making a full fledged product. It's a hack-n-slash game targeted toward PC, and possibly console if it comes to fruition.

I'm a journeyman game developer and professional coder and I'm proficient in both Unity and Unreal, and I don't really have a preference towards either. What I lack, however, is thorough knowledge of the asset creation pipeline. This is a bit of a problem because a robust modular armor/clothes system will be very important to my game. I want to be able to have a system where adding armor/clothes to joints or attachment points is not difficult, and be able to continually add armor pieces as development progresses and my artist gives me new pieces. Also the armor pieces would need to follow along with the model as it moves, with some associated cloth physics when necessary. The game doesn't have to look fantastic, however, the ability to make good looking characters is a priority.

Would I be better off using Unity or Unreal? And what would be my overall steps to doing this?

Foolster41
Aug 2, 2013

"It's a non-speaking role"
Personally, I really like Unreal, I think I have a slight bias because for some reason Unity doesn't work on my computer. That's not to knock Unity, I just don't have experience to say one way or the other.

For object creation, I'm not sure when it comes to models, but adding props and things was really easy. I think the only format it accepts is .obj files, but it's really easy to convert any sort of format to .obj (I found an online one that did the trick to import some free prop models for a game I was making as a test). It has a built-in modeling system too, which looks pretty nice, but I haven't done a lot of fiddling with it yet. I think you'll be able to snap bits together fairly easily, with enough paitence/skill.

For other aspects of Unreal, I really love the node-based coding system. (you can also code in C++), and just all around feels like a neat tool .

Looking at the engine stuff, I think Unreal has the better engine, and has a better chance of looking nicer with less effort too, but to be fair that may be more of who's using the tool as I see a lot more indy developers with less money using Unity and a lot of the stuff from Unreal has been from big studios, or small studios backed by big studios (Dontnod with SquareEnix).

(edit: I've been toying with the idea of a story telling game, ala Wolf Among Us or life is strange, though I'm having a hard time nailing it down beyond a basic concept (being about keeping a rag-tag group of young rebels together, helping them all get along), and that I'm going to need a lot of custom modeling, which I'm not going to be able to do myself, and buying from the marketplace is going to be expensive)

Foolster41 fucked around with this message at 09:36 on Dec 19, 2015

floofyscorp
Feb 12, 2007

The Atomic Man-Boy posted:

So I've decided to go from being a hobbyist to making a full fledged product. It's a hack-n-slash game targeted toward PC, and possibly console if it comes to fruition.

I'm a journeyman game developer and professional coder and I'm proficient in both Unity and Unreal, and I don't really have a preference towards either. What I lack, however, is thorough knowledge of the asset creation pipeline. This is a bit of a problem because a robust modular armor/clothes system will be very important to my game. I want to be able to have a system where adding armor/clothes to joints or attachment points is not difficult, and be able to continually add armor pieces as development progresses and my artist gives me new pieces. Also the armor pieces would need to follow along with the model as it moves, with some associated cloth physics when necessary. The game doesn't have to look fantastic, however, the ability to make good looking characters is a priority.

Would I be better off using Unity or Unreal? And what would be my overall steps to doing this?

As someone who relatively recently made a set of assets for modular character customisation for a Unity game, Unity can definitely do this just fine, but then so can UE4. So I wouldn't base my choice of engine on that, because either will do the job. And they both support more mesh formats than just .obj, thank god - obj doesn't support anything like skeletons, animation or skinning information, so you'd be a bit SOL for character art if that was all you could use!

It depends a bit on what kind of art style you want to go for, but the way I usually go about it is to create the character base mesh, and all of the different clothing/armour pieces, all as separate meshes skinned to the same skeleton. Export them to your engine of choice as .fbx files and you should be able to load different items onto the character without too much trouble. As long as they share the same rig, adding more pieces as you go along shouldn't be an issue.

Boz0r
Sep 7, 2006
The Rocketship in action.
I want to try my hand at making an action/adventure game in the likes of Little Big Adventure, but I'm devoid of any creativity. Is there some place where I can find a plot/puzzles for this?

roomforthetuna
Mar 22, 2005

I don't need to know anything about virii! My CUSTOM PROGRAM keeps me protected! It's not like they'll try to come in through the Internet or something!

Boz0r posted:

I want to try my hand at making an action/adventure game in the likes of Little Big Adventure, but I'm devoid of any creativity. Is there some place where I can find a plot/puzzles for this?
I don't think I've ever seen this before. You're a unicorn! The normal thing is "I've got a great idea for a game, but I need someone to do all the work for me." (With respect to plot, that is. Wanting to outsource puzzles or level-design isn't so uncommon.)

Having been in that position for wanting graphics, I'd suggest starting out with not even worrying about plot or puzzles - make your game framework before you start trying to get other people involved. Once you have a blank slate that a character can walk around in and some vague objects or blob-monsters that the character can interact with and it feels like an empty shell of a game in the genre you're going for, then find someone to contribute plot or puzzles.

I have a story and puzzle-concept that I'm probably never going to get around to developing myself, so we could form the beginnings of a team, but I wouldn't want to be expending effort on it without some good evidence that the time-consuming hard work portion of the process isn't going to just flake out. (Which, statistically, it is.)

Zenro7
Dec 19, 2015

by Cowcaster
Hi everyone,

We're a two-man development team working with the Unreal 4 engine in hopes of creating a career for ourselves in the games industry.

It would be greatly appreciated to hear your feedback for our game. Currently it's packaged to run on 64-bit PC systems and we're in the process of packaging a 32-bit version as well as Mac and Linux ports. Right now 1368x768 resolution support has not been implemented.We're still heavily refining our gameplay and contorls.

Wormhole City is a single-player sci-fi adventure game with top-down platforming, puzzle and action elements developed in Unreal Engine 4 for PC. Control vehicles and gain power-ups through exploration and defeating enemies while making game-changing decisions throughout your story. Through faster-than-light technology, nations strive to colonize the universe while diverging factions struggle for control and freedom throughout space. Play as space forces, space pirates, and alien races and uncover their motivations.

If you think our project has enough merit, please support us on Greenlight! Here is the link, a trailer, media gallery and a link to the demo,

greenlight
http://steamcommunity.com/sharedfiles/filedetails/?id=576376585&result=1

trailer:
https://www.youtube.com/watch?v=3Pexe5Pu-lI

media gallery
http://imgur.com/a/jMdDp

Wormhole City demo
https://mega.nz/#!iNoRGTaQ!i7nqftfApEJMB_C-ZqUdvSud5DURgvh3yI7nDhvWQlU

Bonus Gameplay Segment:

https://www.youtube.com/watch?v=lz0qgb6K2dE

We also have a slightly unrelated gameplay demo that is compatible with the Oculus Rift. Dowload and media below,

https://www.sendspace.com/pro/dl/hq2c5a

http://imgur.com/a/0eVEy

Please let us know if you have trouble downloading or playing the game, we're in the process of trying new file hosting services and we need your feedback!

Thank you and happy holidays

(USER WAS BANNED FOR THIS POST)

DStecks
Feb 6, 2012

Boz0r posted:

I want to try my hand at making an action/adventure game in the likes of Little Big Adventure, but I'm devoid of any creativity. Is there some place where I can find a plot/puzzles for this?

Steal the plot to your favourite movie. This approach to video game stories has sustained the industry for 30 years.

Zenro7
Dec 19, 2015

by Cowcaster
sorry mispost-

Always liked the idea of returning to a story and seeing things are worse than they used to be like in Alice Madness Returns or Return to the Wizard of Oz

maybe try this with a public domain story?

Zenro7 fucked around with this message at 00:50 on Dec 20, 2015

roomforthetuna
Mar 22, 2005

I don't need to know anything about virii! My CUSTOM PROGRAM keeps me protected! It's not like they'll try to come in through the Internet or something!
4GB is a pretty big download for only a demo without some better up-front selling. Your description says platforming, puzzle and action elements, but the trailer seems to show only wandering around and action. I didn't see anything that looked like platforming or puzzle. And even for the action parts it's not very clear what the player is really *doing* - the bullets are all very fast so the player isn't dodging, there's too much stuff happening for the player to be employing much in the way of strategy, is it like Diablo-style where the player is mostly mashing the "fight things" button and relying on their statistics being better than the enemy's statistics? Are they selecting targets or aiming?

quote:

Please let us know if you have trouble downloading or playing the game, we're in the process of trying new file hosting services and we need your feedback!
Have you considered offering bittorrent as an option? A lot of people have a client, you can do some amount of base upload from your own home connection[s] so it doesn't cost much, and you only really need to support one downloader's worth of bandwidth most of the time because if there are two then they start to support each other.

My reaction to the MEGA-whatever client was "oh hell no, installing some download tool I've never heard of". And downloading direct with browser didn't even make it as far as starting the download when I saw >4GB.

Cory Parsnipson
Nov 15, 2015
I'm reading Game Programming Patterns and I'm thinking about Entity Component systems.

Hypothetically, if I made an "GraphicsComponent" class, is the idea to map it to a single sprite/visible item and have an entity contain multiple graphics components? Maybe it might be better to have each entity contain a single graphics component have a collection of sprites within it?

For example, you could have a "monster" entity containing a graphics component with a monster sprite and a sword sprite. In the first method, there would be two graphics components in the monster entity one containing the monster itself and the other containing a sword. In the second method, you would register both sprites with a single graphics component in the monster entity.

If this is really an open-ended question, it'd be awesome if people could provide some intuition behind their explanations for why one way was better than the other. Thanks!

Dr. Stab
Sep 12, 2010
👨🏻‍⚕️🩺🔪🙀😱🙀

Each entity should probably only have one representation on the screen. If you have a guy holding a sword, and the guy and the sword are two sprites, both the guy and the sword are entities. You'd probably want a component that describes the relationship between the guy and the sword.

Adbot
ADBOT LOVES YOU

Cory Parsnipson
Nov 15, 2015
Oh I see.

What about if you modeled your "monster" in different pieces, like having legs, and a torso, and arms, and wings all in some kind of "papercraft" animation? Would you still model them with separate entities?

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply