Castle Paradox Forum Index Castle Paradox

 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 Gamelist   Review List   Song List   All Journals   Site Stats   Search Gamelist   IRC Chat Room

Stupid Question

 
Post new topic   Reply to topic    Castle Paradox Forum Index -> HELP!
View previous topic :: View next topic  
Author Message
Aussie Evil




Joined: 28 Apr 2009
Posts: 27

PostPosted: Thu Jun 18, 2009 6:54 pm    Post subject: Stupid Question Reply with quote

Is there a way to have your game display quick summaries of the party characters when the main menu is open (e.g. like FFVII)?
_________________

and you, sir, are no lady
Back to top
View user's profile Send private message
Spoon Weaver




Joined: 18 Nov 2008
Posts: 421
Location: @home

PostPosted: Thu Jun 18, 2009 7:17 pm    Post subject: Reply with quote

yes
Back to top
View user's profile Send private message Send e-mail Visit poster's website
TwinHamster
♫ Furious souls, burn eternally! ♫




Joined: 07 Mar 2004
Posts: 1352

PostPosted: Thu Jun 18, 2009 8:06 pm    Post subject: Reply with quote

I'm not sure about exactly what you're after, but it'd be relatively easy to set up menus to display character bios.
Back to top
View user's profile Send private message Send e-mail AIM Address
Aussie Evil




Joined: 28 Apr 2009
Posts: 27

PostPosted: Sat Jun 20, 2009 8:19 am    Post subject: Reply with quote



See the large box on the left? That's somewhat akin of what I'm wanting to do, probably using 4 separate boxes, not one big one for all 4 party members.
_________________

and you, sir, are no lady
Back to top
View user's profile Send private message
TwinHamster
♫ Furious souls, burn eternally! ♫




Joined: 07 Mar 2004
Posts: 1352

PostPosted: Sat Jun 20, 2009 8:58 am    Post subject: Reply with quote

In addition to having a custom menu, this would take a script to manually place boxes and character portraits on the screen.

To place the boxes, you'll want to use:
Code:

create rect (width, height, style)

And to place portraits, you're going to be wanting to read up on Sprite slices.
It'll basically involve:
Code:

Hero-Portrait-1 := load portrait sprite (num, palette)
set slice x (Hero-Portrait-1, x)
set slice y (Hero-Portrait-1, y)

Where Hero-Portrait-1 is probably a Global Variable.
Back to top
View user's profile Send private message Send e-mail AIM Address
Gizmog1
Don't Lurk In The Bushes!




Joined: 05 Mar 2003
Posts: 2257
Location: Lurking In The Bushes!

PostPosted: Sat Jun 20, 2009 10:43 am    Post subject: Reply with quote

Wow, Aussie. Those are great hero portraits. I'm really looking forward to your game now.
Back to top
View user's profile Send private message Send e-mail AIM Address
binoal




Joined: 20 Jun 2009
Posts: 123
Location: My Own Little World

PostPosted: Sat Jun 20, 2009 2:00 pm    Post subject: Reply with quote

lol those are from final fantasy 7, aussie didnt make them
_________________
Resident Evil RPG Demo

http://www.castleparadox.com/gamelist-display.php?game=963

Legend Of Zelda: Reptilian Warlord Demo

http://www.castleparadox.com/gamelist-display.php?game=961
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
Aussie Evil




Joined: 28 Apr 2009
Posts: 27

PostPosted: Sat Jun 20, 2009 7:33 pm    Post subject: Reply with quote

Gizmog1 wrote:
Wow, Aussie. Those are great hero portraits. I'm really looking forward to your game now.


I hope that was sarcasm...
_________________

and you, sir, are no lady
Back to top
View user's profile Send private message
Spoon Weaver




Joined: 18 Nov 2008
Posts: 421
Location: @home

PostPosted: Sat Jun 20, 2009 8:09 pm    Post subject: Reply with quote

Sarcasm DOES have a way of being lost in translation, whilst on the internet.

