• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.
Sign in to follow this  
Followers 0
ongamex92

Metal API .... whait what

71 posts in this topic

I for one am very happy to see Metal -- much more so than I care about Mantle or D3D 12. The GL ES API is a ridiculous amount of overhead.

0

Share this post


Link to post
Share on other sites


Too bad they had to make it an Objective-C API.

 

Would it be better if it used their new Swift (supposedly Obj-C without the C) language? Because the only things better than Objective-C is a new language based on Objective-C.

0

Share this post


Link to post
Share on other sites

I can't imagine that OpenGL will just go away.  It is used by so many other things besides games.  I figured with all the effort that Valve has put into Linux and OpenGL that it will force them to be relevant.

 

My big question is what to start learning now to stay relevant?  Are there books on this new way of doing graphics, or is it still too "bleeding edge"?

0

Share this post


Link to post
Share on other sites

My big question is what to start learning now to stay relevant?  Are there books on this new way of doing graphics, or is it still too "bleeding edge"?

 

I don't think so. Collectively there's a lot of experience with this style of graphics programming among console developers, but unfortunately nobody can share anything publicly due to NDA's.

Probably the biggest issues with people looking to learn will be the manual memory management and synchronization. These things open the door to a lot of performance gains and memory savings, but getting it right can be very difficult. 

 

Metal's C++ based shader language is an interesting idea. Generics/templates might be fun.

 

Yeah, it's pretty interesting. There's definitely been times when I wished that I could template a function so that I didn't have to write 4 versions of a function to handle the 4 float vector types. Using Clang also seems like a good idea, so that they can leverage that technology instead of subjecting their developers to years of working with a buggy compiler. However if I were them, I would be careful to make sure that it's not too difficult to convert from HLSL or GLSL. Does anyone know if they support swizzles?

2

Share this post


Link to post
Share on other sites

We are now in a fun situation where 3 APIs look largely the same (D3D12, Mantle and Metal) and OpenGL - while this won't "kill" OpenGL the general feeling outside of those who have a vested interest in it is that the other 3 are going to murder it in CPU performance due to lower overhead, explicate control and the ability to setup work across multiple threads.

It'll be interesting to see what, if any, reply Khronos has to this direction of development because aside from the N API problem the shape of the thing is what devs have been asking for (and on consoles using) for a while now.

 

This is why I just want something like this from OpenGl, at least on the driver overhead front and if possible (hardware guys make it so!) with memory control. 1 API to rule them, One API to run them, One API to render them all, and in the code bind them (or bindless if that's your thing).

 

But that's Khronos, at least I got a Lord of the Rings reference out of them.

Edited by Frenetic Pony
2

Share this post


Link to post
Share on other sites


Using Clang also seems like a good idea, so that they can leverage that technology instead of subjecting their developers to years of working with a buggy compiler. However if I were them, I would be careful to make sure that it's not too difficult to convert from HLSL or GLSL. Does anyone know if they support swizzles?

Keep in mind that Apple's GLSL compiler has been running through Clang for some time now.

 


Where is their versioning/extension/feature query APIs? They don't seem to have any in place.

I'd imagine they'll just do the same thing they do for API releases: additive only, place the new features behind [tt]#ifdef METAL_SDK_MIN_VERSION >= 1.1[/tt] guards.

2

Share this post


Link to post
Share on other sites
  • Wth is the 16bytes of color data per sample restriction in Framebuffers? A single 4xFloat32 already consumes all of that and it's not possible to add multiple render targets after that. That is very low, and limits a lot of deferred rendering abilities, which I'd think the latest-gen hardware is very capable of already.

 

I would assume that they're just exposing the limitations of the on-chip framebuffer used by PowerVR GPU's.

0

Share this post


Link to post
Share on other sites

They mention a 4xMRT limit, so 4 x 4x32bit follows on from that anyway, seeing as 4x32bit is the fattest texture format biggrin.png

But yes, a "feature level" API would be nice, so you can ask the device what kind of limits it actually has.

 

BTW, I wouldn't dare use 4 x 4x32bit on the nextgen consoles! That's way too much bandwidth -- At 1080p, that's over 120MiB of framebuffer!

(or if you assume a perfectly optimal only 1 write followed by 1 read per pixel, then at 60Hz that's 14.8GiB/s of bandwidth)

3 x 4x8bit is a pretty standard setup for deferred rendering, and even that's uncomfortable from a bandwidth point of view...

 

Keep in mind that on Xbone, you want to keep your frame-buffers under ~30MiB! 3 x 4x8bit plus a depth buffer just barely fits in 32MiB of ESRAM.

 

Oh, perhaps I read that wrong. The docs state "A framebuffer can store up to 16 bytes of color data per sample."  instead of e.g. "A framebuffer can store up to 16 bytes of color data per sample in each color attachment point."  so I understood that the total amount of bytes is accumulated over all used attachments. If the limit is 16 bytes for each attachment, then that's of course adequate for most uses, however stating such a limit is odd since I don't know of any pixel formats where a pixel takes up more than 16 bytes anyways. I guess there are some exotic RGBAxFloat64Bit that this would limit, but I haven't even heard of such a thing in D3D/GL land.

 

 

 


Will it be available from C/C++ code? The examples are all with Obj-C, but perhaps they will provide a C header for accessing from C code?

 

Since you can write C/C++-code in obj-c files, it should be pretty easy to integrate an Obj-C graphics api into an existing C/C++ engine, just implement your backend in a .m/.mm-file instead of a .c/.cpp-file

 

That fact also makes a C-version of the api a bit unnecessary, it would just be a more or less 1:1 wrapper of the api with little or no gain.

 

This is basically saying "since you can access the API in Objective-C, there's no point in providing a C/C++ API"? I was pondering exactly whether it was possible to avoid having to write Objective-C to access the API.

0

Share this post


Link to post
Share on other sites

This is basically saying "since you can access the API in Objective-C, there's no point in providing a C/C++ API"? I was pondering exactly whether it was possible to avoid having to write Objective-C to access the API.

 

Fair point. I guess I'm so used to writing in multiple languages in one project I don't think of it as a problem...

 

What I was trying to say was that the obj-c api would have to wrapped in a c-api any way, either apple do it and know nothing about the rest of your system, so they have to do a 1:1 mapping, which you then implement your abstractions on top of, or you write the wrapper yourself, and can implement the higher level abstractions directly and shave off one layer of code in your system. (with the same number of levels to maintain). And the obj-c code would not spread in your project, just kept to one or a few files.

 

Also mixing obj-c and c++ is actually very easy and has minimal overhead. Though you would have to write some obj-c code of course smile.png

Edited by Olof Hedman
0

Share this post


Link to post
Share on other sites


This is basically saying "since you can access the API in Objective-C, there's no point in providing a C/C++ API"? I was pondering exactly whether it was possible to avoid having to write Objective-C to access the API.

It's a proprietary platform, with all the framework APIs exposed pretty much only to Objective-C (and now Swift).

 

You already have to write Objective-C just to create a window and a OpenGL context, so I don't think Apple has much impetus to provide C APIs to their newer stuff.

0

Share this post


Link to post
Share on other sites

Metal's C++ based shader language is an interesting idea. Generics/templates might be fun.

I don't think the shader langauge is c++ based. I never seen a double square bracket in c++. Looks more like object c to me

-1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0