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
SupSuper
Apr 8, 2009

At the Heart of the city is an Alien horror, so vile and so powerful that not even death can claim it.

SlightlyMadman posted:

edit- Follow-up unity question:

I decided planes will probably be better than cubes for the ground terrain, and I can do cool things like angle them to create hills. I made a new prefab for it, and associated it all of the exact same ways, but when I Instantiate it, nothing shows up.

Is there something about planes that I'm missing, different from cubes?
You might be looking at it wrong, planes only have 2 faces so the backface might be facing the camera, try rotating it and see what happens.

SupSuper fucked around with this message at 01:27 on Apr 5, 2013

Adbot
ADBOT LOVES YOU

SlightlyMadman
Jan 14, 2005

SupSuper posted:

You might be looking at the wrong, planes only have 2 faces so the backface might be facing the camera, try rotating it and see what happens.

I think this is the issue actually, although I don't understand because moving the camera around to different angles doesn't make them show up. If I go into the project browser and manually rotate them to x:90, y:180 then I can see them, but I can't figure out how to set this on the Instantiate call. Other properties, like size, get inherited from the prefab, but no matter what I set the prefab to these always come in with rotation 0,0,0.

That said, is my camera angle wrong if rotation 0,0,0 isn't flat? Maybe I'm just making this difficult on myself.

SupSuper
Apr 8, 2009

At the Heart of the city is an Alien horror, so vile and so powerful that not even death can claim it.

SlightlyMadman posted:

I think this is the issue actually, although I don't understand because moving the camera around to different angles doesn't make them show up. If I go into the project browser and manually rotate them to x:90, y:180 then I can see them, but I can't figure out how to set this on the Instantiate call. Other properties, like size, get inherited from the prefab, but no matter what I set the prefab to these always come in with rotation 0,0,0.

That said, is my camera angle wrong if rotation 0,0,0 isn't flat? Maybe I'm just making this difficult on myself.
I don't know what's up with your camera, but the third parameter of Instantiate is the rotation.

SlightlyMadman
Jan 14, 2005

SupSuper posted:

I don't know what's up with your camera, but the third parameter of Instantiate is the rotation.

Strange, googling it, it looks like I should be able to create a new Quaternion to pass as that argument, but I can't get it to compile. Should this work?

code:
blocks[y, x] = Instantiate(grassPlanePrefab, new Vector3(x, y, z), new Quaternion(90, 180, 0));

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!

SlightlyMadman posted:

Strange, googling it, it looks like I should be able to create a new Quaternion to pass as that argument, but I can't get it to compile. Should this work?

code:
blocks[y, x] = Instantiate(grassPlanePrefab, new Vector3(x, y, z), new Quaternion(90, 180, 0));
I think to do a Quaternion from euler angles you want to be calling some static function of Quaternion, something like Quaternion.FromEuler(90,180,0) rather than new Quaternion(90,180,0)
(You'll have to look at the docs to find a list of Quaternion's functions to get the actual one.)

Unormal
Nov 16, 2004

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

roomforthetuna posted:

I think to do a Quaternion from euler angles you want to be calling some static function of Quaternion, something like Quaternion.FromEuler(90,180,0) rather than new Quaternion(90,180,0)
(You'll have to look at the docs to find a list of Quaternion's functions to get the actual one.)

Use "Quaternion.Euler(x,y,z)", it's a static factory member of the quaternion class that generates quaternions, it has quite a few factory members like that.

No Safe Word
Feb 26, 2005

SlightlyMadman posted:

Wait, are you serious, does this exist, and is it any good?

it does exist and it is good

Back in Ye Olde Visual Studio 2003 (and 2000 and 6...) days, there was one that used some OLE embedding crap where it literally embedded vim as the editor in editing areas but now there's this one and it's actually quite good. The one thing that I miss from the Eclipse analog that I used (vrapper) is that you can't toggle it off and on easily for when others do need to do edits (I actually don't shun my coworkers from using my editor :v: ).

Yodzilla
Apr 29, 2005

Now who looks even dumber?

Beef Witch
God loving dammit I was all getting used to Visual Studio 2012 and for some reason intellisense just randomly loving decides to stop working and aaaarrrrrgghhhh!!

