Jump to content
  • Advertisement
Sign in to follow this  
timetopat

Unity Learning about how games work, do i have this backwards?

This topic is 2264 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I am someone who uses unity 3d and a lot of engines and some very high level frame works a lot. I was thinking to myself recently that I dont know how many of these things work, or in fact why. I dont know why 2d coordinates start in the top left corner, nor how 3d graphics seem to work. I just know that they do. This troubled me and I wanted to learn more. I figured as someone who wanted to specialize in software development It would be good to focus on those topics. I know a lot of java and I decided maybe I should look at LWJGL and try that library. It seems great. A way to use many gl calls in java and learn about more advanced topics. I then was reading that JmonkeyEngine used LWJGL and that it would be a better idea to use that because in the end i would be (at best) recreating that tool. This started to perplex me about how abstraction works with what I type in to how it actually works. I then thought to myself maybe it would be best to use regular OpenGL and SDL instead of LWJGL to learn. This got me thinking that you could infinitely go down the chain of lower level languages and Ideas until you got to binary.

So after that long winded post, how much abstraction is good in learning about how to develop a game and its systems? Or is it best to use the highest level tool you have because one could argue," why not use assembly", and even lower level stuff. I like Java a lot and I am not a big fan of manual memory management, but is this ok if I want to learn more about how games work using java and LWJGL?

Thanks

Share this post


Link to post
Share on other sites
Advertisement
how much abstraction is good in learning about how to develop a game and its systems[/quote]

Depends on abstraction. OGl/LWJGL/etc. are just APIs. The abstraction they provide is the graphics pipeline, something which has been defined formally in every intro computer graphics class. Another topic is linear algebra.

Java is not relevant here either, it's just another language and if using OGL it does it the same way. They are just convenience implementation which may cut down on some boilerplate code.

Unity and MonkeyEngine provide different abstractions again, including scene and asset management, the usual simulation logic and perhaps a few more things.

I dont know why 2d coordinates start in the top left corner, nor how 3d graphics seem to work.[/quote]
First learn linear algebra, there are plenty of courses since it's typically intro level. Next look into rendering pipeline, it's often more advanced (perhaps 3xx type course), but concepts are universal across just about all APIs. Only thing related to implementation is the pre-/post-shader approach (DX9 vs. DX10+).

why not use assembly[/quote]
Because it's not only not an abstraction, but also not very practical or useful. Assembly is just means of encoding a concept for given hardware. It does nothing to help understand computer graphics better.

Share this post


Link to post
Share on other sites
Thank you for the advice. I see what you are saying and I thank you for the leads(Linear algebra,into to computer graphics,etc). The reason I brought up assembly was because I took a course on it and it was very painful for me and it was the lowest level things I dealt with. That is why I thought that if one argues to go lower level you could eventually hit assembly and eventually hit a why bother.

Share this post


Link to post
Share on other sites
That is why I thought that if one argues to go lower level you could eventually hit assembly and eventually hit a why bother.[/quote]

In many ways, shaders are a form of GPU assembly. So are SIMD instructions which are common in graphics algorithms since they are a good fit. But learning those will not teach the concepts behind graphics.

Main high-level concepts are:
- fixed/variable time step simulation
- linear algebra, forms the basis for representing 2D/3D spaces
- graphics pipeline, somewhat hardware-specific, since hardware evolved around proven concepts

Technologies:
- toolchain - vague, but perhaps important to make as transparent as possible, the *real* value of engines
- platform - Flash vs. native vs. sandbox vs. ... It defines the constraints and trade-offs
- language and APIs - defined by platform. While in general there are few restrictions, some are good fit, others are not. On Windows, Java + DX is a very poor fit, even though it's technically doable.

The only stuff that really matters:
- Fun and getting other people to like what you build. Nobody will ask how it was built.

Share this post


