Bay 12 Games Forum

Please login or register.

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

Author Topic: The Bay12 7-Day Roguelike Festival - April Theme: Huzzah!  (Read 12492 times)

Frajic

  • Bay Watcher
    • View Profile
Re: The Bay12 7-Day Roguelike Festival - April Theme: Huzzah!
« Reply #45 on: April 11, 2011, 03:27:00 pm »

Dang python! It's called an attribute variable! It is middle priory between a local/parameter variable, and a global variable! Knowing this, I shouldn't have to type 'self' every time I want to use it, you should just know! Silly language could at least have the decency to use 'this' like every other sane language.

So... Fun little problem. I need for two of my classes to have bidirectional navigability. In c++ I would declare my class A, then declare and define my class B, then define class A. In c# I would just define them as I go, as it is omnipotent and can see the classes below what I'm currently working on. In python? I get bitch slapped because neither of these things work.

Why would anybody ever use this language?!?!?!?!?!?! Were it not for the fact that I enjoy being bitch slapped by a programming language, just for that extra smug feeling when it works...
Actually, I think you can do all that. Let me do some testing.

Results: You can define a python class as you go; just define a function, then assign it to the class as a method(you know, like "testclass.testmethod = testmethod"). It's even easier with attributes, so I won't bother explaining that. And to declare a class without defining, well... when you declare a class, you always have to declare something. Resort to hacks and make an useless attribute, like "useless = 0".
« Last Edit: April 11, 2011, 04:00:06 pm by Pyrate »
Logged
EoS company name: Vikings Inc.

qwertyuiopas

  • Bay Watcher
  • Photoshop is for elves who cannot use MSPaint.
    • View Profile
    • uristqwerty.ca, my current (barren) site.
Re: The Bay12 7-Day Roguelike Festival - April Theme: Huzzah!
« Reply #46 on: April 11, 2011, 05:39:04 pm »

If it would work, a nice self-descriptive declaration might work best.

someclass.forwardDeclaration = "This Line"

would be both self-descriptive and possible a bit humorous.
Logged
Eh?
Eh!

Biag

  • Bay Watcher
  • Huzzah!
    • View Profile
Re: The Bay12 7-Day Roguelike Festival - April Theme: Huzzah!
« Reply #47 on: April 11, 2011, 06:59:52 pm »

Dang python! It's called an attribute variable! It is middle priory between a local/parameter variable, and a global variable! Knowing this, I shouldn't have to type 'self' every time I want to use it, you should just know! Silly language could at least have the decency to use 'this' like every other sane language.

So... Fun little problem. I need for two of my classes to have bidirectional navigability. In c++ I would declare my class A, then declare and define my class B, then define class A. In c# I would just define them as I go, as it is omnipotent and can see the classes below what I'm currently working on. In python? I get bitch slapped because neither of these things work.

Why would anybody ever use this language?!?!?!?!?!?! Were it not for the fact that I enjoy being bitch slapped by a programming language, just for that extra smug feeling when it works...
Actually, I think you can do all that. Let me do some testing.

Results: You can define a python class as you go; just define a function, then assign it to the class as a method(you know, like "testclass.testmethod = testmethod"). It's even easier with attributes, so I won't bother explaining that. And to declare a class without defining, well... when you declare a class, you always have to declare something. Resort to hacks and make an useless attribute, like "useless = 0".

It never occurred to me that you could assign functions like that! That's sure to come in handy some day.

Instead of defining a useless variable, you can just use the "pass" statement-

Code: [Select]
class MyClass:
     def __init__(self):
          pass

It's an empty input for exactly this kind of situation.
Logged

Max White

  • Bay Watcher
  • Still not hollowed!
    • View Profile
Re: The Bay12 7-Day Roguelike Festival - April Theme: Huzzah!
« Reply #48 on: April 11, 2011, 07:20:26 pm »

Ah ok, so I can declare my class A, then class B, and in the constructor of B take A as an argument, and assign A a reference to B. Well that was an interesting little problem... I guess I should try to remember I'm working with anonymous types, and a 'constructor' is as good as a normal function that makes something, give it some attributes, and hands it over to you...

Levi

  • Bay Watcher
  • Is a fish.
    • View Profile
Re: The Bay12 7-Day Roguelike Festival - April Theme: Huzzah!
« Reply #49 on: April 11, 2011, 08:14:29 pm »

