A Valid Opinion

June 15, 2009

My own (bad) encryption!

Filed under: Programming — Epitaph64 @ 4:08 pm

I was bored, and decided to use my recent knowledge of bit operations to make a super easy to hack encryption method.

Here’s the source code

It basically uses a randomly generated byte[128] array and XORs the values inside it with the string given as input. Then it XORs them again to return the original values. Not the strongest encryption, but good enough to fool someone at first glance, perhaps.

qZw9@|gJ
ayb2N.fBv iwDkaOIT#

June 13, 2009

Burning sand clone r5

Filed under: Programming — Epitaph64 @ 5:16 pm

Added ability to toggle faucets and if the sand runs off the edge or pools at the bottom.

Source here.

Learning about basic bit manipulation

Filed under: Programming — Epitaph64 @ 5:14 pm

I was recently interested in learning about manipulating bytes to contain flags and such, and so I did some reading, and made a very rudimentary script showing some basic knowledge of the matter.

Source here.

June 11, 2009

Burning Sand Clone r4

Filed under: Programming — Epitaph64 @ 2:46 am

Added ability to toggle gravity and change the brush to create different types of terrain. Also, all of the action happening in the screenshot below is at a constant 100+ frames, since any lag is based on the amount of particles being displaced, and the mound is no longer being computed.

Click here for source code

Click here to download windows binaries

r4

June 9, 2009

Burning Sand Clone r3

Filed under: Programming — Epitaph64 @ 1:06 pm

Now, A good frame-rate will survive many things on screen, and lag is dependent on how many things are moving, instead of just static.

Source here

June 7, 2009

Improving the basic Burning Sand clone

Filed under: Programming — Epitaph64 @ 4:07 pm

I decided to improve upon what was there, and now the game will update much smoother, runs at around 150-300 fps uncapped, and also is a 400×300 grid with 2×2 pixels for a nicer appearance. Also, thanks to kappa from lwjgl for help with setting up the Renderer for displaying the graphics faster.

ssss

Anyways, here’s the updated source for the improved performance version of the program.

EDIT: Improved the mouse so that way it interpolates drags of the mouse for smooth lines. Changes made to the source code link above.

June 3, 2009

Burning Sand Experiment

Filed under: Programming — Epitaph64 @ 6:41 pm

I thought I would try making my own small tech demo of a burning sand style game, but so far I’m going to need to research something faster like VolatileImage or BufferedImage even, since right now the screen is being stored in an int array, and being drawn with fillRect().

Here’s the source code

testterrain

Sphere Game r2

Filed under: Programming — Epitaph64 @ 12:15 am

sphr2

Here’s the updated program

Here’s the source code

Basically, updated to be slightly more entertaining! Now, you must avoid spheres of a different color than your own. You can right click to swatch out your color. The bar on the top represents the mass of black vs white spheres, and you can only gain score when playing as the minority color. So far, there aren’t any difficulty levels or levels to beat, but you *can* win if there are enough spheres on screen, just to avoid lagging. Suggest anything here! Also, if for some reason the player isn’t there when the game begins, it is because it spawns over where your mouse is when you open the program, and your mouse was off screen :P This is a really bad way to do it, but I am too tired to fix it tonight. :)

June 2, 2009

Sphere Game!

Filed under: Programming — Epitaph64 @ 3:53 pm

Dodge the spheres for as long as possible! A super simple game I wrote in about two hours while bored.

ss1

Download the game here

May 30, 2009

Tree Generator

Filed under: Programming — Epitaph64 @ 7:26 pm

I was thinking about procedural generation, and read an interesting post over on tigsource, and decided to make a basic tree generator, since I have basically been tackling any programming problems that are interesting to me. Here’s the result of very little work, but it’s still kind of nifty.

Click here for source code

As usual, mt, is the Mersenne Twister. This can be swapped out for Math.random() or java.util.Random.

tg2

Click here for more! (more…)

Older Posts »

Blog at WordPress.com.