Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Poll

What programming topic would you want the next challenge to be about?  (It might be a good opportunity to focus on a subject you're not familiar with or to reinforce knowledge on one that you already know)

Control Flow
- 2 (2.2%)
Arrays, Strings, Pointers, and References
- 8 (9%)
Functions
- 4 (4.5%)
Basic object-oriented programming
- 30 (33.7%)
A bit more advanced OOP (Composition, Operator overloading, Inheritance, Virtual Functions)
- 18 (20.2%)
Templates
- 8 (9%)
Other (Explain)
- 4 (4.5%)
Working with files?  (Streams)
- 15 (16.9%)

Total Members Voted: 89


Pages: 1 ... 26 27 [28] 29 30 ... 78

Author Topic: Programming Challenges & Resources (#bay12prog) Initiative  (Read 95943 times)

alway

  • Bay Watcher
  • 🏳️‍⚧️
    • View Profile
Re: Programming Challenges & Resources (#bay12prog) Initiative
« Reply #405 on: October 16, 2010, 11:00:31 am »

Precisely. And if you begin with said pointers being null, you can do a simple if(tempPointer != NULL) to ensure there are no repeats in your possible paths, speeding it up even more. After all, if one path gets to that node first, there is obviously no point in taking a longer path to get to that same node*.

*Assuming of course your pathfinding is unweighted
« Last Edit: October 16, 2010, 11:03:45 am by alway »
Logged

Outcast Orange

  • Bay Watcher
  • [SOMETIMES_SQUID]
    • View Profile
    • The Outcast Orange
Re: Programming Challenges & Resources (#bay12prog) Initiative
« Reply #406 on: October 16, 2010, 12:44:00 pm »

Thank you always.
Logged
[7:53:55 PM] Armok, why did you demand that I don't eat you?
[7:54:34 PM] [Armok]: woooooo

Burried Houses - Platform Explorer Demo H - Cloud Scream

Argembarger

  • Bay Watcher
    • View Profile
    • Not quite yet
Re: Programming Challenges & Resources (#bay12prog) Initiative
« Reply #407 on: October 19, 2010, 09:17:51 am »

Awesome thread.

I only have about 6 months programming experience (Java, C++/Resolve) but these look like some fun challenges, and I've been wanting to get into programming with graphics, so I appreciate the resources.

So far I've made a couple of (insanely, horribly bad) text-based games, and a program that can automatically resolve a battle in Risk between any number of attackers vs. any number of defenders, and can calculate basic chances of success. Also, whatever projects my CS courses assign, usually really basic stuff (writing the code for some basic component like a substring locator) but sometimes there's a more interesting problem.

The text based games I made are notable because I made them before I knew how to call different procedures and functions, and they consist of like 7 or 8 nested while loops. I don't know how I kept track of it all, but the games basically work without too much fuss. If I ever wanted to expand them, I'd probably have to rewrite them entirely, as they are utterly unreadable.

Anyway I'm glad to find this, it should help me a lot, thanks.
Logged
Quote from: penguinofhonor
Quote from: miauw62
This guy needs to write a biography about Columbus. I would totally buy it.
I can see it now.

trying to make a different's: the life of Columbus

Outcast Orange

  • Bay Watcher
  • [SOMETIMES_SQUID]
    • View Profile
    • The Outcast Orange
Re: Programming Challenges & Resources (#bay12prog) Initiative
« Reply #408 on: October 24, 2010, 11:23:58 pm »

That text-based game you described sounds very interesting.
Would you be willing to share the source?

I have done similar things in my ignorance.
It would be fun to examine code implemented in the absence of basic utilities.

If you ever want to see recursive functions that don't call themselves, I'm the expert. (spoken with shame)
Logged
[7:53:55 PM] Armok, why did you demand that I don't eat you?
[7:54:34 PM] [Armok]: woooooo

Burried Houses - Platform Explorer Demo H - Cloud Scream

Argembarger

  • Bay Watcher
    • View Profile
    • Not quite yet
Re: Programming Challenges & Resources (#bay12prog) Initiative
« Reply #409 on: October 24, 2010, 11:52:28 pm »

Um, wow, yeah, sure, never thought anyone would have taken an interest.
Spoiler (click to show/hide)

AFAIK it has to be run in a java compiler, heh. No real interface to speak of. Just the input and output streams.
Also if you play it, there is no parser or any sort of catch for suboptimal input, so if you don't give the game the exact command it wants, it just defaults to a "you panic and do nothing useful" output.

As for the other game, Goblin Kill...
Spoiler (click to show/hide)

This game is notable in that it has the worst fucking gameplay ever. Just spam l until you find a goblin then spam k until it's dead. Rinse, repeat.

Someday I may revisit these. The code isn't as horribly unreadable as I remember. Either one could be the bare-bones skeleton (at least in terms of concept and plot) for a greater project...

Anyway, tell me what you think. Remember: These were my first attempts at coding something for myself, ever. I was in an introductory programming class and got antsy, wanted to jump right in, taught myself a lot. Needless to say I passed that class with flying colors because of all my extracurricular coding.

Also pardon the foul language, I think calculus midterms were stressing me out at the time :P
Logged
Quote from: penguinofhonor
Quote from: miauw62
This guy needs to write a biography about Columbus. I would totally buy it.
I can see it now.

trying to make a different's: the life of Columbus

eerr

  • Bay Watcher
    • View Profile
Re: Programming Challenges & Resources (#bay12prog) Initiative
« Reply #410 on: October 25, 2010, 02:58:28 pm »

Please, for the love of god, use functions!
Logged

Argembarger

  • Bay Watcher
    • View Profile
    • Not quite yet
Re: Programming Challenges & Resources (#bay12prog) Initiative
« Reply #411 on: October 25, 2010, 03:02:09 pm »

Dude, I know right

Just in case that was a legitimate suggestion:

I already said I wrote them without understanding function or procedure calls, this was about 7 or 8 months ago, I had only been taking my first-ever programming class for like, maybe a week and a half

I only posted them because Orange wanted to take a look at the monstrosity


Anyway the only way writing those benefited me at all as a programmer is loop logic and if/else-if/else logic practice.
They're so ridiculously full of bugs and general badness that they're actually a little embarrassing
But hey, they were pretty much my first original projects ever, and I know a LOT more now than I did then.
I still don't know much, but I can call functions/procedures, do some recursion, read and write files, and generally have gotten a lot better at testing/debugging, though now I'm working mainly in C++ rather than Java.

Rewriting those programs is way way way on the backburner of my to-possibly-do list, but if I ever bother to revise them instead of just forging ahead and forgetting them, I'll make sure to post for comparison :P
« Last Edit: October 25, 2010, 03:10:52 pm by Argembarger »
Logged
Quote from: penguinofhonor
Quote from: miauw62
This guy needs to write a biography about Columbus. I would totally buy it.
I can see it now.

trying to make a different's: the life of Columbus

lordnincompoop

  • Bay Watcher
  • Allusionist
    • View Profile
Re: Programming Challenges & Resources (#bay12prog) Initiative
« Reply #412 on: October 26, 2010, 11:02:34 am »

Dammit, now I want to write a text game.

But I have no clue how to go about it, and I don't want to end up reinventing the wheel and stuff.  :(
Logged

alway

  • Bay Watcher
  • 🏳️‍⚧️
    • View Profile
Re: Programming Challenges & Resources (#bay12prog) Initiative
« Reply #413 on: October 26, 2010, 02:38:06 pm »

I don't want to end up reinventing the wheel and stuff.  :(
Reinvent it. Get used to reinventing it. 99.9% of programming would probably be considered in the reinventing the wheel catagory. Unless it involves large grants and larger supercomputers, just about anything you will do has already been done in some form by someone else.
Logged

Mondark

  • Bay Watcher
    • View Profile
Re: Programming Challenges & Resources (#bay12prog) Initiative
« Reply #414 on: October 26, 2010, 03:11:33 pm »

*de-lurks*

Dammit, now I want to write a text game.

But I have no clue how to go about it, and I don't want to end up reinventing the wheel and stuff.  :(

Checkout Inform 7, its actually pretty awesome for just WRITING a text based game, though its kind of debatable as to whether or not it's actually *programming* as such (which is part of the appeal, as I understand it.)  Even my 11 year old brother was able to throw something basic together with only a little bit of time learning it.
Logged
Fefeshnelmargalip

lordnincompoop

  • Bay Watcher
  • Allusionist
    • View Profile
Re: Programming Challenges & Resources (#bay12prog) Initiative
« Reply #415 on: October 26, 2010, 03:14:48 pm »

Okay, fine. I'll reoinvent that darned wheel for the millionth time (yay).

...I'll see you guys in fivish years then, when I have a game to show for it.
Logged

Siquo

  • Bay Watcher
  • Procedurally generated
    • View Profile
Re: Programming Challenges & Resources (#bay12prog) Initiative
« Reply #416 on: October 26, 2010, 03:18:55 pm »

Okay, fine. I'll reoinvent that darned wheel for the millionth time (yay).

...I'll see you guys in fivish years then, when I have a game to show for it.
That's... optimistic ;)
Logged

This one thread is mine. MIIIIINE!!! And it will remain a happy, friendly, encouraging place, whether you lot like it or not. 
will rena,eme sique to sique sxds-- siquo if sucessufil
(cant spel siqou a. every speling looks wroing (hate this))

Argembarger

  • Bay Watcher
    • View Profile
    • Not quite yet
Re: Programming Challenges & Resources (#bay12prog) Initiative
« Reply #417 on: October 26, 2010, 04:21:40 pm »

I really enjoy coding for the sake of coding.

Is this a positive trait, or have I simply not been jaded and disillusioned yet?
Logged
Quote from: penguinofhonor
Quote from: miauw62
This guy needs to write a biography about Columbus. I would totally buy it.
I can see it now.

trying to make a different's: the life of Columbus

eerr

  • Bay Watcher
    • View Profile
Re: Programming Challenges & Resources (#bay12prog) Initiative
« Reply #418 on: October 26, 2010, 05:36:24 pm »

How complex are your programs?
Logged

Argembarger

  • Bay Watcher
    • View Profile
    • Not quite yet
Re: Programming Challenges & Resources (#bay12prog) Initiative
« Reply #419 on: October 26, 2010, 05:57:32 pm »

Currently working on an enigma encrypter and decrypter
Logged
Quote from: penguinofhonor
Quote from: miauw62
This guy needs to write a biography about Columbus. I would totally buy it.
I can see it now.

trying to make a different's: the life of Columbus
Pages: 1 ... 26 27 [28] 29 30 ... 78