Link to post
Share on other sites
Little off the subject but what did programmers do before there was Directx or any other Graphics API? Did they make there own? Was game programming in DOS before there was Windows much more difficult then it is today?

Share this post


Link to post
Share on other sites

Little off the subject but what did programmers do before there was Directx or any other Graphics API? Did they make there own? Was game programming in DOS before there was Windows much more difficult then it is today?

Yes.

In the 90s era, before Voodoo launch, you had either ModeX or similar common video modes or later VESA. There was a list of memory addresses and interrupts (mov ax, 13h; int 10;). Then you simply wrote to screen buffer. If you wanted to draw a line you implemented Bresenham's algorithm. Same for circle. And polygon fill. Or just wrote to memory directly. There were libraries (Pascal had BGL), which were fairly high level and user friendly, but slow. And slow back then mean that filling a circle could take 5 seconds compared to 120fps that was possible using tweaked assembly.

Before that, Hercules graphics or such was really basic. You would look up which chip does the logic, add a ram chip, solder everything and that was it. A "graphics card". It would be just part of memory you wrote to and read from, like the rest of code. GPUs still work in mostly the same way, but those parts were hand assembled from off-the-shelf components and they worked.

On home computers, it was similar. Graphics were mostly non-existant, but certain chips could be forced to do graphical stuff. If they supported sprites, you'd use that. Then there were hacks, such as redefining the look of fonts so that characters would form graphics. There were no standards, you read through the chip specs.

Interestingly, there were some types of graphics which were absurdly trivial compared to today. Parallax scrolling is one such effect, it was just a single shift with no abstraction in between, making it effectively free. Today one would likely need to move a texture around through entire driver architecture or use a shader which is again an incredibly complex framework with compiler in between.

There were tons of books on tweaks and hacks and obscure algorithms that made things possible at all. These tweaks are still largely present today deep in drivers or hardware, but exposing the to end user simply isn't viable let alone useful. Most were just techniques which were a good fit for hardware.


But considering I can do canvas.drawTo(...) today and have hardware accelerated graphics running instantly in any browser, old times are best left forgotten.

I'd even argue that using DX/OGL today is a bit low level. One is much better off using stuff that gives you entire character with skinning and animation or pathfinding code or such.

Knowing the APIs is still useful if doing phone or similar development, it allows much more direct and lightweight approach. But it's increasingly hard to justify development effort in commercial setting given given how much middleware is available.

Share this post


Link to post
Share on other sites
Hidden
To be blunt, that is literally an invalid question these days. Nothing used that far back could be an any benefit to you today. But yes, everything was coded from scratch and manually. Engines did not come around until years later.

As for what you need, well, above repliers have suggested learning linear algebra etc.
I flunked Algebra II.
Then I flunked it again.
Then I flunked it again and dropped out of high school.

Why do I know Algebra II and calculus? Because I found a use for them while learning how to program later on.

Don’t learn linear algebra.
Learn how to make games, and when you encounter something along the way you don’t understand, learn it.
It is really that simple.

It is true that I know only a subset of all linear algebra. Which is probably why I am fairly successful. I may not be able to talk the talk at a table full of math experts, but I know all the math that actually applies to my life/career, and anything beyond that may help me at those conventions with math experts we all know I so-often attend (sarcasm), but is otherwise time better spent on various graphics techniques, AI theory, etc.


That being said, yes, Java will cause you problems down the road. Check online for game-programming positions. Use http://www.gamedevmap.com/ to find companies in any part of the world where you would want to work, including those closest to you (but I would recommend traveling the world, and I don’t mean just hypothetically).
Any jobs asking for Java skills?
I haven’t seen such a thing yet, and you won’t either.

Making games with Java? A useless skill. Start C++ and your last disadvantage will be out of the way.


L. Spiro

Share this post


Link to post

So after that long winded post, how much abstraction is good in learning about how to develop a game and its systems? Or is it best to use the highest level tool you have because one could argue," why not use assembly", and even lower level stuff. I like Java a lot and I am not a big fan of manual memory management, but is this ok if I want to learn more about how games work using java and LWJGL?