Heh, added to the word lists some and came out with these:

Spoiler (click to show/hide)

You will never defeat the UNDERGRAD OF THE GREY VOLCANO!
Logged
Avid Gamer | Goldfish Enthusiast | Canadian | Professional Layabout

Max White

  • Bay Watcher
  • Still not hollowed!
    • View Profile
Re: The Bay12 7-Day Roguelike Festival - April Theme: Huzzah!
« Reply #50 on: April 11, 2011, 10:11:58 pm »

Dictator Brown sounds like some bad ass corporate type who is developing bioweapons and losses hies temper with easy.

So, Levi, is this thing just putting together strings, or are you putting together several attributes, and concatenating a string from these attributes to give a name, while also generating things like stats and abilitys?

Biag

  • Bay Watcher
  • Huzzah!
    • View Profile
Re: The Bay12 7-Day Roguelike Festival - April Theme: Huzzah!
« Reply #51 on: April 11, 2011, 10:22:50 pm »

Worried Gentleman and Creepy Jack sound like characters in a word problem. "If Worried Gentleman takes 10 seconds to get from his living room to his garden, and Creepy Jack takes 12 seconds to get from Gentleman's garden to a hiding spot..."
Logged

Levi

  • Bay Watcher
  • Is a fish.
    • View Profile
Re: The Bay12 7-Day Roguelike Festival - April Theme: Huzzah!
« Reply #52 on: April 11, 2011, 10:46:37 pm »

Dictator Brown sounds like some bad ass corporate type who is developing bioweapons and losses hies temper with easy.

So, Levi, is this thing just putting together strings, or are you putting together several attributes, and concatenating a string from these attributes to give a name, while also generating things like stats and abilitys?

I've got a mad-libs sort of thing going.  Villains get random powers, and those powers contain a core word.  For super-strength, my coreword is strength. 

strength has the following words associated:
Code: [Select]
nouns: muscle,strength,arm,fist
adjectives: big,huge,giant,strong,mighty,uber
persons:man,bodybuilder,monster

My problem is that this isn't a lot of variety in the names from just that, so I also have a stock list of nouns/adjectives/persons/colours.  Unfortunately my stock list is much bigger than the tiny list I think up when I make a power, so statistically those strength related terms don't really show up that often.

Probably a better way of doing it is to tell it to specially choose at least one term from the my strength terms when generating the name, but I'm running out of time to program things like that.   :P

My madlibs are kind of neat though, here are my madlibs for generating villain names:

Spoiler (click to show/hide)

