• Create Account

# jms bc

Member Since 07 Dec 2012
Offline Last Active Feb 02 2015 05:20 PM

### #5140667How to prepare yourself for working in game industry?

Posted by on 20 March 2014 - 08:44 AM

<uncalled for general negativity about the industry removed>

### #5118267Pong game looking for review

Posted by on 19 December 2013 - 06:15 PM

Quick play didn't work for me.

Downloaded and it ran fine. Paddle control is very difficult. Background grid is helpful to the player I suppose, but unappealing to my eye. NPC paddle plays well -- I didn't score at all.

Paddle control is the most serious problem, imo. Possible improvements off the top of my head:

1) motion involving acceleration -- ramp up/down quick, player can still 'pulse' the arrow key to move with limited velocity.

2) use the mouse to control the paddle position (cursor and/or scrollwheel)

### #5113850Communicating with Sales staff as a programmer

Posted by on 02 December 2013 - 03:19 PM

There's a guy who has devoted his career to helping people like us

http://www.amazon.com/Dilbert-Compilations/lm/27CQK98XIF63Q

### #5111034Probability question

Posted by on 21 November 2013 - 12:10 PM

3*3*3=27 ways to end, assuming order is important, each equally likely.

If order is not important, there are 10 ways to end ABC,AAB,AAC,BBA,BBC,CCA,CCB,AAA,BBB,CCC which is  (n+k-1) choose (n) where n is the number of spots and k is the number of objects. But they are not all equally likely...

Maybe.

### #5108793Setting members in VB.NET without constructors

Posted by on 12 November 2013 - 03:50 PM

found this example

Public Class Customer

Public Id As Integer

Public Name As String

End Class

then, you can

Dim cust = New Customer() With {.Id = 2, .Name = "VB.NET 9.0"}

### #5108760Knowing the symobls positions out of a stopping angle

Posted by on 12 November 2013 - 01:33 PM

Well, I assume you would calculate the index of the mesh in the center row (or some other reference row), then add or subtract (with wraparound in mind) to get the index of any nearby offscreen meshes.

Still curious (for no good reason) about your intent -- are you trying to compose certain "near misses" that the player would observe as the reel slows down to a stop?

### #5108756Knowing the symobls positions out of a stopping angle

Posted by on 12 November 2013 - 01:17 PM

Pick some mesh to be mesh 0 corresponding to angle = 0. The meshes are presented at intervals of 360/36 = 10 degrees. Then, mesh index = angle/10.  No?

I would like to change the 3 symbols, that are behind the three symbols which will be appeared

That's the part I didn't understand.

### #5082241GPU Compute threading model and its relationship to hardware

Posted by on 01 August 2013 - 11:47 AM

does that mean that I can manually tell the gpu how many threads a wavefront should have ? Sounds unlikely...

You can -- threadblock   *   threads per block = # threads per wave. Up to some maximum #of blocks * max #of threads per block.

what criteria do I calculate these numbers for what I'm trying to accomplish with the compute shader

You will probably have to try different settings and profile for the range of inputs, though you can make some guesses/decisions ahead of time based on memory needs, register usage, etc..

You want to fully utilize the hardware (fast memory, registers and instruction pipeline) to minimize time needed to do the work. Depends on how many cores you have on the GPU, how much cache, available registers, ...and other stuff. You can only run so many threads in parallel, so you want those threads to be utilizing the resources allocated to them otherwise you are leaving hardware idle (ie, use fewer threads that do more work) .  But if the threads require too many resources, then fewer threads can actually run in parallel and speed takes a big hit (so use more threads that do less). You have to find the right balance, probably through testing. Also, whether or not threads need to pass data to each other will factor strongly in the decision, since inter-block communication is problematic.

And how does this map to the actual hardware ?

A few years ago, I found some great diagrams that showed this...keep searching, especially sites of companies that produce GPUs.

