Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 [2] 3 4 ... 7

Author Topic: Winner's small games thread  (Read 7208 times)

Bricks

  • Bay Watcher
  • Because you never need one brick.
    • View Profile
Re: sand dunes
« Reply #15 on: January 14, 2010, 10:50:46 am »

From one extremely unexperienced mac user to a mac user who obviously knows his way around the OS, how do I run that script?  All I know how to do in the terminal is change the directory and execute python scripts.  I'd really like to check this out, I love simulations.
Logged
EMPATHY - being able to feel other peoples' stuff.

winner

  • Bay Watcher
    • View Profile
Re: sand dunes
« Reply #16 on: January 14, 2010, 11:28:45 am »

copy the code
"nano sand.cpp"
paste
"ctrl o"
"enter"
"ctrl x"
"g++ sand.cpp -lcurses"   if this step doesn't work install xcode
"./a.out"
« Last Edit: January 14, 2010, 11:31:34 am by winner »
Logged
The great game of Warlocks!

winner

  • Bay Watcher
    • View Profile
Re: sand dunes
« Reply #17 on: January 14, 2010, 11:30:08 am »

Oh wow, this looks very nice.

I can't get it to work though.
Fro some reason, nothing happens...
at which stage does nothing happen? when you press keys? when you try to run the program?
Logged
The great game of Warlocks!

winner

  • Bay Watcher
    • View Profile
Re: sand dunes
« Reply #18 on: January 14, 2010, 02:14:43 pm »

I added water. it's not very realistic but it was the best I could come up with so far.
Logged
The great game of Warlocks!

Bricks

  • Bay Watcher
  • Because you never need one brick.
    • View Profile
Re: sand dunes
« Reply #19 on: January 14, 2010, 04:25:41 pm »

Thanks, winner.  I didn't have xcode, but I'm currently installing it from the Leopard disks and should be able to check this out soon.  I'll edit this with comments as soon as I get it up and running.

EDIT:  It works!  I'm not sure where the controls were supposed to print, but I read them in the file.  'T' and 'R' seem to have opposite the intended effects.  Digging and water are weird.  I'm not sure what planting does.
« Last Edit: January 14, 2010, 04:54:09 pm by Bricks »
Logged
EMPATHY - being able to feel other peoples' stuff.

winner

  • Bay Watcher
    • View Profile
Re: sand dunes
« Reply #20 on: January 14, 2010, 06:13:45 pm »

Thank you for the bug report.
sorry planting does nothing yet. I was planning on adding trees but I want to make water work properly first.
'?' prints the controls.  t and r do what they intended I just labeled them wrong. To understand digging, comment out sand in the init function and uncomment out that first section in the print function.  It will show you what the water sees.
« Last Edit: January 14, 2010, 08:27:28 pm by winner »
Logged
The great game of Warlocks!

Hippoman

  • Bay Watcher
    • View Profile
Re: sand dunes
« Reply #21 on: January 14, 2010, 06:58:42 pm »

posting to get updates.
Logged
THPÆCROSSISM
ΘπÆ┼ - Rise up against our superiors! Let all dwarves be equal!
KHDownloads

winner

  • Bay Watcher
    • View Profile
Re: sand dunes
« Reply #22 on: January 14, 2010, 07:02:45 pm »

I would really like you guy's ideas on how I should do water.


edit trees are in, they wither without water.
« Last Edit: January 14, 2010, 08:24:29 pm by winner »
Logged
The great game of Warlocks!

Outcast Orange

  • Bay Watcher
  • [SOMETIMES_SQUID]
    • View Profile
    • The Outcast Orange
Re: sand dunes
« Reply #23 on: January 14, 2010, 09:00:36 pm »

How exactly do I run this thing?
I copied it into Codeblocks and compiled it,
 but input doesn't seem to work.
I'd be willing to colorize it for you if you wanted.
I've already mostly done it.
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

Hippoman

  • Bay Watcher
    • View Profile
Re: sand dunes
« Reply #24 on: January 14, 2010, 09:00:54 pm »

How exactly do I run this thing?
I copied it into Codeblocks and compiled it,
 but input doesn't seem to work.
I'd be willing to colorize it for you if you wanted.
I've already mostly done it.
I want it.
Logged
THPÆCROSSISM
ΘπÆ┼ - Rise up against our superiors! Let all dwarves be equal!
KHDownloads

winner

  • Bay Watcher
    • View Profile
Re: sand dunes
« Reply #25 on: January 14, 2010, 09:24:25 pm »

How exactly do I run this thing?
I copied it into Codeblocks and compiled it,
 but input doesn't seem to work.
I'd be willing to colorize it for you if you wanted.
I've already mostly done it.
Might "getch" be doing different things on your computer? Since I don't know much I'm relying on google.

[edit] water works now and it is glorious!
I put it up.
« Last Edit: January 14, 2010, 10:32:16 pm by winner »
Logged
The great game of Warlocks!

Outcast Orange

  • Bay Watcher
  • [SOMETIMES_SQUID]
    • View Profile
    • The Outcast Orange
Re: sand dunes *updated*
« Reply #26 on: January 15, 2010, 12:42:34 am »

Oh.
I wish I could give it a shot.

Here's all I know:
getch(); works fine for me,
 as I've used it before.
It compiles and runs fine,
 but the initial screen (which now has an '@' in the middle of it,
 doesn't move, or respond to input.

I'm considering dissecting this thing to find out exactly isn't working for me.
I'm not super willing to do that though.
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

winner

  • Bay Watcher
    • View Profile
Re: sand dunes *updated*
« Reply #27 on: January 15, 2010, 01:28:07 am »

is capslock on?

This program uses the same method as the sand dune program.
It gets a character and then prints it in the upper left of the screen.
'q' is quit.
Code: [Select]
#include <curses.h>
int main()
{
nodelay(initscr(),1); // don't wait for user input
noecho(); // don't show typed characters on the screen
char inchar;
while(inchar !='q')
{
inchar = char(getch());
if(inchar != ERR)
mvaddch(0, 0, inchar);
}
echo(); // turn echoing back on before exiting
endwin(); // end curses control of the window
}
« Last Edit: January 15, 2010, 01:33:58 am by winner »
Logged
The great game of Warlocks!

Outcast Orange

  • Bay Watcher
  • [SOMETIMES_SQUID]
    • View Profile
    • The Outcast Orange
Re: sand dunes *updated*
« Reply #28 on: January 15, 2010, 01:58:29 am »

That works fine.

I wonder where the issue could be...
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

winner

  • Bay Watcher
    • View Profile
Re: sand dunes *updated*
« Reply #29 on: January 15, 2010, 02:46:53 am »

paste the code fore the main program here, I might have made a mistake in how I put it up.

« Last Edit: January 15, 2010, 02:51:17 am by winner »
Logged
The great game of Warlocks!
Pages: 1 [2] 3 4 ... 7