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
stramit
Dec 9, 2004
Ask me about making games instead of gains.

quote:

It is important to note that prior to OpenGL 2.0, these dimensions must be integer powers of 2. There is no requirement that texture maps be square, but a texture loaded with non-power of two dimensions on older OpenGL implementations will cause texturing to be implicitly disabled.

This isn't true. There are a few OpenGL 2.0 cards that don't support npot textures (I'm looking at you ATi X800). I got bitten by this pretty badly about a year ago when I made the assumption that any OpenGL2.0 card can support npot textures. Always make sure that the GL_ARB_texture_non_power_of_two is present, at least until ATi get themselves in line with their old graphics drivers (unlikely).

Adbot
ADBOT LOVES YOU

stramit
Dec 9, 2004
Ask me about making games instead of gains.

Krapfen posted:

I'm using a MacBook and Leopard, so Ruby, Python, C, C++ and C# (using Mono, obviously without XNA) are my most obvious options (comedy Obj-C option). I'd love to learn Ruby or Python, because I could use them outside of game/demo development (for system administration tasks and GUI or web applications), but they seem quite limited for game/demo development (slow, no "professional" frameworks like XNA or DirectX available). I don't plan on developing professional / commercial grade games, 2D and simple 3D should be alright, but then again you never know where you'll end up...

I'm going to go against what I assume will inevitably become the grain here and say Java. My reasons are this:
  • Contrary to popular belief the language is not slow, I feel it gets that wrap due to 'university syndrome' kids come out of college only knowing Java, and not how to 'really' code and release a large number of slow applications;
  • The graphics libraries for OpenGL are exactly like using OpenGL in C, C++ ect;
  • The IDE's are great;
  • Once you get good at it it's quite easy to pick up C++;
  • It's easier to write cross platform graphical applications then with C++ if you are a beginner.

Here are some links to get you started:
http://lwjgl.org/
http://www.jetbrains.com/idea/
http://www.javagaming.org/forums/index.php

Alternatively if you are a die-hard no Java kind of person have a look at Python and Groovy. Python is pretty cool, and Groovy is a scripting language which compiles down (at load time) to Java Byte Code so you can still use Java libraries like lwjgl!

stramit
Dec 9, 2004
Ask me about making games instead of gains.

captain_g posted:


I'm just going to start by saying that your response is massively disproportional in tone to what I wrote, it's like you're trying to start a flame war. I'm going to try an remain quite cool and calm here as I really don't feel like getting into an argument over the internet about this, but I will address your points.

quote:

This is and has been bullshit. Some languages simply are faster than others. I ported a rigid body dynamics library that uses separation axis theorem from c++ to java. The code is identical and built concurrency in mind, however c++ does 800 objects fine whereas the java version chokes on a dick after 200 objects. If you like an avalanche of words I invite you to read my rant of an anecdote:
Never once in my piece did I say that Java was as fast, or faster then C / C++. The truth is that it isn't, and this is why I program in C++ these days due the the speed advantages it has over Java. The point I was making was that for someone who is a beginner to game programming, and wants to write a cross platform game with a minimum of issues, Java is a reasonable solution.

quote:

I posted the results and the code of my rigid body dynamics experiment to a well known java forum and asked what I was doing wrong. I actually anticipated to get constructive criticism that would speed up my code, but instead I got angry and frustrated responses "YOU ARE NOT DOING THINGS JAVA WAY. :argh:"
The Java community is not very receptive when people go "My code was fast in c and slow in Java, what have I done wrong". I agree that this is a problem, but the point they were making is still valid, you do have to program differently in Java to the way you program in C++. I have seen quite a few new C++ programmers who have come from Java land and have big problems. The same goes in the other direction as well. The community SHOULD have tried to help you not flame you, but there point still stands.

quote:

At first I thought I had hosed up my monitors and I was locking and unlocking my resources unnecesary, but after searching and profiling my code I found out that most of the time is spent in vector math calls. Oh well, time to check back to that java forum where the thread had received almost 90 answers at this point.

Constructive criticism, Let Me In On This!

Little did I know that according to java.sun.com forums I should store temporary classes and variables as static variables within the class. A++ all credibility gone. And if I wasn't doing things the Java way, how the gently caress should I do things?
Once again it's an issue with the community not the language. You can get some pretty decent feedback in CoC you know, maybe you should try here. Why does this lead to the credibility of the language dissolving? Also what you say here:

quote:

Little did I know that according to java.sun.com forums I should store temporary classes and variables as static variables within the class.
Sounds quite fishy as the JIT compiler is designed with these things in mind. You may have received some bad advice even.

quote:


The argument JAVA IS SLOW gets shot down as flamewar far too often and I've yet to see a reasonable excuse why it is, in fact, so loving slow. Surely it isn't the fact that JAVA IS THE FUTURE. JAVA WAS THE loving FUTURE TEN YEARS AGO AND I STILL DON'T HAVE FAST ENOUGH COMPUTER TO RUN IT PROPERLY.
That's because it is (the argument that is). I have used it on mission critical application servers, where high performance is an imperative. I have personally witnessed how fast it can go in 'application' space. Some of the products I have worked on would take many more man years to develop and test properly in C++. Java lends itself to large scale systems. Yes there are some performance trade offs but trust can be placed in the platform for use in enterprise applications where 'systems' languages are falling behind.

quote:

Also LWJGL is worthless library. Search javagaming.com for "concurrency" and you'll see one of the librarys main developers is a beligerent twit who spouts out poo poo like "Concurrency will never work out for games, this is why we'll implement lwjgl in a manner that concurrency is impossible to add later on." Remember that all this was said when apples started to come out with dual cores, so not that long a go.
I'm not going to disagree that he is a twat for saying that, multi threading is the future of gaming. But the point remains that LWJGL (from a graphics perspective) is a direct OpenGL binding for Java. OpenGL is state machine which is not respondent to user land multi threaded code. There is no point in LWJGL currently supporting multi threading as serialisation still needs to be performed when native code is reached, and the graphics context can only be active on a single thread at a time.

quote:

I am not saying java isn't for game development. I am just saying that if your design document incorporates Java and Feasible in a competitive mass market game, better get back to the drawing board. It's a good language to build roguelikes, 2d rpgs and other innovative stuff. When used so, it can also be commercially feasible (see "Tribal Trouble"), but it isn't a FAST language, by no means. Sometimes that speed matters, granted not when you are starting out, but the second you gain ambitions Java becomes too slow. It turns into a bottle neck, with a cork on and you're inside of it, stuck without a way out.
I disagree, Java is very suited as a language for hobby developers. For large scale , AAA, games I don't think it is suitable. For rapid development but for deployment of indie / hobbie games it's great.


Edited for some typos / clarification, I had to rush the original post :S

stramit fucked around with this message at 14:11 on Dec 28, 2007

stramit
Dec 9, 2004
Ask me about making games instead of gains.

heeen posted:

What is the correct way to compute a depth buffer value from world position, because this gives my slightly wrong values:
code:
	vec4 transformedpos=gl_ModelViewProjectionMatrix*vec4(actualpos,1);
	gl_FragDepth=(transformedpos.z/transformedpos.w-gl_DepthRange.near)/gl_DepthRange.diff;

I don't have a shader handy which does this, but a good place to start would be to look in the red book about how the depth value is calculated when no shader is bound. There is an overview here: http://www.opengl.org/resources/faq/technical/depthbuffer.htm see point: 12.050

If you want the quick and dirty answer, have a look at this thread here on GPGPU:
http://www.gpgpu.org/forums/viewtopic.php?p=14124.

I tested it out in my own engine on a (very) simple scene and it seemed to work okay. What you really need is the near and far plane, as the calculation is based on that (z buffer has more precision closer to the eye). My code looked like this:

code:
uniform sampler2D diffuseTextureUnit;
uniform float nearPlane;
uniform float farPlane;

varying float eyeZPos;

void main(void)
{
	gl_FragColor = texture2D(diffuseTextureUnit, gl_TexCoord[0].st);
	gl_FragDepth = farPlane / (farPlane - nearPlane) + 
                      ((farPlane * nearPlane / (nearPlane - farPlane)) / eyeZPos);
}

stramit
Dec 9, 2004
Ask me about making games instead of gains.

Hanpan posted:

Is there a XNA alternative for mac development? I'm really into making simple 2d games and have been dabbling in AS3 and Python, but I'm looking for something a little more powerful.

I'd also prefer something which could be used on both Mac and Windows after being compiled.

If you want to make simple 2d games you should look into Slick for Java. It's a 2d games library which uses OpenGL, so the games should work on Win / *nix and OSX. It seems like it can make some pretty cool 2d games. You can even put your games in Java applets for web play. It's pretty cool if you aren't worried about using Java, and if you want to dabble in OpenGl you can do some pretty cool shader stuff in addition to whats provided in the libraries.

Have a look here: http://slick.cokeandcode.com/

stramit
Dec 9, 2004
Ask me about making games instead of gains.

Hanpan posted:

My only real gripe with using Java is that performance is always going to be an issue and I'm not the most advanced coder in the world. It seems that Java / Flash / Python are my only real option for Mac development though.

It's cool that you are using pygame, but I just wanted to clear something up. For pretty much any game you are going to be working on by yourself or in a small group that is not AAA Java is fine. Performance wise it is slower then C++, but given the scope of the game you are making this will not be a problem.

I work in the industry, and professionally I use C++ with Direct X, and it's great. The performance is nice and it allows for things that are impossible in languages like Java. But for all of my home projects I use Java. It's not as fast, but I find iteration and development time decreased by at least one order of magnitude when I program with it. I find it a lot easier to finish and deploy personal indie projects by using Java. And more of an audience can play them.

My personal feeling is that if you are careful Java is a much better way to aproach indie development then C++. I find it slower, but not slow at all.

stramit
Dec 9, 2004
Ask me about making games instead of gains.

Scaevolus posted:

This is true. Also, Python is slower than both Java and C++. PyGame works because the performance critical bits (drawing sprites...) are written in C, while the game logic is written in Python.

Which is also the same reason that OpenGL in Java is fast as well. It uses native code for all the OpenGL calls.

stramit
Dec 9, 2004
Ask me about making games instead of gains.
Did anyone here go in the gamejam last weekend? I went to the sydney one with a friend and we made a pretty solid game in 48hrs. How was everyone's experience?

The group that I was there with were great. Everyone got along well and had a great time. Food was nice and the games fun :D

Our game was called ‘The Ferryman’. As the ferryman it is your job to escort souls across the river of the dead to either Hades or the Elysium fields. You do this by talking to the souls and deciding if they were good or bad souls.

Here is a pic of the game we made (2 man team programmer / artist). We are going to upload it to the internet for other people to play but we want to tune some gameplay first.

stramit
Dec 9, 2004
Ask me about making games instead of gains.

Vinlaen posted:

That looks really neat!

What engine/libraries did you use?

Unity3d. It's pretty much my goto these days for anything game related. I program game tech at work all week (360/ps3). It's nice in my spare time to just focus on gameplay programming. I think I miss it.

@Nibelheim I'll have a play tomorrow when I'm at work. It sounds like a fun idea!

stramit
Dec 9, 2004
Ask me about making games instead of gains.

Vinlaen posted:

Thanks for the info!

How easy do you find Unity?

It's awesome they released the indie version for free but their prices for the professional versions seem a bit high. ($1500) Luckily the indie version has mostly everything but lacks real-time shadows which bothers me.

Also, the iPhone version looks nice ($399) but lacks networking support and requires you to purchase Unity3D Pro ($1500) PLUS iPhone Pro ($1500) which is a bit expensive.

Anyways, I'm still interested in using it. How difficult do you think a Final Fantasy Tactics/Disgaea clone would be?

Unity 3d is the best indie game engine out there in my opinion. You have to do things their way, but the documentation and 'free' stuff you get make it totally worth it. As far as I am aware you do not need the Pro version for iPhone support unless you want the networking ect. The best thing about unity is that you don't have to worry about any low level stuff and can just make a game. All the collision objects and stuff are great the GUI layer is nice ect.

RE Disgaea ect: Unity is an engine that doesn't really like working with 'grid' based games. You can code it over the top but it gets a little messy (I tried this and made a little block pushing tech test - http://blog.strumpy.net/?p=3). The game I made is purely grid based. If you want to do something that isn't grid based, but 'emulates' grid based gameplay that would be much nicer. By this I mean that each movement is a 'specific' distance and that grid data is captured in some higher level game object or as volumes placed in the level.

stramit
Dec 9, 2004
Ask me about making games instead of gains.

brian posted:

I develop alot in Unity3D and can probably help with any questions anyone has regarding the physics/gameplay/non-rendering related stuff. It's one of the joyous development experiences i've ever had in terms of everything not only working correctly but also in scope of possibilities. It may not be super cutting edge graphics wise but for prototyping and iphone games it's really awesome.

The shader language is pretty thorough. If you know what you are doing you can make some pretty awesome effect / graphics. The low level graphics performance (i.e engine stuff that you have no access to) isn't amazingly fast. But for indie stuff it's more then powerful enough.

stramit
Dec 9, 2004
Ask me about making games instead of gains.

Lurking Haro posted:

How about putting the sprites as textures on a simple polygon square?

That's how I would do it if I was making a '2d' game in unity.

stramit
Dec 9, 2004
Ask me about making games instead of gains.

Nibelheim posted:

Why yes, yes I do. Have we met sir?

Staying on topic, this little gem came out of the Sydney Jam: http://www.youtube.com/watch?v=QYPwYfbi8jA

It's called GNILLEY, and basically it's a zelda game that you control with a microphone. It made for a pretty hilarious show.

Yeah that was a really good one! It was kinda hard sitting 2 meters from a guy yelling into a microphone for 40 hours though!

I also just splashed out and bought unity pro... I don't know how they can get away without proper version control systems in the indie version.

stramit
Dec 9, 2004
Ask me about making games instead of gains.

Nibelheim posted:

Haha you were at the Sydney Jam? When me and my buddies were talking about GNILLEY the first thing that came to mind was "I can't imagine having to work next to that team all weekend."

Yeah I was. It was really fun. The one thing I would have liked would be for the comp to run at better hours. We only actually got 40hours (Friday from 9pm until Sunday at 1pm). It was meant to start at 5pm but there was some media stuff ect that we had to do. Waste of time.

I think it would have been better if it had started at midday friday and gone until midday sunday. Could have actually gone home to sleep 8 hours a night as well and still done the same amount of work.

stramit
Dec 9, 2004
Ask me about making games instead of gains.
Quaternion question:

I have written a 3d space controller. It is designed to handle rotation around all 3 axis and it works 'okay'. But there is a slight issue. If I rotate the mouse counter clockwise in a circle pattern a slight counter clockwise roll is induced in the controller and vice versa if I move the mouse in a clockwise motion. What I am doing is I believe quite standard, just multiplying the x,y,z rotation deltas into the existing transform. Can anyone explain to me why this would happen? I am relatively new to quaternions, but this seems correct conceptually to me. Have I got my multiplication order in the last step wrong? Or is the roll I am seeing just a property of quaternions. (Euler has gimbol lock quaternions have an odd roll?)

code:
	void Update ()
	{
		//Ignore input in ignore button is down
		if( Input.GetButton( "IgnoreControl" ) )
		{
			return;
		}
		// Read the mouse input axis
		Vector3 rotationDelta = new Vector3();
		Vector3 scaledSensitivity = rotationSensitivity * Time.deltaTime * 10.0f;
		rotationDelta.x += Input.GetAxis("Mouse X") * scaledSensitivity.x;
		rotationDelta.y += Input.GetAxis("Mouse Y") * scaledSensitivity.y;
		rotationDelta.z -= Input.GetAxis("Roll") * scaledSensitivity.z;
		
		//Create quaternions around x,y,z respectively
		Quaternion xQuaternion = Quaternion.AngleAxis (rotationDelta.x, Vector3.up);
		Quaternion yQuaternion = Quaternion.AngleAxis (rotationDelta.y, Vector3.left);
		Quaternion zQuaternion = Quaternion.AngleAxis (rotationDelta.z, Vector3.forward);
		
		//Rotate the localRotation by these new quaternions
		transform.localRotation = transform.localRotation * xQuaternion * yQuaternion * zQuaternion;
	}

stramit
Dec 9, 2004
Ask me about making games instead of gains.

haveblue posted:

What you're seeing is normal behavior. Each time you change the camera orientation, you're also changing the axes around which future orientation changes will be made. The effect adds up so that when you make that input you don't end up exactly back where you started.

I was hoping that wasn't the case and that I had made a mistake. Are their ways to minimize / remove this 'feature' of quaternions?

stramit
Dec 9, 2004
Ask me about making games instead of gains.

Fecotourist posted:

Can you elaborate at all on what it does, or do you have a link? All I find on the Unity website is on using the GUI tool. If transform.Rotate(EulerAngles) just encapsulates what Strumpy is already doing, it will have the same "problem". Which isn't due to accumulation of errors, but inherent in the spherical geometry of 3D rotations.

This is correct it will do what I am currently experiencing.

Docs are located here:
http://unity3d.com/support/documentation/ScriptReference/Quaternion.html

Thanks for the help guys, but it looks like I'm stuck between a rock and a hard place :(

stramit
Dec 9, 2004
Ask me about making games instead of gains.

OneEightHundred posted:

Yes, though ultimately you need to decide what camera system to use. The typical pitch/yaw type camera system is the one I've described, the one Strumpy's using is a "flight simulator" style system where you can roll the camera via just pitch/yaw because the yaw plane (i.e. the "horizon") will rotate as you pitch. Or more obviously, you can yaw by rolling, pitching upward, and then rolling back to level again.

If you want to use "flight sim" style controls and still try to stabilize towards the horizon level, then apply a bias roll to tilt the camera's side vector towards the horizon plane if the user isn't providing much or any input.

Yea. My controller is designed for a space game so 'horizon' is quite arbitrary. Looking at it all I'm thinking that the unwanted roll is manageable. I've played with a few other things over the past few days (GPU perlin noise for my planet shader ect it's tres awesome). I'll get back to doing game code eventually, I always get distracted with tech!

quote:

Track the total rotation on each axis separately and apply them to a base value instead of the current rotation.
Won't this have issues when you do a complete 180 roll around the forward axis? Input will come out the 'wrong' way along some axis?

Thanks for the help OneEightHundred. I really dislike camera systems and have avoided them most of my professional career.

stramit
Dec 9, 2004
Ask me about making games instead of gains.

haveblue posted:

Sorry, that really is the best way (draw solid black and then wireframe). The depth test is only evaluated for a pixel when it's touched by a primitive, drawing outlines isn't enough.

Better way:
  • Enable depth writing
  • Enable depth testing
  • Disable color writing

  • Render non wireframe

  • Enable depth testing (less then or equal)
  • Enable color writing
  • Disable depth writing

  • Render wireframe

This is known as a z-prepass. Most games do this even when rendering non wireframe because a lot of hardware supports fast-z which means that if you have no fragment shader enabled writing to the z-buffer is much faster. This in turn allows more pixels to get culled when you are doing your color passes so there is less total processing required.

stramit
Dec 9, 2004
Ask me about making games instead of gains.
How do you feel about the current state of scripting?

I am disappointed with many of the 'mainstream' options we have. I find that when running them from an embedded context you often need to fall back to printf's to debug and that is very frustrating.

I think what unity 3d is doing with mono is pretty good. In their next version they will have proper debugging of their script environment.

In general though I'm not totally sold on the whole 'scripting makes things easier' front. Sure you may save some time compiling but I think it takes much longer to track down and fix bugs.

stramit
Dec 9, 2004
Ask me about making games instead of gains.

Centripetal Horse posted:

Speaking of strangling Unity, I spent this past weekend cranking out a few hundred lines of code, perfecting some particle effects, and adding objects to a scene, only to have Unity turn my work into vapor. I saved constantly while working, but as soon as I closed Unity, everything disappeared. All my scripts, which were opened and edited in Mono, are gone (all I can find are old version), my scene reverted back to what it was at the beginning of the week, my particles and other objects are simply gone... I started a thread on the Unity support forum, but drat... How the gently caress does that happen? No warnings that I am saving to a temp folder, or that my changes are not going to stick, or something? Just let me work for almost three straight days, then set fire to all my changes when I close the IDE?

Unity always saves your work to the actual files, not some temporary location. This seems really really weird. Unity does not keep older versions of the project around and there is no inbuilt local VCS. I have no idea how this could happen at all. Did you run a windows rollback or a time machine restore or something?

stramit
Dec 9, 2004
Ask me about making games instead of gains.

The Gripper posted:

Unity things

Yes, my point was that Unity itself has no way of rolling back a project to an older version. It has no internal concept of how to do this.

stramit
Dec 9, 2004
Ask me about making games instead of gains.

quote:

It can happen if you set the path of an asset to the root directory of your assets AssetDataBase.CreateAsset("Assets") (why would you do this?). I don't think this would roll you back to an old version though, just outright delete all your assets.
FYI this is totally stupid, and will be fixed for Unity 4.1.

stramit
Dec 9, 2004
Ask me about making games instead of gains.

Unormal posted:

I just wanted to say I took my first stab at extending the unity editor, and it's incredibly easy. The ability to just instantly throw down editor extensions is a pretty drat cool feature, I like it a lot.

So for instance, I wanted to add an option to the right-click menu on assets to go through all the files in a selected directory and rip through them and do some import fiddling I'd been doing manually.

It turned out to be a matter of a simple method attribute, and bam.

Nice. So one really really important thing to take note of is that when you start writing custom editors (inspectors) or want to do things to more then one object at a time it's REALLY important to not just access objects directly but use SerializedObjects and SerailaizedProperties. They give you heaps of advantages such as: Automatic undo / redo, Multi object editing, Prefab handling, and correctly making objects that are changed as dirty. Check out the docs here: http://docs.unity3d.com/Documentation/ScriptReference/Editor.html.

stramit
Dec 9, 2004
Ask me about making games instead of gains.

Wheany posted:

My guys now have two-frame walking animation.
This is how I ended up doing it: I added the new animation frame graphic next to the existing one in texture and set the "Tiling" parameter in the inspector to 0.5. Then whenever my frame changes, I set the texture offset:

renderer.material.mainTextureOffset = [frame offset as a Vector2].

I missed this earlier, one thing to be aware of is that by doing renderer.material will create a copy of the material asset in the scene (this will only happen the first time on a per renderer basis), these will not get cleaned up until you either change scene or call Resources.UnloadUnusedAssets, even if the gameobject that was referencing the Material goes away.

Most of the time it's better to do use Renderer.SetPropertyBlock, but this does not support texture environment details. I would favor writing a custom shader that uses float paramaters for the tiling / offset and then doing it manually via property blocks to save on the material copy overhead.

Some things to note: Copying the material (instancing) will allow shared instances to be batched (so long as they meet the other batching rules). Using Property blocks currently breaks batching because it can not batch the changed properties. Figure out which on is best for your problem.

stramit
Dec 9, 2004
Ask me about making games instead of gains.

Wheany posted:

Wait, so changing renderer.material.mainTextureOffset makes a new copy of renderer.material?

Because currently I'm doing that 2 timer per second on half of my gameobjects.

Calling renderer.material implicitly creates a copy of the material specifically for that renderer. The copy is ONLY made the first time you call renderer.material. After that the material property will return the cached copy.

stramit
Dec 9, 2004
Ask me about making games instead of gains.

Thumbquat posted:

Noob question, but any idea what would be the advantage of using KeyCode over defining keys in the input manager and calling them by name?

Because the Unity Input manager currently sucks majorly and writing your own that is configurable and better is a very smart idea.

stramit
Dec 9, 2004
Ask me about making games instead of gains.

Paniolo posted:

If you're making a game in Unity unit testing is likely to be a net negative; if you're a Unity developer it's probably a net positive.

Related: There are some good blog posts on how unity gets tested here:
http://blogs.unity3d.com/2013/06/02/runtime-tests-unitys-runtime-api-test-framework/

http://blogs.unity3d.com/2013/07/04/how-we-share-android-test-suites-with-the-world/

stramit
Dec 9, 2004
Ask me about making games instead of gains.
Have you looked into Rebind? I haven't used it myself but have heard decent things:

http://forum.unity3d.com/threads/156355-Rebind-Bindable-keys-for-your-games-Released

A funny side note the unity input manager was written before Unity itself, it's old and very ugly.

stramit
Dec 9, 2004
Ask me about making games instead of gains.
http://unity3d.com/learn/tutorials/projects/stealth
Fastest way to learn unity at the moment.

stramit
Dec 9, 2004
Ask me about making games instead of gains.
FYI Unite Keynote is about to go live:
http://unity3d.com/unite/unite2013/keynote

It should be a good one this year :) We are announcing some nice new features.

stramit
Dec 9, 2004
Ask me about making games instead of gains.

Zizi posted:

uGUI is being developed by the guy that did NGUI, so it should be at least as good-- likely better, due to the engine integration-- I know for a fact that there have already been some fixes made to Unity specifically for uGUI that cause problems in NGUI (mostly dynamic font stuff, IIRC).

* Sprite based (same as the 2d system)
* Cutouts (via stencil buffer now)
* Unity dynamic font rendering
* Sorting (new rendering path)
* New persistent delegate system

I've worked on the font stuff and the delegate system. Michael (NGUI creator) on the gui framework and the design/components. The design is similar to ngui but really tightly integrated into unity with many things made a nicer and easier to use :)

stramit
Dec 9, 2004
Ask me about making games instead of gains.

poemdexter posted:

Is there a timeline for when we might see 4.3? Also, will any of the other talks be live streamed or is that all reserved for conference goers?

None of the other talks will be streamed, but they normally become available on the website soonish after the conference. I'll be putting up slides / demos from my talk before i give it even.

roomforthetuna posted:

On this new Unity update with better 2D stuff, is it going to have a "gently caress you physics, I only want 2D" option that will simplify everything down to 2D, like automatically disabling rotation and movement in the other dimension, or even having a completely separate 2D physics engine? Because that would be nice. So many indie games want to be 2D and ... well, Unity is already still one of the easiest options, but if you could get rid of the unwanted third dimension it would be much better.
It's box 2d in 2d mode, so it's completely separate. If you don't use any 3d physics systems and enable build stripping it will be removed from the executable even :) As for tools ect we will be leaving the transforms ect in 3d, it's so you can create hybrid games with both 2d and 3d content :)

