# CowKing

Member

5

154 Neutral

• Rank
Newbie
1. ## Learning Game engine or Programming first

I'm super biased, but C# in Unity3D can teach you a lot about programming.   Pros: You don't need to worry about dependencies. Unity has about 95% of what a gameplay programmer needs. C#, in my own opinion, is a no bullshit language. Minimal effort, compared to a lot of engines/languages, to compile for different platforms.   Cons: You'll most likely need to buy something off the asset store if you're doing something exotic. (Unity is actually really flexible, and you can emulate a lot of features from other engines, but it will just be a little slower)
2. ## How do I rotate a 2D Vector?

I assume you're using Unity3D, and you're in "2D" mode. In which case, you need to use unity's depth axis 'Z'. You need to rotate the object on it's Z axis. I got really confused on that as well.   Here's what I used to rotate a point: theta is in radians private static Vector2 Rotate2DPoint(Vector2 point, float theta) { float sinT = Mathf.Sin(theta); float cosT = Mathf.Cos(theta); return new Vector2( point.x*cosT - point.y*sinT, point.x*sinT + point.y*cosT ); }
3. ## Trying to break into more adv. game prog. areas

Yeah, I've seen both of those reference websites, but it's comforting to know that I'm already looking at resources that other people would recommend. That OpenGL guide is really good, by the way.   Thank you so much, and you're right on everything. I can read a lot of C++ code do to specific problems I've had in C#, but whose examples/solutions were written in C++. About the whole Physics system, I didn't really think I'd write anything robust; maybe just have a sphere that can bounce/roll/stop, do raycasting. Nothing too advanced where tons of systems are interacting with each other.
4. ## Unity Trying to break into more adv. game prog. areas

I've been programming games for a little while now, but only in C#/Unity. Unity is fine for what I want to make, and is fast enough. The only thing that's been bugging me is that I'd like to work at a (relatively) large company in the future, and everywhere I look it's C++ this and C++ that. I'm a fairly competent programmer, but I just haven't had enough time to really practice more advanced topics like engine development.   What I'd like to do with this personal self bettering: Learn ins and outs of C++. Develop a good knowledge of Multi-threading software architecture. Create a software renderer (IDK, it just seems like it would be fun). Create a separate OpenGL renderer. Ideally, make all custom made Physics/Audio library. Have the engine be cross-platform   Now, What I want to make clear, and I don't know if I can stress this enough, is that I won't be using this for any sort of commercial product whatsoever. Nada.Zip.Zilch. This is more of a way for me to just dick around with stuff in my head. I'll use Unity if I want to actually make a game.   So, I'm wondering if you all could help point me in the right direction for some of these topics. I've looked online for a lot of this stuff, but I thought I would seek wisdom from the elders.   Where's a good place to learn C++ syntax? Everywhere I look it's just aimed at pure beginners that don't know what a variables is.
5. ## Unity light and shadows occlusion

If this has a Minecraft aesthetic, I wouldn't use a traditional light at all. Each cube would be "lit" by itself with the use of vertex colors. It would read the value of the fake light/lights(prefab of some sort with a LightScript component; probably only need omni light and directional light) and edit its own vertex colors based on the normal.   The beauty is that you only need to update when: the cubes are on screen, a cube next to it has been modified(added/removed). I assume you have a way of culling the cubes that are surrounded on all six sides.   Unless ofcourse you're going for an actual complex voxel system, in which case, I got nothing at the moment.