Anywho, I'd be glad to work with you on your menu script if you want. First, you'll need to decide how you want your script activated. Using the esc button might mean replacing the functionality of all the buttons. This would be bad I think. Though, disabling it's normal function and replacing it with a looping script is not impossible. But looping scripts can be tricky. You'd basically lose the use of all the smaller scripts you might already be using. You could alternatively have the esc button bring up the main menu that has fewer options 1 of which would bring you to your desired menu. There's choices to be made and you're the one to make them.

So, I guess the real question is how much do you know about scripting?
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Aussie Evil




Joined: 28 Apr 2009
Posts: 27

PostPosted: Sat Jun 20, 2009 9:06 pm    Post subject: Reply with quote

I could do a replacement of the Status menu. I'll need to check up on my coding.
_________________

and you, sir, are no lady
Back to top
View user's profile Send private message
Newbie_Power




Joined: 04 Sep 2006
Posts: 1762

PostPosted: Sat Jun 20, 2009 10:22 pm    Post subject: Reply with quote

Quote:
Anywho, I'd be glad to work with you on your menu script if you want. First, you'll need to decide how you want your script activated. Using the esc button might mean replacing the functionality of all the buttons. This would be bad I think. Though, disabling it's normal function and replacing it with a looping script is not impossible. But looping scripts can be tricky. You'd basically lose the use of all the smaller scripts you might already be using. You could alternatively have the esc button bring up the main menu that has fewer options 1 of which would bring you to your desired menu. There's choices to be made and you're the one to make them.
You make it sound like he'll regret any decision.

Having a game loop that checks for this isn't hard at all as long as you know where to actually call the loop (which should be new game/load game).

And key handling shouldn't be too much of an issue as long as you don't suspend the player (the status screen should still open.) In fact, you don't even have to check for keys at all!

Code:
define constant (0, STATUS_ISOPEN) # Slice extra for keeping track of whether the status display is currently shown, to prevent repeated script calls

script, mainloop, begin
   variable (statusdisplay, gameisplaying)
   
   statusdisplay := create container(1, 1) # This slice will be the parent of the rectangles, portrait sprites, and etc for displaying character status on the menu
   set slice extra (statusdisplay, STATUS_ISOPEN, false)
   
   gameisplaying := 1
   
   while (gameisplaying) do (
      if (menu is open(0) == true) then ( # This is all you have to do.  Just check if the menu is open instead of determining keypresses.
         if (get slice extra(statusdisplay, STATUS_ISOPEN) == false) then (openstatusdisplay) # The slice extra check is optional, but it helps to have it so that you won't be opening the status screen every game tick
      )
      else (if (menu is open(0) == false) then (
         if (get slice extra(statusdisplay, STATUS_ISOPEN) == true) then (closestatusdisplay)
      ))
      
      wait (1)
   )
end

script, openstatusdisplay, begin   
   variable (char1rect, char2rect, char3rect, char4rect)
   variable (char1portrait, char2portrait, char3portrait, char4portrait)
   
   char1rect := create rectangle(...) # Fill in sizes and position
   if (hero in slot(0) == hero:Whatever) then ( # There is no 'get hero portrait' command yet, so do a manual check
      char1portrait := load portrait sprite(...) # Fill in portrait here too
   )
   
   set parent (char1rect, statusdisplay)
   set parent (char1portrait, statusdisplay)
   
   # Repeat for all the character slices
   
   set slice extra(statusdisplay, STATUS_ISOPEN, true)
end

script, close status display, begin   
   # I would put code here to clean up this, but someone probably has a proper way to do so than I would have
   
   set slice extra(statusdisplay, STATUS_ISOPEN, false)
end


Okay, that's a little much, but I call up the status display by checking to see if the menu is open instead of relying on keypresses since the menu is already opened by keypresses anyway. This also doesn't replace the normal menu at all, and instead takes full advantage of its existence.
_________________

TheGiz> Am I the only one who likes to imagine that Elijah Wood's character in Back to the Future 2, the kid at the Wild Gunman machine in the Cafe 80's, is some future descendant of the AVGN?
Back to top
View user's profile Send private message
Aussie Evil




Joined: 28 Apr 2009
Posts: 27

PostPosted: Sat Jun 20, 2009 10:29 pm    Post subject: Reply with quote

Thanks! With trial and error I can make this work for my game.
_________________

and you, sir, are no lady
Back to top
View user's profile Send private message
Spoon Weaver




