Jump to content

Programmers/Coders?

Sign in to follow this  

Recommended Posts

Kind of like the artists thread, but this time for programmers! I made a couple of threads about some C++ coding problems I'd had before that didn't attract too much interest, but there's plenty of other programming languages out there.

 

I'm learning how to code with the Windows API and DirectX. I've progressed beyond my original test-bed and made a small little program with bouncing objects. They're just squares colliding with each other, and I really need to think of ways I can optimise how I'm doing it. My brother seems to think I should have some sort of system that uses trigonometry, but I can't think how I'd do that right now.

 

For those interested, here's a couple of things, just extract it somewhere and run, then delete it afterwards. Hit F3 to display the framerate (which may be a little off), and hit Space to create objects. Hold it down to create lots and consume your framerate.

 

The framerate is inconsistent because the collision correction could probably be done more efficiently, and there is a random bug where occasionally everything freezes.

 

http://dl.dropbox.com/u/32830518/dxPongCollisions.rar

http://dl.dropbox.com/u/32830518/dxPongCollisionsSlower.rar The speeds the squares can move at are a little slower to make the collisions more easy to observe.

 

As the name implies, I'm making a pong clone, but I did get a little carried away with the collision system. Momentum is properly transferred I might add (mechanics world style, no momentum is lost).

 

(EDIT: It also appears to leak memory somewhere. If run for long enough it consumes up to 1.9GB of memory before presenting a runtime error. New task: Manage memory better).

 

So, anyone else here a programmer? Working on something interesting? Want to show your work? Post! :D

Feel free to PM me about almost anything and I'll do my best to answer. :)

 

"Beware of what you ask for, for it may come to pass..."

Share this post


Link to post
Nagisa's going to have a field day with this post. :lol:

 

Indeed. :P

 

Hopefully others too! Crawling out of the woodwork and so on. :lol:

Feel free to PM me about almost anything and I'll do my best to answer. :)

 

"Beware of what you ask for, for it may come to pass..."

Share this post


Link to post

I learned Java throughout high school and was the top of my class, and I learned the same stuff again in college last semester, but I still don't know enough to anything cool. I am majopring in Game Design though, so hopefully I'll learn some good stuff soon.

 

I've also made some Flash Games with Actionscript 2.0, but once again it was never anything too difficult or cool. I just had one really good book that explained how to do almost everything.

http://steamcommunity.com/id/ShinyShiny

 

"Anything I can do to help?"

Share this post


Link to post

I used to be a pretty decent programmer back in college: mainly C, a lot of Matlab and POV-Ray scripts (I have a mean animation of the basic components of an MRI machine)... but it's been at least 8 years since I wrote a single line of code. I'll check my files later, see if there's anything interesting.

 

( I also used to write some cool Atari BASIC programs... but they are now lost in the mist of time :lol:)

I bring you mortal danger and cookies. Not necessarily in that order.

http://www.youtube.com/jclc

Share this post


Link to post

Ok, here's the animation I made for my thesis defense. It shows the main coils of a Magnetic Resonance Imaging Scanner and then continues on to the process of alignment of the spins, excitation and readout of the resulting signal. I've attached the POV-Ray scripts, in the off chance someone actually still uses POV-Ray and wants to check out the code.

 

WWwH7Zt-vhU

 

 

A little explanation on MRI: our body is composed primarily of water. The hydrogen nuclei in it can be thought of as small magnets. It you put your body inside a constant magnetic field (like the one generated by the huge superconductive coil you can see in the video) they all align. Then, if you introduce a radio frequency pulse at just the right frequency (known as the resonance frequency), they start to spin around. Then, if you cut the RF pulse, the nuclei slowly align themselves back with the main field. During this process, if you have a coil next to them, you see a changing magnetic field. That signal, along with some fancy math, allow to build the images doctors use.

 

I bring you mortal danger and cookies. Not necessarily in that order.

http://www.youtube.com/jclc

Share this post


Link to post

The last time I worked with coding was 4 years ago when I programmed a BMP interfaced game of pong in BASIC. don't ask me to remember much of anything from it, I'd need to bust out the old program again to do anything.

 

I briefly dabbled in Java and even more briefly with C++ but coding just isn't really my thing.

Retired Forum Moderator

Share this post


Link to post
Nagisa's going to have a field day with this post. :lol:

Nope. I wish. I'm not working on anything decent right now, just resurrecting a kids game that closed four years ago called CokeStudios. I don't even know why.

 

 

For those that are interested, the game is in shockwave and is kind of like Habbo. You mixed music with it to make money, or played the minigames. You spent the money on virtual furniture to make rooms etc. I really don't know why I'm bothering to bring it back. The client is annoyingly protected. It uses a really bad system for half of the connection, which I can only assume was sabotage on the part of the developers.

 

But yeah, I really have nothing better to do. I played it back in 2002/2004.

 

Share this post


Link to post
Ok, here's the animation I made for my thesis defense. It shows the main coils of a Magnetic Resonance Imaging Scanner and then continues on to the process of alignment of the spins, excitation and readout of the resulting signal. I've attached the POV-Ray scripts, in the off chance someone actually still uses POV-Ray and wants to check out the code.

 

WWwH7Zt-vhU

 

 

A little explanation on MRI: our body is composed primarily of water. The hydrogen nuclei in it can be thought of as small magnets. It you put your body inside a constant magnetic field (like the one generated by the huge superconductive coil you can see in the video) they all align. Then, if you introduce a radio frequency pulse at just the right frequency (known as the resonance frequency), they start to spin around. Then, if you cut the RF pulse, the nuclei slowly align themselves back with the main field. During this process, if you have a coil next to them, you see a changing magnetic field. That signal, along with some fancy math, allow to build the images doctors use.

 

Never heard of POV-Ray before, but the animation seemed pretty neat. :3

Feel free to PM me about almost anything and I'll do my best to answer. :)

 

"Beware of what you ask for, for it may come to pass..."

Share this post


Link to post

I asked one of my clan mates to teach me LUA a bit. I managed to make a small GMOD swep, but now i forgot.

[82nd] Mr. Kochi Bracegirlde: You just blow that fife

[82nd] Mr. Kochi Bracegirlde: the 'if ye know what i mean' aside

Hooper: want to give your men a fast reload? BLOW ME FIRST

Share this post


Link to post

It's been a few years since I've programmed anything other than an occasional DVD...

 

The last thing I've done - a simple game - is attached (a zipped .exe - safe, no viruses/trojans, maybe a bug or two).

 

The language used is called SiMPLE which is basically an abstraction layer for a C++ compiler.

 

Regards

 

P.S. Forgot to mention - press to enable cheats...

Edited by Guest (see edit history)

Share this post


Link to post
I know my way around lua, that tutorial happened to help alot, actually. XD

 

Only problem I have with coding is small errors that screw up the entire thing.

 

That happens with everything, but it's always satisfying to crush them!

Feel free to PM me about almost anything and I'll do my best to answer. :)

 

"Beware of what you ask for, for it may come to pass..."

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in the community.

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  


×
×
  • Create New...

This website uses cookies, as do most websites since the 90s. By using this site, you consent to cookies. We have to say this or we get in trouble. Learn more.