Jump to content

  • Log In with Google      Sign In   
  • Create Account


BrentChua

Member Since 05 Jul 2011
Offline Last Active Feb 04 2014 08:01 AM
*****

Topics I've Started

Sharing my 2D platformer demo

29 January 2014 - 11:38 PM

Hi Guys,

 

Just wanted to share a little demo i made for a game programming class i teach in my local university. The class is about exploring game systems and architectures used in developing (2D) games.

 

I was nearing the end of the course's lecture and i felt a sudden urge to create a concrete example tying all the systems we have covered so far. This way the students will have a better understanding on how these systems interact with one another to form a whole game. Its not much but i think its enough to show its functionality and get their creativity flowing for their game project. 

 

Source and executable is included in the download link below. This was a quick and dirty implementation of the demo so i'm sure there's a ton of bugs and some poor OOP designs and gameplay code but this was just a demo i came up for 2 nights(mostly trying to get the basic collision/physics system to work). I'd like to continue working on this some more but that's the only time i've got. 

 

Enjoy!

 

Screenshot: 

Attached File  platformer screen 2.jpg   102.08KB   7 downloadsAttached File  platformer screen.jpg   113.26KB   6 downloadsAttached File  Platformer screen 3.jpg   111.23KB   7 downloads

 

Link: https://mega.co.nz/#!ClgDQQLB!liGauqpSWu2QjTgRcPf2z1_c17a4wumVk0r06DTMo0A


Buffer<uint> reading wrong values

15 August 2013 - 02:35 PM

I'm currently trying to get a basic Forward+ renderer working. I've managed to get the first two steps which is the z-prepass, and the lighting stage working. In the lighting stage i have an RWBuffer<uint> that has the format of R8_UINT that stores the tile light indices. That R8_UINT buffer is then passed on to the forward shading stage as an Buffer<uint>. My problem is that when it reads the value of the Buffer<uint>, it always returns 0 even if the buffer contains a different value.

 

I have verified that i am binding the buffer correctly and its value after the lighting stage(compute shader) through the VS Graphics Debugger. Currently, i'm setting my scene so that there are no lights and the light indices buffer are all filled with the max lights value of 256. When it gets to my forward shader though, when it reads the light indices buffer it is always 0. I have checked the buffer bound to my light indices buffer and the xbyte values are all 0xff which should give me 255(uint) but all i get when i read the buffer are all 0. Do i need to do something with the buffer after the compute shader but just before it gets to my forward shader?

 

My implementation is an adoption from MJP's IndexedDeferred demo.


Screen-space to view-space (un)projection?

13 July 2013 - 03:16 AM

I'm currently reading the Forward+ paper in the book GPU pro 4. In the very first sample code, the author shows how to build the frustum for each tile. The code shows like this:

float4 frustum[4];
{ // construct frustum
  float4 v[4];
  v[0] = projToView(8 * GET_GROUP_IDX, 8 * GET_GROUP_IDY, 1.0f );
  v[1] = projToView(8 * (GET_GROUP_IDX + 1), 8 * GET_GROUP_IDY, 1.0f );
  v[2] = projToView(8 * (GET_GROUP_IDX + 1), 8 * (GET_GROUP_IDY + 1), 1.0f );
  v[3] = projToView(8 * GET_GROUP_IDX, 8 * (GET_GROUP_IDY + 1), 1.0f );

  float4 o = make_float4( 0.0f, 0.0f, 0.0f, 0.0f );

  for ( int i = 0; i M 4; ++i )
    frustum[i] = createEquation( o, v[i], v[(i+o)& 3 );
}

Where 8 is the size of the tile and GET_GROUPID is the index of the thread group.

 

The paper says that projToView takes a screen-space pixel indices and depth value and returns coordinates in view space. 

 

My question is, how do i project(unproject?) screen-space position back to view space? Do i just multiply the inverse of projection matrix? But something tells me this is not complete. If screen-space is already mapped in the viewport, do i reverse the viewport mapping first, undevide by w, then multiply the inverse projection matrix? I'm confused... :\


How to get StructuredBuffer in ShaderReflection?

10 July 2013 - 12:39 PM

I'm currently trying to figure out how i would get a StructuredBuffer in HLSL using the ShaderReflection API. I'm reading Practical Rendering and Computation by Jason Zink but the ShaderReflection part doesn't seem to talk about the different buffers. I don't have access to my development computer right now so just wanted to ask here if there's a way for me to check if what i'm getting is a structured buffer and if there's a way of knowing how big that buffer is?

 

The D3D_CBUFFER_TYPE only defines CBUFFER and TBUFFER but it there's none about structured and byte-address buffers. I'm guessing these buffers are just CBUFFER? If they are, is there a way for me to know if its a StructuredBuffer type?


Current state of studios outsourcing art and engineering work these days?

05 July 2013 - 12:20 PM

Hi Guys,

 

I've been working in the (US) game industry as a remote (read offshore) contract engineer for a good 4-5 years. But with the recent closing of the studio i used to work with, ImaginEngine, it's been a bit hard for me looking for another studio who would be interested in hiring a remote contract engineer for their game projects... Well partly because i haven't really done any serious self marketing or reaching out to other studios... yet.

 

I'm currently working on starting an outsourcing studio here in the Philippines with a complete engineering, art, and production team service to offer. Me being aware of the production practices, the competitive skills required, and the culture, think that i would be at an advantage offering my services to a prospective client. Just trying to finish up our website to have some online presence up then i will try to reaching out to some game studios.

 

But... I'm in a constant state of fear thinking that no studio would be interested in my business, wasting all of my efforts, all of my team's effort, all of my money and other investments into nothing! I have started a business before and it failed... I did learn a lot but the pain and sacrifices, and all my financial investments that i've lost!, i endured just makes me a bit more scared about pursuing this. Lol. sorry guys this is actually not what i wanted to ask. I guess this is just normal. I'd be a crazy person not feel this way. The important thing is i'm taking risks and giving it all i've got to make this work.

 

Anyway, i guess what i wanted to ask is to the industry professionals in the United States, Canada, Europe, or any other first-world countries with a booming or stable gaming industry, what is the current state, your views, and or chances of your studio contracting some or some part of your projects to a 3rd party developer particularly offshore?

 

I know i've heard a lot of horror stories about companies outsourcing some of their engineering or art tasks and getting very terrible results and pledging not to ever follow that development path for the sake of "saving" some money or trying to budget the development again and i think that's where my fear stems but what would it take for me to prove that i can be more than capable than these other outsourcing studios just wanting to take your money and giving none and crappy at best results/products? 


PARTNERS