Joined: 18 Nov 2008
Posts: 421
Location: @home

PostPosted: Sun Jun 21, 2009 6:32 am    Post subject: Reply with quote

Newbie_Power wrote:
Quote:
Anywho, I'd be glad to work with you on your menu script if you want. First, you'll need to decide how you want your script activated. Using the esc button might mean replacing the functionality of all the buttons. This would be bad I think. Though, disabling it's normal function and replacing it with a looping script is not impossible. But looping scripts can be tricky. You'd basically lose the use of all the smaller scripts you might already be using. You could alternatively have the esc button bring up the main menu that has fewer options 1 of which would bring you to your desired menu. There's choices to be made and you're the one to make them.
You make it sound like he'll regret any decision.

Having a game loop that checks for this isn't hard at all as long as you know where to actually call the loop (which should be new game/load game).

And key handling shouldn't be too much of an issue as long as you don't suspend the player (the status screen should still open.) In fact, you don't even have to check for keys at all!

Code:
define constant (0, STATUS_ISOPEN) # Slice extra for keeping track of whether the status display is currently shown, to prevent repeated script calls

script, mainloop, begin
   variable (statusdisplay, gameisplaying)
   
   statusdisplay := create container(1, 1) # This slice will be the parent of the rectangles, portrait sprites, and etc for displaying character status on the menu
   set slice extra (statusdisplay, STATUS_ISOPEN, false)
   
   gameisplaying := 1
   
   while (gameisplaying) do (
      if (menu is open(0) == true) then ( # This is all you have to do.  Just check if the menu is open instead of determining keypresses.
         if (get slice extra(statusdisplay, STATUS_ISOPEN) == false) then (openstatusdisplay) # The slice extra check is optional, but it helps to have it so that you won't be opening the status screen every game tick
      )
      else (if (menu is open(0) == false) then (
         if (get slice extra(statusdisplay, STATUS_ISOPEN) == true) then (closestatusdisplay)
      ))
      
      wait (1)
   )
end

script, openstatusdisplay, begin   
   variable (char1rect, char2rect, char3rect, char4rect)
   variable (char1portrait, char2portrait, char3portrait, char4portrait)
   
   char1rect := create rectangle(...) # Fill in sizes and position
   if (hero in slot(0) == hero:Whatever) then ( # There is no 'get hero portrait' command yet, so do a manual check
      char1portrait := load portrait sprite(...) # Fill in portrait here too
   )
   
   set parent (char1rect, statusdisplay)
   set parent (char1portrait, statusdisplay)
   
   # Repeat for all the character slices
   
   set slice extra(statusdisplay, STATUS_ISOPEN, true)
end

script, close status display, begin   
   # I would put code here to clean up this, but someone probably has a proper way to do so than I would have
   
   set slice extra(statusdisplay, STATUS_ISOPEN, false)
end


Okay, that's a little much, but I call up the status display by checking to see if the menu is open instead of relying on keypresses since the menu is already opened by keypresses anyway. This also doesn't replace the normal menu at all, and instead takes full advantage of its existence.


You don't really address the fact that having a loop, always active, will cause him to rewrite any other scripts he might have, and fit them into the loop. Which is potentially a big project. (Unless he doesn't have any)
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Newbie_Power




Joined: 04 Sep 2006
Posts: 1762

PostPosted: Sun Jun 21, 2009 10:22 am    Post subject: Reply with quote

Quote:
You don't really address the fact that having a loop, always active, will cause him to rewrite any other scripts he might have, and fit them into the loop. Which is potentially a big project. (Unless he doesn't have any)
It'll be better for him to have to deal with this issue (which is very easily solved) than to over complicate things.

If he needs an intro for a new game script, then he can just make one and when the player has control, he can simply call the game loop at the end of the new game script. Same for load game script. Then he still has map scripts, NPC triggered scripts, and step on NPC scripts free for him to use for specific things.
_________________

TheGiz> Am I the only one who likes to imagine that Elijah Wood's character in Back to the Future 2, the kid at the Wild Gunman machine in the Cafe 80's, is some future descendant of the AVGN?
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Castle Paradox Forum Index -> HELP! All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can 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, 2005 phpBB Group