Computers are the loving worst.


e: maybe it was Visual Studio 2010 conflicting? ugh

Yodzilla fucked around with this message at 05:00 on Apr 5, 2013

OneEightHundred
Feb 28, 2008

Soon, we will be unstoppable!
If IntelliSense stops working, then you should restart Visual Studio, which is incidentally what you should try when Visual Studio starts doing anything stupid. (Fortunately, it does stupid things less often now, but it still does them)

RoboCicero
Oct 22, 2009

"I'm sick and tired of reading these posts!"
Did they ever end up fixing that hilarious bug where the find and replace dialog would expand by 200 pixels each time you opened it?

OneEightHundred
Feb 28, 2008

Soon, we will be unstoppable!

RoboCicero posted:

Did they ever end up fixing that hilarious bug where the find and replace dialog would expand by 200 pixels each time you opened it?
Yes

Don Mega
Nov 26, 2005
Anybody have any good reading material / tutorials on implementing a 2d particle system?

Jewel
May 2, 2009

Don Mega posted:

Anybody have any good reading material / tutorials on implementing a 2d particle system?

I'm very much interested in this too. I've attempted it a few times but I've never really worked out the optimal way to do it as a whole. Especially stuff like color over life, size over life, turbulence, etc etc, I've never worked out how to design a good system that allows for you to modularily "plug" in those kinda things into a particle type.

Sure, I can make a particular particle for a game work if I specifically code it, but I'm interested in the best way to make a particle engine that lets me just open an editor I've made, plug in some modular components, and have it save to a "Template" particle I can just spawn later in a game.

Other things that are interesting when making particles is more advanced parameters the "Template" has. For example, instead of "0.2" for the "Size At Time 0" parameter, you'd want "Size At Time 0 Min" and "Size At Time 0 Max" properties, which a number is generated randomly between when the particle is spawned in a game. And extending on that, instead of just start and end values, it's nice to add a keyframe system that lets you just add a keyframe at <time> with a min_value and a max_value and the whole system generated random values on a small timeline and all that.

The keyframe system is the only part I've really worked out how to do properly! I made a timeline class that lets you push a new keyframe onto it, the timeline class keeps track of the start and the end keyframe, and proves a method to .get(time) and it returns an interpolated value between the two keyframes that "time" falls inbetween.

Anyway! I'm rambling and thinking out loud here. Someone might be interested in some of the stuff I've said though.

SlightlyMadman
Jan 14, 2005

Ok, Quaternion.Euler worked, although I had to set the size to 0.1 for some reason or else they were gigantic. It also takes way longer to initialize now than when I was using cubes, which seems odd because I'd expect planes to be easier to render than cubes?

edit: I've definitely got the camera wrong though. I have my grid laid out along X,Y and am using Z to represent vertical height. When I add a tree to the scene though, it by default lays down flat, so if it were to stand up straight it would be using Y for vertical height, and X,Z as the grid coordinates. I'm still not used to thinking in 3D, but this seems wrong to me.

SlightlyMadman fucked around with this message at 19:27 on Apr 5, 2013

SupSuper
Apr 8, 2009

At the Heart of the city is an Alien horror, so vile and so powerful that not even death can claim it.

SlightlyMadman posted:

Ok, Quaternion.Euler worked, although I had to set the size to 0.1 for some reason or else they were gigantic. It also takes way longer to initialize now than when I was using cubes, which seems odd because I'd expect planes to be easier to render than cubes?

edit: I've definitely got the camera wrong though. I have my grid laid out along X,Y and am using Z to represent vertical height. When I add a tree to the scene though, it by default lays down flat, so if it were to stand up straight it would be using Y for vertical height, and X,Z as the grid coordinates. I'm still not used to thinking in 3D, but this seems wrong to me.
Personally I've never bothered to make my axis make sense, and just end up rolling with however the scene ends up on them. :v: But you can easily fix it by checking the axis display on the top-right of the scene view, which shows the positive x/y/z. So if you select your Camera and then use GameObject > Align View to Selected you'll see how the axis face from its perspective (Align with View is also really handy to reposition your camera).

SlightlyMadman
Jan 14, 2005