My game is currently playable, but I still have a lot of details to do and I'm not sure how much I can fit in by the end of tuesday. 
Things missing so far:
  • Lots of skills
  • Lots of powers
  • Examining a square
  • Catchphrases :(

Also, part way through I realized a major flaw in this game.  You don't actually play any of the heroes, they move around by themselves.  As the leader "Dr Brain" you can telepathically give orders, but that is about it.  I kind of feel bad about that, but oh well.   I'll see if I can figure out a way to make it more interesting.
Logged
Avid Gamer | Goldfish Enthusiast | Canadian | Professional Layabout

Max White

  • Bay Watcher
  • Still not hollowed!
    • View Profile
Re: The Bay12 7-Day Roguelike Festival - April Theme: Huzzah!
« Reply #53 on: April 12, 2011, 02:09:46 am »

Well if you end up scrapping the project, you could at least say you made a great game name generator!

'Moon commander: White fire' sounds like the best game the 80's never made.

Levi

  • Bay Watcher
  • Is a fish.
    • View Profile
Re: The Bay12 7-Day Roguelike Festival - April Theme: Huzzah!
« Reply #54 on: April 12, 2011, 11:49:09 pm »

My 7DRL is done!

The Ultra Pals!

http://www.mediafire.com/?mr477xtw4jvx7bs

Spoiler (click to show/hide)

Instructions:
Requires Python to play.  Run UltraPals.py to start the game.

Arrow keys or keypad to move around.  When on a mission, you can do the following:
- SPACE:  Advance to the next turn
- 1:  Give a hero a command(your X must be on top of him)
- 2:  Muddle the mind of a Villain or Henchmen(your X must be on top of him)
- ESC: Quit the game(it won't save).

Synopsis:
This is a game where Dr. Brain leads the superhero team the Ultra Pals.  It consists of going to the Ultra Computer to get a mission, and then mostly watching your heroes duke it out with the bad guys.  As Dr. Brain you can either give telepathic orders to your heroes, or muddle the minds of your enemies.  Usually it seems your heroes will beat the villains just fine without your help, but I'm not sure how it scales in difficulty (I ran out of time to really test it).

Features:
- Randomly Generated Recurring Villains  (They get more powerful the more you fight them)
- Randomly Generated Missions(well, the text anyway.  You always fight in a big room).
- Playable.  General mechanics seem to work.  I didn't find any bugs.
- Sort of fun to watch. 

Things I didn't get to implement
- More powers!  I only got about 6 or 7 powers in the game, and your heroes have them all between them.
- More skills!  I originally planned to have a bunch of skills that you could select to gain as the game goes on, but I didn't have time to implement much more than one attack per power.
- Catchphrases!  I didn't have time to get to this, and in retrospect, I'm not sure how well it would have turned out anyway.   :P There is some banter, but its all just quickly made up by me (about 20 minutes ago).
- Stronger associations between a villains theme/powers/name.  Its not really there at all right now.  Laser Boy might be invulnerable and The Wicked Titan might build robots.  Who knows!
- Something more game like.  Its unfortunately more of a simulation game.

Anyway, have fun.   :)




Logged
Avid Gamer | Goldfish Enthusiast | Canadian | Professional Layabout

White Kitteh

  • Bay Watcher
  • Black Puppeh? (also stabs)
    • View Profile
Re: The Bay12 7-Day Roguelike Festival - April Theme: Huzzah!
« Reply #55 on: April 13, 2011, 12:18:06 am »

Slight problem, attempting to order/muddle crashes the game.  "skills.py line 351, global name 'RobotAI' is not defined"

aside from that, your villain generator is awesome, as well as the speech/bantering.

"The Skin Professor is attacking the asylum in order to terraform the earth!"
Logged
HUNGRY PROGRAMMER NEEDS BANDWIDTH. FOOD UNIMPORTANT.

Levi

  • Bay Watcher
  • Is a fish.
    • View Profile
Re: The Bay12 7-Day Roguelike Festival - April Theme: Huzzah!
« Reply #56 on: April 13, 2011, 12:20:31 am »

Blarg, thats the same bug that broke something else earlier that I didn't figure out.  One sec, I'll fix it right up.

Edit:  Okay, it should work better now. 

aside from that, your villain generator is awesome, as well as the speech/bantering.

"The Skin Professor is attacking the asylum in order to terraform the earth!"

Thanks!  My favorite one so far was "The Green Brain is attacking the library to read a communist manifesto."   :P
« Last Edit: April 13, 2011, 12:28:45 am by Levi »
Logged
Avid Gamer | Goldfish Enthusiast | Canadian | Professional Layabout

White Kitteh

  • Bay Watcher
  • Black Puppeh? (also stabs)
    • View Profile
Re: The Bay12 7-Day Roguelike Festival - April Theme: Huzzah!
« Reply #57 on: April 13, 2011, 06:35:42 am »

Move along citizen, Nothing but an ordinary starting post here!
Logged
HUNGRY PROGRAMMER NEEDS BANDWIDTH. FOOD UNIMPORTANT.

Siquo

  • Bay Watcher
  • Procedurally generated
    • View Profile
Re: The Bay12 7-Day Roguelike Festival - April Theme: Huzzah!
« Reply #58 on: April 13, 2011, 01:01:30 pm »

I got a Gentleman of the Deep Rock attacking a Homeless Shelter to mug old ladies.  :D

The name/power/event generation is awesome. The gameplay... less so. There's not much you can do to influence the flow of the battles.
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))

Levi

  • Bay Watcher
  • Is a fish.
    • View Profile
Re: The Bay12 7-Day Roguelike Festival - April Theme: Huzzah!
« Reply #59 on: April 13, 2011, 01:09:57 pm »

I got a Gentleman of the Deep Rock attacking a Homeless Shelter to mug old ladies.  :D

The name/power/event generation is awesome. The gameplay... less so. There's not much you can do to influence the flow of the battles.

Yeah, the gameplay is really lacking.  When I started I was all excited about having a game with superheroes and cool generated villains that I completely forgot to think about it.  :) 

Logged
Avid Gamer | Goldfish Enthusiast | Canadian | Professional Layabout
Pages: 1 2 3 [4] 5 6 7