How to Code Phoenix Wright-ish Gameplay?

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Post Reply
Message
Author
User avatar
HyperEmoGamer
Newbie
Posts: 24
Joined: Wed Feb 12, 2014 5:20 pm
Projects: Acidic: SoS
Location: California
Contact:

How to Code Phoenix Wright-ish Gameplay?

#1 Post by HyperEmoGamer » Tue Nov 18, 2014 5:50 pm

So there's this game I'm making, it has nothing to do with Phoenix Wright but there are some sections in it where you have to argue with another character in a thing called "Logical Warfare". It's gonna be similar to Phoenix Wright, with a few differences. Basically I'm asking this: how do you make a system similar to the cross examinations in Phoenix Wright, with pressing and presenting?

User avatar
Biomass
Regular
Posts: 104
Joined: Tue Jan 01, 2013 11:13 pm
Contact:

Re: How to Code Phoenix Wright-ish Gameplay?

#2 Post by Biomass » Tue Nov 18, 2014 9:09 pm

I dont think theres a simple answer. Renpy has all the necessary tools, but you're pretty much going to have to code all the logic yourself. Here's a simplistic example:

Code: Select all

define Girl = Character('Donut-tan', color="#c8ffc8")
define Me = Character('Me', color = "#ffffff")

image girl = Placeholder("girl")

init python:
    def objection():
        print argument_label
        renpy.hide_screen("my_buttons")
        renpy.call("interject")
        pass

screen my_buttons:
    button:
        xalign .50
        yalign .05
        action Function(objection)
        style "menu_choice_button"
        text "objection! (click me)" style "menu_choice"

screen objection:
    frame:
        xalign .50
        yalign .50
        label _("           Objection!!!           ")

# The game starts here.
label start:

    Me "It's cross examination time!"

    $ arguing = True    
    $ argument_label = ""

    while arguing:
        show screen my_buttons
        $ argument_label = "argue_point0"
        show girl with dissolve
        Girl "Powdered donuts are inherently superior to glazed donuts." 
        $ argument_label = "argue_point1"
        show girl
        Girl "Glazed donuts feel all slimey on the outside."
        $ argument_label = "argue_point2"
        show girl
        Girl "I always have my donuts with coffee."
        hide screen my_buttons
        hide girl
        Me "Her logic is ironclad! ... How will I convince her!?"
        Me "Think Me... there must be a contradiction somewhere..."
        Me "Let's try again from the beginning..."
        pass
    hide screen my_buttons
    return

label interject:
   hide screen my_buttons
   show screen objection
   Me "Objection!"
   hide screen objection
   $ renpy.call(argument_label)
   show screen my_buttons
   return
        
label argue_point0:
   Me "By what metric did you use to arrive at this conclusion!?"
   Girl "...B..Baka.... it's obvious isn't it!?"   
   Me "We need evidence!"
   Girl "I was just about to get to that."
   return
   
label argue_point1:
   Me "Have you given them a chance?  Expand your horizons!"
   Girl "I have no need to expand upon sliminess!"
   return

label argue_point2:
   Me "Let's go out."
   Girl "No."
   return

User avatar
HyperEmoGamer
Newbie
Posts: 24
Joined: Wed Feb 12, 2014 5:20 pm
Projects: Acidic: SoS
Location: California
Contact:

Re: How to Code Phoenix Wright-ish Gameplay?

#3 Post by HyperEmoGamer » Tue Nov 18, 2014 9:11 pm

Thanks! I just needed a basic idea. So thanks!

User avatar
Taleweaver
Writing Maniac
Posts: 3428
Joined: Tue Nov 11, 2003 8:51 am
Completed: Metropolitan Blues, The Loyal Kinsman, Daemonophilia, The Dreaming, The Thirteenth Year, Adrift, Bionic Heart 2, Secrets of the Wolf, The Photographer
Projects: The Pilgrim's Path, Elspeth's Garden, Secret Adventure Game!
Organization: Tall Tales Productions
Location: Germany
Contact:

Re: How to Code Phoenix Wright-ish Gameplay?

#4 Post by Taleweaver » Wed Nov 19, 2014 3:14 am

Moved to Ren'Py Questions
Scriptwriter and producer of Metropolitan Blues
Creator of The Loyal Kinsman
Scriptwriter and director of Daemonophilia
Scriptwriter and director of The Dreaming
Scriptwriter of Zenith Chronicles
Scriptwriter and director of The Thirteenth Year
Scriptwriter and director of Romance is Dead
Scriptwriter and producer of Adrift
More about me in my blog
"Adrift - Like Ever17, but without the Deus Ex Machina" - HigurashiKira

User avatar
Donmai
Eileen-Class Veteran
Posts: 1919
Joined: Sun Jun 10, 2012 1:45 am
Completed: Toire No Hanako, Li'l Red [NaNoRenO 2013], The One in LOVE [NaNoRenO 2014], Running Blade [NaNoRenO 2016], The Other Question, To The Girl With Sunflowers
Projects: Slumberland
Location: Brazil
Contact:

Re: How to Code Phoenix Wright-ish Gameplay?

#5 Post by Donmai » Wed Nov 19, 2014 11:42 am

Image
No, sorry! You must be mistaking me for someone else.
TOIRE NO HANAKO (A Story About Fear)

User avatar
octacon100
Regular
Posts: 163
Joined: Thu Sep 12, 2013 11:23 pm
Projects: Regeria Hope
Organization: Golden Game Barn
IRC Nick: Octacon100
Location: Boston, MA
Contact:

Re: How to Code Phoenix Wright-ish Gameplay?

#6 Post by octacon100 » Wed Nov 19, 2014 11:52 am

You could try looking at the game I'm making now and see if it's similar to the kind of game you want: http://lemmasoft.renai.us/forums/viewto ... 43&t=28559
Image
Current Digital Projects -
Image
Regiera Hope Completed Game Forum Post

Post Reply

Who is online

Users browsing this forum: No registered users