stramit
Dec 9, 2004
Ask me about making games instead of gains.
Well you can start making your game now with 2d toolkit whereas you might have to wait a few months to start with Unity4.3. It's generally a bad idea to wait for tech imo :)

stramit
Dec 9, 2004
Ask me about making games instead of gains.

Shalinor posted:

On the uGUI stuff, did they fix the nGUI issue of requiring you to use a third party bitmap font renderer? Can it go straight from a TTF?

I feel horrible for all those PC-only devs that have to suffer through BMFont. It is almost impossible to get a good looking bitmap got out of it.

It goes straight through ttf, and holy poo poo that is 3 weeks of my life I want to get back.

stramit
Dec 9, 2004
Ask me about making games instead of gains.
NGUI does not have event bubbling as far as I am aware. New Unity GUI does.

stramit
Dec 9, 2004
Ask me about making games instead of gains.

xgalaxy posted:

So I guess Unity 4 still doesn't quite work correctly with namespaces.
We have this strange issue where it thinks the class isn't named the same as the file when trying to attach it to a game object, and when we remove the namespace it works fine. Yet another script with a namespace works fine...
I just had a look in the bug database and we don't have anything about namespaces not working properly (afaik they should 'just work') if you raise a bug with simple repro project and give the the bug number I'll send it off to one of the scripting team, you might be hitting some weird corner case.

