Friendly Star Trek Discussions Fri Nov 22, 2024 5:53 pm  
  SearchSearch   FAQFAQ   Log inLog in   
TrekkieMage
View: previous topic :: next topic

stv-archives.com Forum Index -> This is me ... This topic is locked: you cannot edit posts or make replies.   This forum is locked: you cannot post, reply to, or edit topics.
Author Message
tomparis
Stooge Three


Joined: 25 Jun 2001
Posts: 5964
Location: At your computer, hacking your files.

PostWed Sep 12, 2007 11:35 am    

Bah! Technical stuff doesn't scare me! Try me!


-------signature-------

tomparis: The artist formerly known as the "Forum Nerd."

99.9% sure I'm not a zombie.

View user's profile Send private message Send e-mail AIM Address MSN Messenger 
Reply with quote Back to top
TrekkieMage
Office Junkie


Joined: 17 Oct 2004
Posts: 5335
Location: Hiding

PostWed Sep 12, 2007 2:14 pm    

Code:

class Maze:
   def __init__(self):
      self.have_window = 0
      self.game_over = 0
      self.set_layout(the_layout)

   def set_layout(self, layout):
      height = len(layout)
      width = len(layout[0])
      self.make_window(width, height)
      self.make_map(width, height)
      self.movables = []
      self.food_count = 0

      max_y = height - 1
      for x in range(width):
         for y in range(height):
            char = layout[max_y - y][x]
            self.make_object((x, y), char)

      for movable in self.movables:
         movable.draw()

   def make_window(self, width, height):
      grid_width = (width-1) * grid_size
      grid_height = (height - 1) * grid_size
      screen_width = 2*margin + grid_width
      screen_height = 2* margin + grid_height
      begin_graphics(height = screen_height,
            width = screen_width,
            title = "PACMAN",
            background = background_color)

   def to_screen(self, point):
      (x, y) = point
      x = x*grid_size + margin
      y = y*grid_size + margin
      return (x, y)

   def make_map(self, width, height):
      self.width = width
      self.height = height
      self.map = []
      for y in range(height):
         new_row = []
         for x in range(width):
            new_row.append(Nothing())
         self.map.append(new_row)

   def make_object(self, point, character):
      (x, y) = point
      if character == '%':
         self.map[y][x] = Wall(self, point)
      elif character == 'P':
         pacman = Pacman(self, point)
         self.movables.append(pacman)
      elif character == '.':
         self.food_count = self.food_count +1
         self.map[y][x] = Food(self, point)
      elif character == 'G':
         ghost = Ghost(self, point)
         self.movables.append(ghost)


Part of a pacman game written in Python.



I'm just editing the code, I didn't come up with most of it. I need to finish debuggin it and make the bloody thing actually *work*.


View user's profile Send private message Visit poster's website AIM Address  
Reply with quote Back to top
squiggy
Stooge Two


Joined: 09 Mar 2004
Posts: 3007
Location: Messing with the fabric of Video Game realities. I'll summon Shiva on you! I SWEAR!

PostWed Sep 12, 2007 2:31 pm    

TrekkieMage wrote:
Code:

class Maze:
   def __init__(self):
      self.have_window = 0
      self.game_over = 0
      self.set_layout(the_layout)

   def set_layout(self, layout):
      height = len(layout)
      width = len(layout[0])
      self.make_window(width, height)
      self.make_map(width, height)
      self.movables = []
      self.food_count = 0

      max_y = height - 1
      for x in range(width):
         for y in range(height):
            char = layout[max_y - y][x]
            self.make_object((x, y), char)

      for movable in self.movables:
         movable.draw()

   def make_window(self, width, height):
      grid_width = (width-1) * grid_size
      grid_height = (height - 1) * grid_size
      screen_width = 2*margin + grid_width
      screen_height = 2* margin + grid_height
      begin_graphics(height = screen_height,
            width = screen_width,
            title = "PACMAN",
            background = background_color)

   def to_screen(self, point):
      (x, y) = point
      x = x*grid_size + margin
      y = y*grid_size + margin
      return (x, y)

   def make_map(self, width, height):
      self.width = width
      self.height = height
      self.map = []
      for y in range(height):
         new_row = []
         for x in range(width):
            new_row.append(Nothing())
         self.map.append(new_row)

   def make_object(self, point, character):
      (x, y) = point
      if character == '%':
         self.map[y][x] = Wall(self, point)
      elif character == 'P':
         pacman = Pacman(self, point)
         self.movables.append(pacman)
      elif character == '.':
         self.food_count = self.food_count +1
         self.map[y][x] = Food(self, point)
      elif character == 'G':
         ghost = Ghost(self, point)
         self.movables.append(ghost)