### #5080467Smoother player sprite movement?

Posted by on 25 July 2013 - 09:33 AM

the only idea I have is to use acceleration and velocity. Let the mouse movements determine where the desired position is, then code, use a motion profile (acc/vel) to change position. you'll get a 'spring' effect.  Tight coupling (between things like user input and position or velocity) leads to rough movement unless the code is really tight.

Posted by on 25 June 2013 - 05:20 PM

The lessons:

Never take it upon yourself to go after a slacker unless you directly supervise him.

Never complain to bosses about bosses. (this may be why you got nailed)

NEVER (EVER!) get involved with a woman in an abusive relationship.

Someone looking at your work history will know you weren't fired for incompetence since you lasted 4 years.

If asked about why you were fired, mention the woman. If you must explain the chat log, mention the woman. Got crazy for the woman -- totally understandable.

The correct way to handle the situation as you've described would have been to take your concern to the level above your boss

Reads well, but I've only seen it backfire in the real world. I say ignore the situation to the best of your ability.

...or am I just fooling myself...

Yeah, pretty much, you are. You keep categorizing your actions in terms of right/wrong instead of smart/stupid. Employers don't want you to do the right thing, they want you to do what you are told to do.

### #5064590Programming a 2D spritesheet animation system

Posted by on 24 May 2013 - 01:49 PM

You've pretty much covered what I have in my sprite code. My reference point is beneath the center of gravity of the figure, where the ground would be if the unit were standing. This is also marks the vertical displacement of the unit in the position vector. If I could go back, I think I would just make the reference point the center of gravity of the unit.

Actually, if I could go back in time, I would do a skeletal system.

Edit: no, really, if I could go back, I would use a 3rd party tool...

### #5062650A very simple game

Posted by on 17 May 2013 - 02:08 PM

I guess I can compress and post contents of the bin/x86/release folder --  I will get to that after work and mention it here when done.

### #5061859CUDA function calling, what's the best approach?

Posted by on 14 May 2013 - 02:34 PM

texture memory is a read-only (my mesh has to change it's value at each iteration) and special type of global memory

It's more a caching-scheme than it is a special type of memory. I'm pretty sure your Tesla is capable of writing to it, though I've not done that in any of my solutions.

I wouldn't get too caught up in the real world objects you are modeling in considering this, it is really a matter of controlling your memory access pattern so that caching is beneficial, ie threads in the same block access data that are 'close' to each other in global memory. You would transpose your input data to accommodate.

there's also memory size limitations I'd have to consider for a single texture, the meshes in my code can easily reach 100MB

If you transpose your data to a 1d array then a texture can cover ~130MB. If that isn't enough you can use more than 1, but (at least with the last version of CUDA I used) this led to some awkward code and branching because there was no way to represent an array of textures.

### #5058363A very simple game

Posted by on 01 May 2013 - 12:18 PM

I read about these game jams and they make me want to do simple games that can be finished in relatively short time. I wound up between Pong and Pacman with this, I think. I wonder if it is similar to something done before.

There are four gametypes -- capture, avoid, race, and mining.

This is an XNA game, and I'm not sure how to, or if I can, host it in a browser. The installer is untested, so unavailable though I figure people are leery of such, I know I am.

But the screenshots give a good idea of the game play -- the dots move around on the track. The tracks are enabled segments of an underlying pattern of circles and straight lines. The mining game type involves claiming sections of track, the others involve interaction with other dots (units). 1 or 2 players.

Do you think a game like this could find any players? Too basic?

### #5048947Three of a kind numbers

Posted by on 01 April 2013 - 02:11 PM

I think this is the easiest way if you have no need to sort:

int same=0;

for(int i=0;i<4;++i)

for(int j=i+1;j<5;++j)

if(a[i] == a[j])

same++;

same = 1 is a pair

same = 3 is a three of a kind

same = 6 is a quad

same = 10 is 5 of a kind