Unormal posted:

I haven't had any issues with namespaces; that said Unity has an infinite number of bizarre bugs, so I wouldn't rule it out. Perhaps you've got a naming conflict somewhere?
ehhhhhhhhhhhhhhhhhhhhhhh

stramit
Dec 9, 2004
Ask me about making games instead of gains.

xgalaxy posted:

They also hired the principal developer of Torque2d, Melv May. I dunno if he is working on the 2d stuff though.

He's been bashing away at the 2d physics side of things. :)

stramit
Dec 9, 2004
Ask me about making games instead of gains.

Shalinor posted:

(I'm 8 hours in on trying to do layered rendering in Unity's deferred path... turns out it isn't flexible enough for what I had in mind, so have to refactor my rendering code to brute force it instead :suicide:)

How / what are you trying to do exactly?

quote:

1.) Pick your palette, and store it in a 1D texture, 1 pixel per color.
2.) Render everything in your game with an ID buffer. That is, per pixel, you don't render a color - you render an ID. This ID is a coordinate into the 1D texture that indexes a specific color. It either has to be crazy accurate, or you need a very big palette buffer to avoid cross-sampling colors.
3.) Switch the ID buffer to being your source buf, per-pixel read in the ID, use that to offset into the 1D palette texture, sample color, render final color.