Yeah, I've got the camera and the view and everything set up just how I want them, I'm just worried that I'm giving myself bad habits or something by not using the axes the way they're intended. I guess I can always change it later though. It seems to be working well, although I'm still baffled by why I'm already only getting 30fps when I'm just displaying a 100x100 grid of planes.

Jewel
May 2, 2009

y for vertical is the standard anyway. Point your thumb on your left hand toward your body. Point your index to the sky. Point your middle finger to your right. Iirc these are the standard axis.

Middle is x, index is y, thumb is z. Fingers point in a positive direction.

So y does get greater as it goes upwards (height).

SlightlyMadman
Jan 14, 2005

That makes sense I guess, since it's more or less arbitrary anyways. It just feels odd that most of my loops will be x,z instead of x,y. It'll take some adjustment coming from the simplicity of x,y in 2D but if that's the standard then I'll go with it.

That Turkey Story
Mar 30, 2003

Jewel posted:

y for vertical is the standard anyway. Point your thumb on your left hand toward your body. Point your index to the sky. Point your middle finger to your right. Iirc these are the standard axis.

Middle is x, index is y, thumb is z. Fingers point in a positive direction.

So y does get greater as it goes upwards (height).

Ironically, you are describing what is called a "right-handed" coordinate system even though you explained it with your left hand. A "left-handed" coordinate system has z going forward as opposed to backward. That's one of the reasons I hate the naming convention -- it's easy to make either set of axes using both your left and right hand.

Edit: Also, there are plenty of games that do choose to have z be "up" and have x and y flat on the ground, so if you are comfortable with that then by all means do it.

That Turkey Story fucked around with this message at 21:22 on Apr 5, 2013

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!

SlightlyMadman posted:

Yeah, I've got the camera and the view and everything set up just how I want them, I'm just worried that I'm giving myself bad habits or something by not using the axes the way they're intended. I guess I can always change it later though. It seems to be working well, although I'm still baffled by why I'm already only getting 30fps when I'm just displaying a 100x100 grid of planes.
The Unity 'plane' object is not the 4-point rectangle you're imagining, it's actually a 10x10 grid of rectangles (for some reason, god knows why they thought that would be more useful than a single quad).

http://answers.unity3d.com/questions/51002/how-to-create-a-four-vertex-two-tri-square-polygon.html
and
http://answers.unity3d.com/questions/136382/how-to-make-a-plane.html

ZombieApostate
Mar 13, 2011
Sorry, I didn't read your post.

I'm too busy replying to what I wish you said

:allears:

Holy crap that has annoyed me forever. Not enough to go look up a fix for it, but my OCD :psyboom:

SupSuper
Apr 8, 2009

At the Heart of the city is an Alien horror, so vile and so powerful that not even death can claim it.

Yodzilla posted:

God loving dammit I was all getting used to Visual Studio 2012 and for some reason intellisense just randomly loving decides to stop working and aaaarrrrrgghhhh!!

Computers are the loving worst.


e: maybe it was Visual Studio 2010 conflicting? ugh
Visual Studio Intellisense randomly loving up is just one of those facts of life. :v: I've had happen on every version, but usually compiling or restarting fixes it.

Edit:
So that's what that is, I always thought I was the one accidentally resizing it.

SupSuper fucked around with this message at 00:13 on Apr 6, 2013

DancingMachine
Aug 12, 2004

He's a dancing machine!
Hey all, I lurk a bit in this thread and see lots of people posting about Unity development, so I thought this would be worth dropping here:
Amazon Game Studios needs 3d game programmers, artists, and game designers (and more). Positions in Seattle, WA and Lake Forest, CA. We're doing some cool stuff, making the kinds of games you probably want to play and make.
List of jobs here.

SlightlyMadman
Jan 14, 2005

roomforthetuna posted:

The Unity 'plane' object is not the 4-point rectangle you're imagining, it's actually a 10x10 grid of rectangles (for some reason, god knows why they thought that would be more useful than a single quad).

http://answers.unity3d.com/questions/51002/how-to-create-a-four-vertex-two-tri-square-polygon.html
and
http://answers.unity3d.com/questions/136382/how-to-make-a-plane.html

