Visual Studio 2013

The Partridge Family were neither partridges nor a family. Discuss.
User avatar
LuX
Posts: 1492
Joined: April 22nd, 2012, 12:33 pm
Location: Finland

Re: Visual Studio 2013

Post by LuX » August 5th, 2013, 9:35 pm

Not really "out" yet, just the beta version, but it seems to work pretty good. Just beware that the library is not yet standard so it might still be changed.
ʕ •ᴥ•ʔ

User avatar
LuX
Posts: 1492
Joined: April 22nd, 2012, 12:33 pm
Location: Finland

Re: Visual Studio 2013

Post by LuX » August 8th, 2013, 2:17 pm

Came across something weird. So first I had my buffer swap effect as "discard" and one buffer: frames render in about 3-5 ms.

I changed the swap effect to "flip sequential" and 2 buffers: frames render in 16 ms (vsync off) this setting was advised by microsoft. Now add a third buffer and frames render in 1.2-0.5 ms?
ʕ •ᴥ•ʔ

clau007
Posts: 15
Joined: July 30th, 2013, 8:36 pm
Location: Italy

Re: Visual Studio 2013

Post by clau007 » August 9th, 2013, 3:12 pm

LuX wrote:Came across something weird. So first I had my buffer swap effect as "discard" and one buffer: frames render in about 3-5 ms.

I changed the swap effect to "flip sequential" and 2 buffers: frames render in 16 ms (vsync off) this setting was advised by microsoft. Now add a third buffer and frames render in 1.2-0.5 ms?
Flip sequential is the standard swap effect for Windows 8 Apps and It forces Vsync ON (constant 60 fps -> 16 ms per frame). Triplebuffering decreses the input wait time by several milliseconds when Vsync is on... (https://en.wikipedia.org/wiki/Multiple_buffering) and that may be why you're getting better render times (the window should be still presenting at 60 fps, btw).

That may be a plausible explaination. :lol:

User avatar
LuX
Posts: 1492
Joined: April 22nd, 2012, 12:33 pm
Location: Finland

Re: Visual Studio 2013

Post by LuX » August 9th, 2013, 6:27 pm

Thanks for looking into it, you might be right. I looked the enumeration up on the microsoft page and looks like flip sequential is only supported starting windows 8, so back to using just discard. I want to keep windows 7 with platform update as minimum requirement.

Also started again working on Direct2D, but this time D2D 1.1, since 3D takes damn too much time. D2D 1.1 uses Direct3d 11 interoperability and it's really cool for 2D stuff anyway...
ʕ •ᴥ•ʔ

clau007
Posts: 15
Joined: July 30th, 2013, 8:36 pm
Location: Italy

Re: Visual Studio 2013

Post by clau007 » August 9th, 2013, 10:43 pm

LuX wrote: Also started again working on Direct2D, but this time D2D 1.1, since 3D takes damn too much time. D2D 1.1 uses Direct3d 11 interoperability and it's really cool for 2D stuff anyway...
Cool! If you find any good tutorial/ebook on this stuff let me know, because personally I still didn't find a decent one, and by decent I mean a tutorial which carefully explains how every component actually works. I would really appreciate it. :)

Syncan
Posts: 58
Joined: May 13th, 2013, 2:09 pm
Location: Holland

Re: Visual Studio 2013

Post by Syncan » August 9th, 2013, 11:32 pm

clau007 wrote:If you find any good tutorial/ebook on this stuff let me know, because personally I still didn't find a decent one, and by decent I mean a tutorial which carefully explains how every component actually works. I would really appreciate it. :)
If you don't mind, I give you an answer on this one ;)

Programming 2d games from Charles Kelly, ISBN 978-1-4665-0868-2
There's even a website for it:
http://www.programming2dgames.com/

User avatar
LuX
Posts: 1492
Joined: April 22nd, 2012, 12:33 pm
Location: Finland

Re: Visual Studio 2013

Post by LuX » August 10th, 2013, 12:37 am

@Syncan: Seems like a decent 2D game tutorial, but it's not Direct2D.

@clau007: Most of the time I just went through the examples on msdn.

For 1.0 and generally, I read just pages from here: http://msdn.microsoft.com/en-us/library ... s.85).aspx
But also watched some of the pluralsight Direct2D videos by Kenny Kerr. I think you could watch some hours for free if you register.

For 1.1 I read this: http://msdn.microsoft.com/en-us/library ... s.85).aspx
And this: http://katyscode.wordpress.com/2013/01/ ... windows-7/

Dunno what else, you are right there's barely any "easy" tutorials like chili's for this stuff. Just have to learn it the hard way. Once you get the hang it's pretty easy, despite the fact that some people are saying it's overly complex.
ʕ •ᴥ•ʔ

Syncan
Posts: 58
Joined: May 13th, 2013, 2:09 pm
Location: Holland

Re: Visual Studio 2013

Post by Syncan » August 10th, 2013, 9:40 am

LuX wrote:@Syncan: Seems like a decent 2D game tutorial, but it's not Direct2D.
No, it is Direct3D used to write 2D games.
What is the difference between using Direct3D and Direct2D? Isn't Direct2D not a subset from Direct3D?
Always thought that... if so, then that book of mine may help, as it uses listings for setting up Windows, the graphic devices, enz. Once that is done, you don't need to do that again for other games.

User avatar
LuisR14
Posts: 1248
Joined: May 23rd, 2013, 3:52 pm
Location: USA
Contact:

Re: Visual Studio 2013

Post by LuisR14 » August 10th, 2013, 7:29 pm

well D2D is like a framework for 2D that underneath pretty much uses D3D11, but somewhere i read that just using D3D for 2D takes up less code to do the same thing and is faster anyways (i haven't really tested it tho lol)
always available, always on, about ~10 years c/c++, java[script], win32/directx api, [x]html/css/php/some asp/sql experience. (all self taught)
Knows English, Spanish and Japanese.
[url=irc://irc.freenode.net/#pchili]irc://irc.freenode.net/#pchili[/url] [url=irc://luisr14.no-ip.org/#pchili]alt[/url] -- join up if ever want real-time help or to just chat :mrgreen: --

User avatar
LuX
Posts: 1492
Joined: April 22nd, 2012, 12:33 pm
Location: Finland

Re: Visual Studio 2013

Post by LuX » August 10th, 2013, 9:42 pm

Hmm... this is a though topic. I've read and heard benefits from both sides. In a way it does seem a bit slower, but then again it has per primitive anti-aliasing, which can be disabled of course.

Also it has great primitives like AA lines with width ( no "lines" in Dx11, other than vertice lines which are fixed at 1 width, or if you make vertex lines applying AA is hard and in the end will need a lot more code than D2D ), also bezier lines, ellipses, arcs, geometries with geometry fill, etc...

Amount of code: To set up a "basic" 2D framework in D3D will take a lot less code than D2D, but creating a framework equal to D2D and with the same functions you will end up with a lot more to type and think. But that's where interoperability comes in. Still trying to make it fully work, but you can pretty much keep using D3D11 and use some of the primitives of D2D that you need. Also it seemed to me that D2D 1.1 was pretty simple and barely needs code. I had my basic framework done in about 30 minutes, of course copied some of the stuff.

D2D is overly complex if you ask me or almost anyone, not saying microsoft made a good job with it, but it has some really useful drawing methods. Just downloaded the full W8 example project file that has a lot of useful Direct2D samples, tho they are built as Windows Marketplace projects, but the same methods can be used in desktop projects if you modify the code enough.

Still have to learn a lot before I can tell what is better. But soon have my final exams coming so probably don't have too much time to program.
ʕ •ᴥ•ʔ

Post Reply