• Create Account

# Jethro_T

Member Since 07 Oct 2009
Offline Last Active Aug 20 2015 07:29 PM

### Best Way To Calculate Reflection

29 July 2014 - 03:03 AM

Edit: No way to delete this thread?

### Help Me Find a Solution

20 July 2014 - 09:56 PM

I'm trying to figure out the best way to render some per-pixel destructible terrain.  Right now I load my map image into a series of textures (tiles) and keep the raw texture data stored in memory.  When the terrain is destroyed, I simply update my copy of the pixel data and use glTexSubImage2D to update the corresponding textures on the GPU.  Of course this is terrible because I'm wasting memory keeping a copy of the images around.  I'm using OpenGL ES 2.0 so I can't use glGetTexImage to grab the texels from the GPU, update them, then re-upload them.

I think a good solution would be to create and store a bitmask with the dimensions of the map image, with a single bit per pixel and simply store either a 0 or 1 depending on if the pixel has been destroyed or not.  If I do that, I need some sort of method to combine the textures with this bitmask to decide which pixels need to be rendered.  Is there some way I can accomplish this using blending or by uploading my mask to a pixel shader and rendering only the texels that have their mask bit set to 1?

Cheers to whoever can help me figure something out.

### Cryptographic Hash Function Problem

20 February 2013 - 03:58 PM

This is related to my school work, I've basically created an example of a problem that I need to solve to better understand some things.

Say we are given a 128 bit message, m

We have a secure hash function H(x) that produces 256 bit output

We want to find a 128 bit value, t, such that H(m || t) gives us a result that has 50 leading zeros.  Note: m || t is m concatenated with t.

The question is, how many times do we need to call the hash function so that we can expect to find at least one value of t that satisfies our requirement.

All help  is appreciated.

### Tail Recursion

21 January 2013 - 12:58 AM

Hey guys, I have a function that I implemented easily using regular recursion but I've been trying to figure out how to write it using tail recursion instead, I can't seem to wrap my head around it though at all.

The function is:

if n < 4:

f(n) = n

else:

f(n) = f(n - 1) + 2(f(n - 2)) + 3(f(n - 3)) + 4(f(n - 4))

Can anyone help me figure out how to solve this using tail recursion?

### CS Honors Project

13 December 2012 - 05:10 PM

I'm a 3rd year CS major and former hobby game programmer throughout highschool and during my first year of uni. I have to do an honors project next year so it's time to start thinking of a good topic to work on. I know this forum is filled with great people, so it's the first place I thought I would come to ask for any ideas.

I want the project to have a large programming component, but it also needs to have something that is academically interesting.
My interests include:

1. Game development, specifically interested in persistent online (not neccessarily massive) multiplayer player worlds
2. Parallel programming, I would love to be able to find something related to games and parallel programming
3. Networking
4. Procedural generation of things related to games, something that is NOT terrain related

Does anyone have any ideas that could help me find a topic? I'm open to ideas that aren't related to my posted interests.

All input is greatly appreciated!

PARTNERS