Part of a pacman game written in Python.



I'm just editing the code, I didn't come up with most of it. I need to finish debuggin it and make the bloody thing actually *work*.


!!!! You know the pacman programming code????
*kneels before the almighty Trekkiemage.*
Gratz on earning Admin powers!!!!!!! You'll be an evil entity before you know it!
Code:
For earning Administrative powers, you grow to Evil Minion levele 30.
You now have access to:
Koopa Troopa((Level 2))
Squiggy((level 27))
and
Mouse Swarm((Re-inforcement power))


View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger 
Reply with quote Back to top
TrekkieMage
Office Junkie


Joined: 17 Oct 2004
Posts: 5335
Location: Hiding

PostWed Sep 12, 2007 2:37 pm    

A little bit of Python and I'm learning Java.

Thanks ^_^

I'm now working on threatening Dan's position as self-proclaimed Jesus of the site


View user's profile Send private message Visit poster's website AIM Address  
Reply with quote Back to top
squiggy
Stooge Two


Joined: 09 Mar 2004
Posts: 3007
Location: Messing with the fabric of Video Game realities. I'll summon Shiva on you! I SWEAR!

PostWed Sep 12, 2007 2:38 pm    

*Stands at attention and salutes the all-powerful TrekkieMage.*
He doesn't stand a chance.


View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger 
Reply with quote Back to top
Valathous
The Canadian, eh


Joined: 31 Aug 2002
Posts: 19074
Location: Centre Bell

PostWed Sep 12, 2007 2:38 pm    

I'll smite you. And ooooohhh what a smite it'll be.

View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger 
Reply with quote Back to top
TrekkieMage
Office Junkie


Joined: 17 Oct 2004
Posts: 5335
Location: Hiding

PostWed Sep 12, 2007 2:39 pm    

It is ON.



View user's profile Send private message Visit poster's website AIM Address  
Reply with quote Back to top
squiggy
Stooge Two


Joined: 09 Mar 2004
Posts: 3007
Location: Messing with the fabric of Video Game realities. I'll summon Shiva on you! I SWEAR!

PostWed Sep 12, 2007 2:40 pm    

*hides behind Trekkiemage*
Don't hurt me!!


View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger 
Reply with quote Back to top
Valathous
The Canadian, eh


Joined: 31 Aug 2002
Posts: 19074
Location: Centre Bell

PostWed Sep 12, 2007 2:54 pm    

You know, that's not a very good hiding place,

View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger 
Reply with quote Back to top
TrekkieMage
Office Junkie


Joined: 17 Oct 2004
Posts: 5335
Location: Hiding

PostWed Sep 12, 2007 4:26 pm    

orly?

We'll just see about that


View user's profile Send private message Visit poster's website AIM Address  
Reply with quote Back to top
Theresa
Lux Mihi Deus


Joined: 17 Jun 2001
Posts: 27256
Location: United States of America

PostSun Sep 16, 2007 4:41 pm    

Congratulations on being admin! Now you have all of those "powers",




