Author Topic: Give Me Something To Program, Goddammit!  (Read 2463 times)

0 Members and 1 Guest are viewing this topic.

Offline Captain Jack Harkness

  • Petter, Brony, and All-Around Cartoon Addict
  • The Beast
  • *****
  • Posts: 2868
  • Gender: Male
  • Or as a friend calls him, Captain Jack Hotness!
Give Me Something To Program, Goddammit!
« on: December 27, 2012, 11:59:26 pm »
Okay, I haven't programmed in a while.  I seriously need something to program.  I'm starting to get rusty, and I have like...zero inspiration.

Could somebody give me some sort of suggestions as to what I should make?
My friend's blog.  Check it out!

I blame/credit The Doctor with inspiring my name change.

Saturn500

  • Guest
Re: Give Me Something To Program, Goddammit!
« Reply #1 on: December 28, 2012, 12:09:53 am »
A calculator which has a button which adds half of the current number.

Offline Captain Jack Harkness

  • Petter, Brony, and All-Around Cartoon Addict
  • The Beast
  • *****
  • Posts: 2868
  • Gender: Male
  • Or as a friend calls him, Captain Jack Hotness!
Re: Give Me Something To Program, Goddammit!
« Reply #2 on: December 28, 2012, 12:14:30 am »
A calculator which has a button which adds half of the current number.

Sure, why not?  Are there any other functions I should look to include?

Of course...I should probably try to get back into the good habit of planning out the frontend and all that jazz...
My friend's blog.  Check it out!

I blame/credit The Doctor with inspiring my name change.

Offline JohnE

  • The Beast
  • *****
  • Posts: 1882
  • Gender: Male
  • Heeeere's JohnE!
Re: Give Me Something To Program, Goddammit!
« Reply #3 on: December 28, 2012, 12:30:01 am »
I actually have some ideas for simple (relatively) programs/games, but they'd require some graphics and other stuff that I haven't made yet.

Offline Captain Jack Harkness

  • Petter, Brony, and All-Around Cartoon Addict
  • The Beast
  • *****
  • Posts: 2868
  • Gender: Male
  • Or as a friend calls him, Captain Jack Hotness!
Re: Give Me Something To Program, Goddammit!
« Reply #4 on: December 28, 2012, 12:55:57 am »
I actually have some ideas for simple (relatively) programs/games, but they'd require some graphics and other stuff that I haven't made yet.

Hm...could those graphics and whatnot be represented by simple shapes or sketches or...something?

Oh, and to help me recover from my rustiness, I do have a good number of books on programming, and I went and downloaded my schoolwork from the past few years from my college's FTP site.
« Last Edit: December 28, 2012, 01:58:45 am by B-Man »
My friend's blog.  Check it out!

I blame/credit The Doctor with inspiring my name change.

Offline Witchyjoshy

  • SHITLORD THUNDERBASTARD!!
  • Kakarot
  • ******
  • Posts: 9044
  • Gender: Male
  • Thinks he's a bard
Re: Give Me Something To Program, Goddammit!
« Reply #5 on: December 28, 2012, 04:10:25 am »
Make a program that loads a bunch of variables, dumps them, then starts displaying a small animated image of a robot running into the edge of the screen.
Mockery of ideas you don't comprehend or understand is the surest mark of unintelligence.

Even the worst union is better than the best Walmart.

Caladur's Active Character Sheet

Offline Sleepy

  • Fuck Yes Sunshine In a Bag
  • The Beast
  • *****
  • Posts: 4598
  • Gender: Female
  • Danger zone
Re: Give Me Something To Program, Goddammit!
« Reply #6 on: December 28, 2012, 12:16:24 pm »
Create a bank simulation using a queue to represent the line. Have random events such as customer complaints and bank robberies (making the probability of the latter fairly low, of course).
Guys, this is getting creepy. Can we talk about cannibalism instead?

If a clown eats salmon on Tuesday, how much does a triangle weigh on Jupiter? Ask Mr. Wiggins for 10% off of your next dry cleaning bill. -Hades

Offline Auggziliary

  • The Beast
  • *****
  • Posts: 1185
  • Gender: Female
  • Queen of the birdies
Re: Give Me Something To Program, Goddammit!
« Reply #7 on: December 28, 2012, 01:15:49 pm »
Create a virus that makes everything you type turn into the word "Wieners".
BITCHES! YOU BITCHES! Killing me won't bring back your God damn honey!

Offline Captain Jack Harkness

  • Petter, Brony, and All-Around Cartoon Addict
  • The Beast
  • *****
  • Posts: 2868
  • Gender: Male
  • Or as a friend calls him, Captain Jack Hotness!
Re: Give Me Something To Program, Goddammit!
« Reply #8 on: December 28, 2012, 11:11:05 pm »
Well, when I say I have zero inspiration, that might not be entirely true.

I was thinking about programming a Snake game a little bit...

The think is, I was thinking "How would I handle turns?"  Well, my thinking is that the turn coordinates could be stored in a queue, since those are FIFO.  Like, limit what buttons respond to direction depending on your current direction, and then I could place the coordinates the snake was at and the direction it was traveling before the turn.

Of course, there's also the problem of like...seeing if the front of the snake intercepts any part of the body of the snake, which would result in a game over.  Hm...

