Help with Chapter Progress bar

Started by CTxCB, Fri 27/11/2009 21:40:36

Previous topic - Next topic

CTxCB

I am new to this forum and AGS, I need help...

I'd like to make a Progress bar like KQ7 or Phantasmagoria, How would I do this?

Charity

#1
I would use an int to store an invisible score, and then add some value to that int at every puzzle and plot point that is essential to completing the chapter (but not on optional ones, probably).  A sort of invisible point system, if you will.  If you want to put all the chapters on the same bar, you'll probably want to make the total points the player will get in each chapter.  Example: Each chapter sums to 100 points total.  Then just add more points for events in shorter chapters.

As for the bar itself, I haven't done one myself, but it shouldn't be too difficult to do.  I would recommend either a GUI button with a dynamic sprite, or you might be able to use a GUI slider.  Read up on GUI objects, dynamic sprites, and drawing surfaces in the manual, if you haven't already.  Then just draw evenly spaced lines or something to represent chapter breaks.

GarageGothic

Or just use a button where the graphic is the full size of the bar, but set the width of the button to a fraction corresponding to the amount of points (maxwidth*points/maxpoints). Make sure that the button is set to crop its graphic to the dimensions of the button.

CTxCB

Quote from: Lyaer on Fri 27/11/2009 23:17:46
I would use an int to store an invisible score, and then add some value to that int at every puzzle and plot point that is essential to completing the chapter (but not on optional ones, probably).  A sort of invisible point system, if you will.  If you want to put all the chapters on the same bar, you'll probably want to make the total points the player will get in each chapter.  Example: Each chapter sums to 100 points total.  Then just add more points for events in shorter chapters.

As for the bar itself, I haven't done one myself, but it shouldn't be too difficult to do.  I would recommend either a GUI button with a dynamic sprite, or you might be able to use a GUI slider.  Read up on GUI objects, dynamic sprites, and drawing surfaces in the manual, if you haven't already.  Then just draw evenly spaced lines or something to represent chapter breaks.

Quote from: GarageGothic on Fri 27/11/2009 23:57:32
Or just use a button where the graphic is the full size of the bar, but set the width of the button to a fraction corresponding to the amount of points (maxwidth*points/maxpoints). Make sure that the button is set to crop its graphic to the dimensions of the button.

Thanks for two great suggestions, If I Assigned so many Points per Chapter, what is the highest amount of points that can be used? and if i made a 'box' Similar to phantasmagoria... how would i place a AVI or OGG in the blank space defined for the room, like phantasm

GarageGothic

#4
Unfortunately AGS currently has no built-in way of playing videos on only part of the screen. However, you might want to look into the Scotch's ogg theora video plugin, which does exactly that. I have very little experience with it myself (only tried the demo), but it seemed to work quite well.

As for max number of points, the score counter is an integer, so it should go up to 2,147,483,647 points which is probably more than enough :)

CTxCB

Quote from: GarageGothic on Sat 28/11/2009 01:28:23
Unfortunately AGS currently has no built-in way of playing videos on only part of the screen. However, you might want to look into the Scotch's ogg theora video plugin, which does exactly that. I have very little experience with it myself (only tried the demo), but it seemed to work quite well.

As for max number of points, the score counter is an integer, so it should go up to 2,147,483,647 points which is probably more than enough :)

Well, I have got Scotch's OGG theora Video Plugin, but can i centre the video, like phantasmagoria did, Had the controls on the outside and the vid in the centre...

GarageGothic

As I said I never really used the plugin, but I assume the left/top parameters of the Theora.Draw function and the cx/cy (center x, center y?) parameters of the Theora.DrawEx function are meant for setting the placement of the video on the screen, so yeah, it should be possible to center it - just play around with the coordinates.

CTxCB

Quote from: GarageGothic on Sun 29/11/2009 05:13:33
As I said I never really used the plugin, but I assume the left/top parameters of the Theora.Draw function and the cx/cy (center x, center y?) parameters of the Theora.DrawEx function are meant for setting the placement of the video on the screen, so yeah, it should be possible to center it - just play around with the coordinates.

thanks so Much for all the Help... I have One Problem that I am Not Sure How to Fix... I want to make a 'Name Your Game' Control Like KQ7 and Phantasmagoria, I Have a Button Behind a Textbox to make it look more 3D and Some Buttons With the Same Letters as a keyboard... How do i Make it so when someone Clicks one of the Letters It adds that letter to the textbox... Sorry for asking so much...

SMF spam blocked by CleanTalk