Strange, that makes sense though. I actually decided to keep it as a 10x10 and switch the game grid to be based on a 10x size. This will allow more granular control anyways, since I can make the objects occupying a single grid space different sizes.

The next thing I need to figure out is how to angle the planes to create hill formations. I get that I can rotate them at 45-degree angles if they're along an edge, but I'm not sure how to handle corners so everything is seamless. I'd need to curve them somehow, I guess?

Yodzilla
Apr 29, 2005

Now who looks even dumber?

Beef Witch
Someone please tell me there's no hidden or terrible reason not to use the PlayerPrefs object in Unity because it's so goddamn easy it's glorious.

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!

SlightlyMadman posted:

Strange, that makes sense though. I actually decided to keep it as a 10x10 and switch the game grid to be based on a 10x size. This will allow more granular control anyways, since I can make the objects occupying a single grid space different sizes.

The next thing I need to figure out is how to angle the planes to create hill formations. I get that I can rotate them at 45-degree angles if they're along an edge, but I'm not sure how to handle corners so everything is seamless. I'd need to curve them somehow, I guess?
I think you may have still misunderstood what I was saying. It's not just a 10x10 size, there are 100 rectangles to render in every plane object. So if you're not moving any of the vectors within a plane or doing vertex-based lighting on it or texture skinning it in a way more complex than by setting the corners, it's a huge waste of resources. That's why you're getting the slower 30fps framerate with planes and not with cubes - Unity's plane objects have 16 times as many triangles as a cube (and if you can see the plane, approximately 32 times as many screen-facing triangles.)

Also if you're wanting to do terrain, Unity has a terrain class you could use. I'm not sure how configurable it is, but if you're doing physics with your landscape the terrain object will be a lot more efficient than a mess of planes, even sensible 4-vertex planes.

roomforthetuna fucked around with this message at 20:54 on Apr 6, 2013

Unormal
Nov 16, 2004

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

Yodzilla posted:

Someone please tell me there's no hidden or terrible reason not to use the PlayerPrefs object in Unity because it's so goddamn easy it's glorious.

I've noticed individual reads can be a little slow on mobile devices; so don't read like 50,000 individual settings out of it during time-sensitive operations on mobile devices.

Shalinor
Jun 10, 2002

Can I buy you a rootbeer?

Unormal posted:

I've noticed individual reads can be a little slow on mobile devices; so don't read like 50,000 individual settings out of it during time-sensitive operations on mobile devices.
It's also very easy to hack into, so don't store secure data there or anything.

Orzo
Sep 3, 2004

IT! IT is confusing! Say your goddamn pronouns!
Of all the crazy things Unity does for you, it's kind of humorous to get excited about a service which essentially saves and loads primitives :)

SlightlyMadman
Jan 14, 2005

roomforthetuna posted:

I think you may have still misunderstood what I was saying. It's not just a 10x10 size, there are 100 rectangles to render in every plane object. So if you're not moving any of the vectors within a plane or doing vertex-based lighting on it or texture skinning it in a way more complex than by setting the corners, it's a huge waste of resources. That's why you're getting the slower 30fps framerate with planes and not with cubes - Unity's plane objects have 16 times as many triangles as a cube (and if you can see the plane, approximately 32 times as many screen-facing triangles.)

Also if you're wanting to do terrain, Unity has a terrain class you could use. I'm not sure how configurable it is, but if you're doing physics with your landscape the terrain object will be a lot more efficient than a mess of planes, even sensible 4-vertex planes.

It's definitely more efficient than 100 individual rectangles, because at one point when I was using cubes I set the grid size to 1000x1000 instead of 100x100 and it took several hours to initialize. I'll just need to figure out how to apply separate meshes, so I can draw terrain on each individual segment of the plane, unless that's not possible? I guess in that case I could just go back to blocks.

I'll try messing with the terrain class a bit though. Can I create terrain objects similarly to blocks and planes?

Yodzilla
Apr 29, 2005

Now who looks even dumber?

Beef Witch

Unormal posted:

I've noticed individual reads can be a little slow on mobile devices; so don't read like 50,000 individual settings out of it during time-sensitive operations on mobile devices.