Thanks

It just depends on what you want to learn and accomplish. If making games is your goal, there's no reason not to keep using Unity or whatever other engine you want to learn. If you want to learn more about how graphics works under the hood, then OpenGL or Direct3D is probably what you want to study. And if that's your goal you'll want to get into the linear algebra stuff sooner rather than later.

Share this post


Link to post
Share on other sites
Regarding, specifically, JmonkeyEngine vs LWJGL: what are you drawing? Do you have models, textures, lights and scene graphs in general, for which an engine is suitable, or do you stuff low-level data into nontrivial buffer structures in order to run your custom shaders, for which you don't need any library help besides taking care of OpenGL contexts and other objects? If you need something special, does the graphics engine allow you to make arbitrary OpenGL calls?

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
  • Advertisement
  • Popular Tags

  • Popular Now

  • Advertisement
  • Similar Content

    • By Armaan Gupta
      Hey There,
      I am a developer and Im working on a blockchain based infinite runner type game. Right now, I am working on releasing the beta version with a couple other game developers, but would love to expand the team and have other talented and bright people contributing. The game portion of the project isnt very complicated, and wouldnt require anyone to pull thier hair out for it.
      If you are interested in joining a project, interested in the idea, or would like some more information, please don't hesitate to ask either by commenting, discord (username: Guppy#7625), or by email (armaangupta01@gmail.com).
      Thank you!
    • By Joydeep Mani
      I am trying to build a particle system for unity based on "Destiny particle architecture " released in Siggraph.
      I encounter a problem in trying to understand how they iterated this:

      Converted to spline function and the result is

      i wanted to know how did they converted the function in the editor to represent the graph ??
       
    • By Xerath Dragons
      This is my first experiment use for create my original character little cute dragon chibi use zbrush and blender and use unity3d assest free for enviroment scene you have feedback?
       


    • By Aryndon
      Project Redemption is an semi-fantasy RPG with a linear story and an elaborate combat system.
      We are building in Unity and are currently looking animators and artists.
      What we are looking for
      -Someone who is okay with split revenue/profits when finished
      -Collaborate with others in the team. Do you have an idea/thought on what should be included? Tell us!
      -Someone who wants to work with people that are passionate about this project
      If you are interested. Please message me and I will get back to you as soon as possible! Or add me on Discord AJ#6664
    • By Aggrojag
      Hello!
      I'm working on a game that is a narrative driven dark comedy with some small aspects of platforming and puzzle solving. The project is rather small as well. It touches on topics such as suicide, mental illness, family, corruption, free-will, and redemption.
      This project is exercise in polish, this means some experimentation will be needed along with some reworking of assets as they're provided.
      This will be a revshare model.
      First, I'm looking for a 2D sprite artist, not pixelated, that can compliment the style of the attached images, and be similar to the temporary character.
      We are looking to bring on a SFX designer at this time. Full list of required SFX will be available upon request, as well as a build with all elements related to sound implemented in some form (many SFXs pulled from the web for now). Will likely require some field recording, and some pretty strange SFX for when things get weird. I imagine a good portion of these will be quite fun to create.
      Lastly, I'm looking for a male voice actor, English should be your primary language. There will be at minimum two characters that will need to be brought to life through vocals. The first voice is similar to Marvin from Hitchhiker's Guide to the Galaxy. A reference for the second voice would be a mix of Ren (Ren & Stimpy), and Android 21 (DragonBallFighterZ). Due to formatting, I'm not including YouTube links in the post, sorry.
       
      WIP Scene with our custom shaders attached (platforms are lazily placed, as this was an asset test):

      A scene with dynamic lighting and temp character:

       
      Unshaded asset:

      If you made it to the bottom, thank you, and I look forward to hearing from you.
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!