PYGAME, ACH!!!!!

Forum organization and occasional community-building.
Forum rules
Questions about Ren'Py should go in the Ren'Py Questions and Announcements forum.
Post Reply
Message
Author
Recca Phoenix
Veteran
Posts: 230
Joined: Tue Jan 23, 2007 3:39 pm

PYGAME, ACH!!!!!

#1 Post by Recca Phoenix » Mon Apr 16, 2007 10:29 pm

I tried to learn Pygame the other day.....but it's nothing like Ren'Py AT ALL......WAAAAAAAA.....>_<;;;;;
It's so hard and full of hard programming-type stuff!!!!
I just want to be able to put a minigame or two in my new game I'm working on but it's so hard :(
All the so-called "tutorials" I looked at either tried to teach you everything about python from scratch, were just line-by-line things for only one type of game in particular, or assumed you already knew basic python or some other language >: (
Anyone know any better tutorials or have any tips? I'm just....not....a programmer, and I can't seem to think the way programmers do as far as I can see.... :cry:

User avatar
monele
Lemma-Class Veteran
Posts: 4101
Joined: Sat Oct 08, 2005 7:57 am
Location: France
Contact:

#2 Post by monele » Tue Apr 17, 2007 3:27 am

I'm just....not....a programmer, and I can't seem to think the way programmers do as far as I can see....
Well then, it will be hard to actually program something in Python ^^;... I don't think there's any easy to get through this without learning programming.
What kind of games are you trying to make? If they're not all action-like, maybe Ren'py can still deal with them.

User avatar
chronoluminaire
Eileen-Class Veteran
Posts: 1153
Joined: Mon Jul 07, 2003 4:57 pm
Completed: Elven Relations, Cloud Fairy, When I Rule The World
Tumblr: alextfish
Skype: alextfish
Location: Cambridge, UK
Contact:

#3 Post by chronoluminaire » Tue Apr 17, 2007 8:14 am

Yeah, my Elven Relations combat minigame is mostly written in Python, but most of the Python is Ren'Py calls ^^;;
So the code looks like this kind of thing:

Code: Select all

menu:
  "%(EnemyName)s moves to attack %(EnemyTargetName)s ! What should I do?"
  "Counterattack %(EnemyName)s":
    $ AllyTimeGauges[A_Takuya] = 0.0
    $ TmpEnemyPos = PositionBasedOn(0.8, AllyPos, 0.2, EnemyPos)
    $ TmpMePos = PositionBasedOn(0.8, AllyPos, 0.2, MePos)
    $ renpy.show( (EnemyTargetName, "defend"))
    $ renpy.show( (EnemyName, "attack"), at_list = [CombatPosition(TmpEnemyPos)])
    $ renpy.show( ("Takuya", "attack"), at_list = [CombatPosition(TmpMePos)])
    with move
    $ EnemyPower = EnemyStrengths[ThisEnemy]
    if EnemyTarget == A_Takuya:
      "As %(EnemyName)s hits me, I strike with my sword."
      "I take %(EnemyPower)d damage. I deal %(MyPower)d damage to %(EnemyName)s."
    else:
      "As %(EnemyName)s hits %(EnemyTargetName)s, I strike with my sword."
      "%(EnemyTargetName)s takes %(EnemyPower)d damage. I deal %(MyPower)d damage to %(EnemyName)s."
    $ AllyHealths[EnemyTarget] -= EnemyPower
    $ EnemyHealths[ThisEnemy] -= MyPower
    call ES_CheckHealths
So all the user interaction is just Ren'Py menus, and all the showing and moving of images is taken care of by the Ren'Py functions like

Code: Select all

$ renpy.show( (EnemyName, "attack"), at_list = [CombatPosition(TmpEnemyPos)])
I had to write the little CombatPosition() and PositionBasedOn() functions myself, but they're only about two lines each...
I released 3 VNs, many moons ago: Elven Relations (IntRenAiMo 2007), When I Rule The World (NaNoRenO 2005), and Cloud Fairy (the Cute Light & Fluffy Project, 2009).
More recently I designed the board game Steam Works (published in 2015), available from a local gaming store near you!

User avatar
DaFool
Lemma-Class Veteran
Posts: 4171
Joined: Tue Aug 01, 2006 12:39 pm
Contact:

#4 Post by DaFool » Tue Apr 17, 2007 10:26 am

Hmmm...I'd rather build a visual novel story around a pygame engine rather than make make a pygame from scratch just as an omake.

Just from a effort-headache vs payoff ratio, I mean. Especially if the minigame will only come as an omake in one of a multitude of endings, with high probability that a player may not even get to see it.

Anyone know where you can pull off the shelf pong-like minigames, change the graphics declarations, stuff them into your Ren'Py, and the things just magically work?

User avatar
DaFool
Lemma-Class Veteran
Posts: 4171
Joined: Tue Aug 01, 2006 12:39 pm
Contact:

#5 Post by DaFool » Tue Apr 17, 2007 10:37 am

Maybe I should try learning python proper (is 3 years of C++ considered adequate experience?)

The problem is that I will probably want to make a RTS-FPS-Driving Sim-Visual Novel hybrid where you control an empire of Maido Cafes and defend it against other empires by equipping your maids with semi-automatics and have them perform drive-by-shootings.

I'm pretty sure given billions of years, such a scenario is possible in python.

Recca Phoenix
Veteran
Posts: 230
Joined: Tue Jan 23, 2007 3:39 pm

#6 Post by Recca Phoenix » Tue Apr 17, 2007 11:26 am

That Maid Cafe idea is actually really good....

Sounds like Recca's (imaginary) chain of "hott samurai steakhouses"...but that's a story for another time.

Yeah, I guess I could always pull a graphics-hack job, most of the people who post their games on the pygame site don't seem to care if people...er...."borrow" their ideas. ^_^;;;;

I learned a bit of Javascript once, but forgot everything. Meh, it's too hard to make games with that anyhoo.

User avatar
chronoluminaire
Eileen-Class Veteran
Posts: 1153
Joined: Mon Jul 07, 2003 4:57 pm
Completed: Elven Relations, Cloud Fairy, When I Rule The World
Tumblr: alextfish
Skype: alextfish
Location: Cambridge, UK
Contact:

#7 Post by chronoluminaire » Tue Apr 17, 2007 1:18 pm

DaFool wrote:Anyone know where you can pull off the shelf pong-like minigames, change the graphics declarations, stuff them into your Ren'Py, and the things just magically work?
The Ren'Py demo :P Since Ren'Py 6 or earlier, it's featured a Pong minigame embedded in it, and that's free-source for you to change the graphics declarations... :D
I released 3 VNs, many moons ago: Elven Relations (IntRenAiMo 2007), When I Rule The World (NaNoRenO 2005), and Cloud Fairy (the Cute Light & Fluffy Project, 2009).
More recently I designed the board game Steam Works (published in 2015), available from a local gaming store near you!

User avatar
DaFool
Lemma-Class Veteran
Posts: 4171
Joined: Tue Aug 01, 2006 12:39 pm
Contact:

#8 Post by DaFool » Tue Apr 17, 2007 1:22 pm

uh, of course! :D
I meant other sources of off-the-shelf generic minigame engines.

Pygame can sometimes be a work-in-progress jumble...

Post Reply

Who is online

Users browsing this forum: Bing [Bot]