Why bother with step 2? Why not just look up the color straight away? If you want to rotate the palette ect just do a UV offset on the sampler?

stramit fucked around with this message at 14:40 on Oct 14, 2013

Adbot
ADBOT LOVES YOU

stramit
Dec 9, 2004
Ask me about making games instead of gains.

SuicideSnowman posted:

Can anybody with some Unity3D shader knowledge help me out a little?

Am I understanding correctly that if you have multiple passes in a shader that they will all be run if you have a material using that shader?

If so is there a way to only run a certain pass until specified to do otherwise? Similar to how with XNA you actually loop through all passes in a shader and only apply the ones you want to apply. Or even something like being able to set the current technique via "CurrentTechnique"? Basically I have a shader that needs to do multiple things but not immediately.

You can use subshaders and shader LOD to do this :)
http://docs.unity3d.com/Documentation/Components/SL-ShaderLOD.html
http://docs.unity3d.com/Documentation/ScriptReference/Shader-maximumLOD.html
http://docs.unity3d.com/Documentation/Components/SL-SubShader.html

If you are using surface shaders you can actually put multiple subshaders in there... it's just not well documented.

code:
Shader "Transparent/Diffuse" 
{
    Properties 
    {
        _Color ("Main Color", Color) = (1,1,1,1)
        _MainTex ("Base (RGB) Trans (A)", 2D) = "white" {}
    }
     
    SubShader 
    {
        Tags {"Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent"}
        LOD 200
     
        CGPROGRAM
        #pragma surface surf Lambert alpha
         
        sampler2D _MainTex;
        fixed4 _Color;
         
        struct Input 
        {
            float2 uv_MainTex;
        };
         
        void surf (Input IN, inout SurfaceOutput o) 
        {
            fixed4 c = tex2D(_MainTex, IN.uv_MainTex) * _Color;
            o.Albedo = c.rgb;
            o.Alpha = c.a;
        }
        ENDCG
    }
    Fallback "Transparent/VertexLit"
}

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