(sorry, tried to post before, but my comp is being a complete ass. I think it's male)


View user's profile Send private message Send e-mail Visit poster's website  
Reply with quote Back to top
TrekkieMage
Office Junkie


Joined: 17 Oct 2004
Posts: 5335
Location: Hiding

PostSun Sep 16, 2007 9:59 pm    

Theresa wrote:
Congratulations on being admin! Now you have all of those "powers",




(sorry, tried to post before, but my comp is being a complete ass. I think it's male)


Thank you!

My suite-mate is a member of STV and said I could play with his account

As for the computer, must be


View user's profile Send private message Visit poster's website AIM Address  
Reply with quote Back to top
squiggy
Stooge Two


Joined: 09 Mar 2004
Posts: 3007
Location: Messing with the fabric of Video Game realities. I'll summon Shiva on you! I SWEAR!

PostThu Oct 11, 2007 6:31 pm    

You have an evil minion who wishes to join your' party, cancel or allow?


lol, sorry, I had fun with that. XD


Last edited by squiggy on Fri Oct 12, 2007 12:09 am; edited 1 time in total


View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger 
Reply with quote Back to top
TrekkieMage
Office Junkie


Joined: 17 Oct 2004
Posts: 5335
Location: Hiding

PostThu Oct 11, 2007 9:25 pm    

lol

That question mark by your clothes may be an issue



View user's profile Send private message Visit poster's website AIM Address  
Reply with quote Back to top
squiggy
Stooge Two


Joined: 09 Mar 2004
Posts: 3007
Location: Messing with the fabric of Video Game realities. I'll summon Shiva on you! I SWEAR!

PostThu Oct 11, 2007 10:38 pm    

I have bad taste in clothing.
It's very evil of me, you know. Making other people's eyes hurt.
Put the question mark there because I didn't want to scare people


View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger 
Reply with quote Back to top
TrekkieMage
Office Junkie


Joined: 17 Oct 2004
Posts: 5335
Location: Hiding

PostThu Oct 11, 2007 11:28 pm    

Trust me, the question mark is just as scary!



View user's profile Send private message Visit poster's website AIM Address  
Reply with quote Back to top
squiggy
Stooge Two


Joined: 09 Mar 2004
Posts: 3007
Location: Messing with the fabric of Video Game realities. I'll summon Shiva on you! I SWEAR!

PostThu Oct 11, 2007 11:41 pm    

haha. Awesome!
How delightfully evil. ^^
However, to be polite, I'll change it for ya:


View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger 
Reply with quote Back to top
TrekkieMage
Office Junkie


Joined: 17 Oct 2004
Posts: 5335
Location: Hiding

PostFri Oct 12, 2007 12:08 pm    

Thank you, much less terrifying ^-^

View user's profile Send private message Visit poster's website AIM Address  
Reply with quote Back to top
squiggy
Stooge Two


Joined: 09 Mar 2004
Posts: 3007
Location: Messing with the fabric of Video Game realities. I'll summon Shiva on you! I SWEAR!

PostFri Oct 12, 2007 12:50 pm    

lol, anything to keep the evil lady happy.
XD


View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger 
Reply with quote Back to top
Valathous
The Canadian, eh


Joined: 31 Aug 2002
Posts: 19074
Location: Centre Bell

PostMon Oct 15, 2007 4:10 pm    

*poke*

Gotcha!


View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger 
Reply with quote Back to top
TrekkieMage
Office Junkie


Joined: 17 Oct 2004
Posts: 5335
Location: Hiding

PostMon Oct 15, 2007 4:45 pm    

We'll see about that

View user's profile Send private message Visit poster's website AIM Address  
Reply with quote Back to top
squiggy
Stooge Two


Joined: 09 Mar 2004
Posts: 3007
Location: Messing with the fabric of Video Game realities. I'll summon Shiva on you! I SWEAR!

PostMon Oct 15, 2007 5:15 pm    

*salutes trekkie mage.*
Ma'am, yes ma'am!
*spikes Valathous's Molson Canadian with Cyanide, and a little bit of rat poison for good measure.*


View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger 
Reply with quote Back to top
Valathous
The Canadian, eh


Joined: 31 Aug 2002
Posts: 19074
Location: Centre Bell

PostMon Oct 15, 2007 6:20 pm    

... No true Canadian would ruin another man's beer. Try putting it in my food if you must, but my Molson Canadian? You've let me down, squig,

View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger 
Reply with quote Back to top
squiggy
Stooge Two


Joined: 09 Mar 2004
Posts: 3007
Location: Messing with the fabric of Video Game realities. I'll summon Shiva on you! I SWEAR!

PostMon Oct 15, 2007 7:23 pm    

I AM an evil minion after all; Just doing as I'm told.
Besides, I know that, Canadian to Canadian, no true canadian would turn down a beer
even if it WAS poisoned.


View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger 
Reply with quote Back to top
TrekkieMage
Office Junkie


Joined: 17 Oct 2004
Posts: 5335
Location: Hiding

PostMon Oct 15, 2007 10:45 pm    

I did no such thing! Squiggy, are you listening to those voices again? Remember what happened when you tried to assasinate your toaster?

Val, next time I'm in Canadia I'll buy you another beer


View user's profile Send private message Visit poster's website AIM Address  
Reply with quote Back to top
Display posts from previous:   
Goto Page Previous  1, 2, 3, 4, 5, 6, 7, 8, 9, 10  Next
This topic is locked: you cannot edit posts or make replies.   This forum is locked: you cannot post, reply to, or edit topics.



Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Powered by phpBB © 2001, 2002 phpBB Group
Star Trek �, in all its various forms, are trademarks & copyrights of Paramount Pictures
This site has no official connection with Star Trek or Paramount Pictures
Site content/Site design elements owned by Morphy and is meant to only be an archive/Tribute to STV.com