Orzo posted:

Of all the crazy things Unity does for you, it's kind of humorous to get excited about a service which essentially saves and loads primitives :)

No problems there. Noice.

Shalinor posted:

It's also very easy to hack into, so don't store secure data there or anything.

Coming from Torque2D it's a godsend.

SlightlyMadman
Jan 14, 2005

Ok, it seems like using Unity's built-in terrain will definitely work better for me than a grid of planes. I've even found a few blog posts and things by people that have done it, but most of it's old and I'm having trouble locating actual code snippets. It seems like I should be able to basically apply heights to individual points in the terrain map in code though?

xzzy
Mar 5, 2009

SlightlyMadman posted:

Ok, it seems like using Unity's built-in terrain will definitely work better for me than a grid of planes. I've even found a few blog posts and things by people that have done it, but most of it's old and I'm having trouble locating actual code snippets. It seems like I should be able to basically apply heights to individual points in the terrain map in code though?

Yep, I just did this a couple days ago. The terrain class has a terrainData subclass with methods to accept a 2D array of floats to set heights for everything. You can set individual points as well.

Only downside is it's a heightmap, so you can't do any overhangs or caves or anything.

SlightlyMadman
Jan 14, 2005

xzzy posted:

Yep, I just did this a couple days ago. The terrain class has a terrainData subclass with methods to accept a 2D array of floats to set heights for everything. You can set individual points as well.

Only downside is it's a heightmap, so you can't do any overhangs or caves or anything.

Yeah, that sounds like exactly what I want to do! I'll start messing with a terrain generation script, but if you have any snippets you could share it would be a big help.

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!

SlightlyMadman posted:

It's definitely more efficient than 100 individual rectangles, because at one point when I was using cubes I set the grid size to 1000x1000 instead of 100x100 and it took several hours to initialize.
I don't see how that follows at all. 1000x1000 is a million things, 100x100 is only ten thousand things, there's a huge difference. And cubes aren't rectangles.

But yes, despite that "because" not following at all, a plane object will still be more efficient than 100 individual rectangles. But nonetheless it consists of 100 rectangles to render, which is why it significantly less efficient than a cube, which is what I was getting at. The links I gave earlier explained how to get an actual quad object which is what you were looking for - but even that is horrible for making terrain out of, because as soon as you start making hills you can't just rotate the objects - a diagonal that goes uphill is longer than the diagonal along the side of the hill, so your shape isn't a square any more, so you have to go into moving individual vertices.

Which is what you get from a terrain object, in a nice simple way. (Though like xzzy says, it's not quite as flexible as handling vertices for yourself because you can only move them up and down, you can't condense them or overlap them for more advanced shapes.)

SlightlyMadman
Jan 14, 2005

roomforthetuna posted:

I don't see how that follows at all. 1000x1000 is a million things, 100x100 is only ten thousand things, there's a huge difference. And cubes aren't rectangles.

Right, I was saying 1000x1000 cubes is a million things, and 100x100 sets of 100 planes is also a million things. The million planes was way faster to initialize (a couple seconds) than the million cubes (several hours).

roomforthetuna posted:

But yes, despite that "because" not following at all, a plane object will still be more efficient than 100 individual rectangles. But nonetheless it consists of 100 rectangles to render, which is why it significantly less efficient than a cube, which is what I was getting at. The links I gave earlier explained how to get an actual quad object which is what you were looking for - but even that is horrible for making terrain out of, because as soon as you start making hills you can't just rotate the objects - a diagonal that goes uphill is longer than the diagonal along the side of the hill, so your shape isn't a square any more, so you have to go into moving individual vertices.

Which is what you get from a terrain object, in a nice simple way. (Though like xzzy says, it's not quite as flexible as handling vertices for yourself because you can only move them up and down, you can't condense them or overlap them for more advanced shapes.)

It's definitely flexible enough for what I need, and looks like the much better option for what I'm trying to do. I for some reason was under the impression that the terrain tools were just a GUI for generating planes like I was doing procedurally, I didn't realize they were their own game object, since it's not an option in the game object create menu. This is definitely the way to go, so now I just need to figure out how to do it, haha.