I suppose I said I have no inspiration because I'm still kinda trying to find a way to solve that without being too super complex.

I could maybe like...I dunno.  Maybe I could store an array representing the game grid.  Maybe I could like, make some named constants and put values to them and then assign them to the array as the game plays.  Like, I could have an LEFT, RIGHT, UP DOWN, TURN UP, TURN DOWN, TURN LEFT, AND TURN RIGHT...or something.  Maybe corners could just be named the new direction that the snake's gonna be erased in, leaving just the four directions.  There'd also be a value to refer to blank spaces.  Then the current coordinates of the head could be checked against the corresponding array value, and if the value isn't BLANK or FOOD, then you've either hit a wall or your body (depending on if I want to make it a wraparound version of snake or not - although I could make that configurable).

Sorry about my rambling.  I'm just trying to come up with a good solution for solving a snake programming problem.  I'm just kind of typing this up as I think of ways that would work without being some clusterfuck hassle.

So far, I'm liking my random musings.  I think an array would work well.  I could have a snake class that just keeps track of like, the back and front coordinates of the snake, and would have functions to see which way the back and front of the snake should travel once it reaches a new coordinate on the game grid.  It would also be able to see if it's encountered food, its body, or a wall or whatever.
My friend's blog.  Check it out!

I blame/credit The Doctor with inspiring my name change.

Offline Sleepy

  • Fuck Yes Sunshine In a Bag
  • The Beast
  • *****
  • Posts: 4598
  • Gender: Female
  • Danger zone
Re: Give Me Something To Program, Goddammit!
« Reply #9 on: December 28, 2012, 11:42:14 pm »
A 2D array is probably best if you're doing a grid. The part that would annoy me is representation of the snake, because man, doing simple shapes in Java was irritating enough.
Guys, this is getting creepy. Can we talk about cannibalism instead?

If a clown eats salmon on Tuesday, how much does a triangle weigh on Jupiter? Ask Mr. Wiggins for 10% off of your next dry cleaning bill. -Hades

Offline Captain Jack Harkness

  • Petter, Brony, and All-Around Cartoon Addict
  • The Beast
  • *****
  • Posts: 2868
  • Gender: Male
  • Or as a friend calls him, Captain Jack Hotness!
Re: Give Me Something To Program, Goddammit!
« Reply #10 on: December 29, 2012, 12:01:20 am »
A 2D array is probably best if you're doing a grid. The part that would annoy me is representation of the snake, because man, doing simple shapes in Java was irritating enough.

Well, I'm thinking that it wouldn't be necessarily a shape, since I can't really anticipate how many turns a user will make.  I'll just focus on the front and back of the snake.  Like, the back of the snake will clear out, adding or subtracting to the x or y coordinates as the directions at it's coordinates dictates and setting where it was as BLANK spaces.  The front will change coordinates as it's current direction dictates, and will only respond to direction changes as it's current direction dictates.  That is, you can only change to up or down if you're already going left or right, and you can only change to left or right if you're already going up or down.  The front would also be responsible for seeing if the coordinate it's moving into is occupied or not; if the space it's going into is occupied with something not blank, than it would see if it's food, a wall, or part of it's body (as designated by a "direction" instruction), and act accordingly.

I was thinking about how to handle food recently.  I was thinking that i could like, temporarily stop the back from clearing out.  That would be the simplest way, I think.  Of course, if I do that, then the question becomes "should it delay for a number of units the front travels, or a set period of time.  See, I'm thinking of making the snake move faster as the game goes on.  If I do that, then it's reasonable that higher travel speeds would make the snake grow more each time it encounters food.

"Shape" wouldn't be defined really at all, as the snake's never going to have a definite shape.

Now that I think about it, I'll probably be testing things incrementally to make sure that some of the basic functions work like I want them before I get too deep into things.
« Last Edit: December 29, 2012, 02:19:29 pm by B-Man »
My friend's blog.  Check it out!

I blame/credit The Doctor with inspiring my name change.

Offline Undecided

  • The boring one.
  • Bishop
  • ***
  • Posts: 152
  • Gender: Male
  • Amateur Obfuscator
Re: Give Me Something To Program, Goddammit!
« Reply #11 on: January 09, 2013, 06:05:16 pm »
Here, have some practice problems in mathematical computation.
You mad, you lose.

People do not like to think. If one thinks, one must reach conclusions. Conclusions are not always pleasant.
Helen Keller
Le doute n'est pas une condition agréable, mais la certitude est absurde.
Voltaire

Offline Yla

  • The Beast
  • *****
  • Posts: 809
  • Gender: Male
Re: Give Me Something To Program, Goddammit!
« Reply #12 on: January 11, 2013, 09:41:30 am »
Code me the SOR (successive over-relaxation) algorithm I have to fix. That should take an hour max to code down, but I just can't get it to converge properly.

*grumbles*
That said, I've stopped trying to anticipate what people around here want a while ago, I've found it makes things smoother.
For I was an hungred, and ye told me to pull myself up by my bootstraps: I was thirsty, and ye demanded payment for the privilege of thine urine: I was a stranger, and ye deported me: naked, and ye arrested me for indecency.

Saturn500

  • Guest
Re: Give Me Something To Program, Goddammit!
« Reply #13 on: January 11, 2013, 09:50:53 am »
I've got another idea: program a fibbonacci sequence!