xzzy
Mar 5, 2009

SlightlyMadman posted:

Yeah, that sounds like exactly what I want to do! I'll start messing with a terrain generation script, but if you have any snippets you could share it would be a big help.

code:
    public void Start () {
        terrain = Terrain.activeTerrain;
        map = new Map();
        map.makeMap();
        terrain.terrainData.SetHeights (0,0,map.getMap());
    }
The Map class is a homebrewed thing that spits out a 2D array of floats.

My terrain generation is basically a C# conversion of this: http://xzzy.org/sc/

(click the generate word)

Which is a javascript implementation of the map generation code from the original simcity. :v:

SlightlyMadman
Jan 14, 2005

Awesome, yeah I ended up with this

code:
using UnityEngine;
using System.Collections;

public class TerrainGeneratorBehaviorScript : MonoBehaviour {
	
	const int BOARD_HIGH = 32;
	const int BOARD_WIDE = 32;
	
	const float NOISE_SCALE = 1.0f;
	
	private float[,] heightMap;
	
	public Terrain terrainPrefab;

	// Use this for initialization
	void Start () {
		heightMap = new float[BOARD_WIDE, BOARD_HIGH];
		
		float rand_x = 10f;
		float rand_y = 10f;
		int z = 0; // skip height implementation for now and leave it a plane
    		for (int y = 0; y < BOARD_HIGH; y++) {
      			for (int x = 0; x < BOARD_WIDE; x++) {
				float noise_x = rand_x + (float)x / (float)BOARD_WIDE * NOISE_SCALE;
				float noise_y = rand_y + (float)y / (float)BOARD_HIGH * NOISE_SCALE;
				float sample = Mathf.PerlinNoise(noise_x, noise_y);
				int height = (int)Mathf.Floor(sample * 8f);
				heightMap[x, y] = height;
	      		}
    		}
		
		TerrainData terrainData = new TerrainData();
		terrainData.SetHeights(1, 1, heightMap);
		terrainPrefab.terrainData = terrainData;
		
		Instantiate(terrainPrefab, new Vector3(0,0,0), Quaternion.identity);
	}
	
	// Update is called once per frame
	void Update () {
	
	}
}
It doesn't look like much, but I am seeing a tiny patch of terrain showing up on camera, so I'm on the right track.

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!

SlightlyMadman posted:

Right, I was saying 1000x1000 cubes is a million things, and 100x100 sets of 100 planes is also a million things. The million planes was way faster to initialize (a couple seconds) than the million cubes (several hours).
Ah, right, that makes sense of what you were saying. But that's the generation time - there's all the overhead of objects and even just of running the piece of script a million times. In the same way, you could make a single 1000x1000 object and it would most likely be a lot quicker than 100x100 individual objects each one-hundredth of the complexity.

So yes, a single 10x10 plane object is more efficient than 100 individual quad objects, but since you were using the plane effectively in the role of a single quad that comparison isn't useful - the important comparison is that a 10x10 plane is a lot less efficient than a single quad or a single cube, the alternatives you were respectively imagining or trying. And that's where I was explaining why your 100x100 grid of 10x10 planes was running slower than your 100x100 cubes, contrary to your expectations.

But more importantly, good that the Terrain object removes the whole problem and all the subsequent problems you were going to encounter with doing it any of those ways. :)

roomforthetuna fucked around with this message at 22:23 on Apr 6, 2013

Adbot
ADBOT LOVES YOU

SlightlyMadman
Jan 14, 2005

roomforthetuna posted:

And that's where I was explaining why your 100x100 planes was running slower than your 100x100 cubes, contrary to your expectations.

Oh yeah, absolutely, I was just wondering at that point if it might be better to use each plane to represent 100 squares of my grid, effectively lowering the resolution on terrain while still allowing individual squares to be manipulated by the game.

roomforthetuna posted:

But more importantly, good that the Terrain object removes the whole problem and all the subsequent problems you were going to encounter with doing it any of those ways. :)

But yeah, this is probably way better. I'm glad I took the time to experiment with the cubes and planes though, as every new thing I try helps me understand unity better. It's so hard to adjust from only having done 2D games before, but I'm getting there.

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