Buttons / Textbox Images...

Started by CTxCB, Mon 10/01/2011 20:31:57

Previous topic - Next topic

CTxCB

I am making a game like Imagination Network and I tried copying and pasting from the original  to make a textbox and It didnt work... could someone make all 8 pictures needed please, I'd like one that is better looking than the original, If you were to do it, I'd thank you so much... I'd also like a red and blue 3D button... also HD looking... and I would like to know how to code Buttons in to the game that are not like the original... Red if you cannot click it and blue if it can... Thanks so much...

Calin Leafshade

Sure, i'll get right on that sire  :-\

CTxCB

Quote from: Calin Elephantsittingonface on Mon 10/01/2011 20:44:39
Sure, i'll get right on that sire  :-\

Thanks... It'll really be appriciated!

Matti



Khris

Wheee, sarcasm detection fail ;D
Love those.

techodog: This isn't a technical question, and it seems you're simply too lazy to do your own work.

CTxCB

Quote from: Khris on Mon 10/01/2011 21:35:53
Wheee, sarcasm detection fail ;D
Love those.

techodog: This isn't a technical question, and it seems you're simply too lazy to do your own work.

It's not... I tried for hours to copy the original and it ended up being too big... or too small and I had to copy and paste and grab 8 times and It just didnt work out... then I thought that someone better than me could do it... cause a lot of other people here have had a lot more experience, I even tried opening INN with SCI Studio VGA and looked at hundreds and hundreds of Views but just couldnt find it... :(

CTxCB

Also... FYI, it is a technical question because the Button would probably need code to be customizable to look different from normal... and I couldnt find any other sections that would not of fitted because of that...

Baron

Quote from: techodog on Mon 10/01/2011 21:41:13
I even tried opening INN with SCI Studio VGA and looked at hundreds and hundreds of Views but just couldnt find it... :(

There's no real point for display graphics to be a part of a view.  If SCI Studio organizes itself like AGS, the graphics would probably just be individual sprites.

These guys are right, you're never going to learn unless you do it yourself.  I'm sure if you ask a specific question to help do it yourself someone would be more than willing to answer it, but I doubt very much that someone is going to do it for you.

CTxCB

Quote from: Baron on Tue 11/01/2011 01:45:20
Quote from: techodog on Mon 10/01/2011 21:41:13
I even tried opening INN with SCI Studio VGA and looked at hundreds and hundreds of Views but just couldnt find it... :(

There's no real point for display graphics to be a part of a view.  If SCI Studio organizes itself like AGS, the graphics would probably just be individual sprites.

These guys are right, you're never going to learn unless you do it yourself.  I'm sure if you ask a specific question to help do it yourself someone would be more than willing to answer it, but I doubt very much that someone is going to do it for you.
you'd be completely wrong, in each view there are between 0 - 12 loops, some containing random things... its really hard to search through them... It's amazing sierra actually kept track of where everything was, I got lost after like 5 seconds... where else would they be? they were drawn... if you look at SCI Studio, to have a custom Textbox, it needs to be drawn... 8 photos, top left, middle and right! Middle left and right! Bottom, left, middle and right! But I need to use the original, since I am remaking the game... its pretty hard...

monkey0506

You're asking someone to make Full 1080p HD Resolution 3D (presumably polarized not cyan-red filtered) images for your game because copying and pasting images at the proper resolution for your own game project has proved too difficult; insisting that doing so is a technical question because your graphics "would probably need code to be customizable to look different from normal"..whatever that means; and to help rationalize all this you're dumping information about how different portions of graphics are put together to make larger images, and that in order for them to be displayed they must be drawn.

To top this all off, you've stated quite clearly that you're "making a game like Imagination Network" by which you obviously meant "remaking the game".

..and, you're asking people to help you with this?

You are using AGS 2.72, right? Coz versions 3.0 and up no longer have the "Make My Game" option.

CTxCB

Quote from: monkey_05_06 on Tue 11/01/2011 03:11:22
You're asking someone to make Full 1080p HD Resolution 3D (presumably polarized not cyan-red filtered) images for your game because copying and pasting images at the proper resolution for your own game project has proved too difficult; insisting that doing so is a technical question because your graphics "would probably need code to be customizable to look different from normal"..whatever that means; and to help rationalize all this you're dumping information about how different portions of graphics are put together to make larger images, and that in order for them to be displayed they must be drawn.

To top this all off, you've stated quite clearly that you're "making a game like Imagination Network" by which you obviously meant "remaking the game".

..and, you're asking people to help you with this?

You are using AGS 2.72, right? Coz versions 3.0 and up no longer have the "Make My Game" option.

I didnt mean it like that, I meant just a "good looking" Textbox and Button, By Making a game like Imagination network, I do mean that... But use some of Imagination Network and some new stuff to make it appeal to both old and new gamers, once complete, I am working for as an Indie Company and we hope to try and get the copyright if possible... in order to be able to sell the game... I'm not sure if your being sarcastic with the line about versions? but... Version 3.2! If I could of done it myself, I would of... I only turn to other people once I have tried it myself and failed...

Wersus

You're making an online gaming system with dozens of games and you're failing to create a button? Seriously?

Also, as you are thinking of making it commercial, is this a paying job?

CTxCB

Mods, lock this topic please, I'm planning on starting from scratch with a new idea... Forget this idea for now...

Khris

Quote from: techodog on Mon 10/01/2011 20:31:57and I would like to know how to code Buttons in to the game that are not like the original... Red if you cannot click it and blue if it can

This is actually a technical question, so I'll address that:

To have buttons colored other than gray, you have to put sprites on them. You can't use the button's text in that case so you'll need a red/blue sprite with the button text.
If you want the button disabled, just call ButtonScriptName.Enabled = false; and set ButtonScriptName.NormalGraphic to the sprite of the red button image.
To enable it, just set .Enabled back to true and the image back to the blue one.

I'd probably use sprite slot numbers like GUI_ID*20 + Button_ID*2 for the red sprite and that +1 for the blue sprite.
Then you can do this:

Code: ags
void SetActive(this Button*, bool active) {

  this.Enabled = active;
  this.NormalGraphic = this.OwningGUI.ID*20 + this.ID*2;
  if (active) this.NormalGraphic++;
}


After you've imported the red sprite for button 2 on GUI 4, change the slot number to 84, the blue one should be 85.
Now you can do
  bQuitGame.SetActive(true);

Ryan Timothy B

I read this thread last night and had quite a time following what he wanted. So I'm curious with this, Khris:
Quote from: Khris on Tue 11/01/2011 07:22:20
GUI_ID*20 + Button_ID*2

I believe you meant to have  GUI_ID * 30  since 30 is the limit of controls per GUI not 20.
If for some reason I didn't follow this thread properly and I'm wrong, excuse this comment. :P

monkey0506

#16
Actually since Khris is multiplying the GUIControl.ID by 2, the GUI.ID should be multiplied by (AGS_MAX_CONTROLS_PER_GUI * 2), or 60*.

Here's some random examples:

// GUI.ID * 20 collision:
gui[0].ID * 20 + gui[0].Controls[10].ID * 2 = 0 + 20 = 20
gui[1].ID * 20 + gui[1].Controls[0].ID * 2 = 20 + 0 = 20

// GUI.ID * 30 collision:
gui[0].ID * 30 + gui[0].Controls[29].ID * 2 = 0 + 58 = 58
gui[1].ID * 30 + gui[1].Controls[14].ID * 2 = 30 + 28 = 58

// GUI.ID * 60 ..no collisions:
gui[0].ID * 60 + gui[0].Controls[29].ID * 2 = 0 + 58 = 58
gui[0].ID * 60 + gui[0].Controls[29].ID * 2 + 1 = 0 + 58 + 1 = 59
gui[1].ID * 60 + gui[1].Controls[0].ID * 2 = 60 + 0 = 60

Nice catch though Ryan..I didn't spot it myself the first time I read over Khris' code.

Edit: Of course, if you don't use 30 controls on any of your GUIs then you could reduce the factor to twice the size of the most controls used on any GUI..but if you ever added a new control to any GUI then all of your sprites would then have to be renumbered to prevent collisions. 60 is the safest factor to use for this operation since AGS_MAX_CONTROLS_PER_GUI isn't likely going to be changed in the near future (since we can have unlimited GUIs if you really need more controls you can just outsource them to a new GUI..and might want to consider your GUIs' organization anyway).

*Keep in mind that the multidimensional indexing algorithm° that Khris is using is: (A * B_MAX) + B..so if B is multiplied by 2 then the maximum resultant value of B is also increased.
°This is my favorite example of the math..prolly coz all the colors!

Khris

The safest factor to use would be AGS_MAX_CONTROLS_PER_GUI*2 :)

The thing is, I was completely aware of the fact that *20 is only sufficient for a max of 10 controls per GUI. I should have mentioned that in my post though.

monkey0506

Quote from: Khris on Tue 11/01/2011 17:30:28The safest factor to use would be AGS_MAX_CONTROLS_PER_GUI*2 :)

Of course, and AGS_MAX_CONTROLS_PER_GUI*2 would be viable for the extender method since AGS_MAX_CONTROLS_PER_GUI is a scripting constant..however, it isn't a real-world constant, so you would still have to use a literal value for the sprite numbering. :P

Oh, and not only would using a factor of 20 limit it to 10 controls..it would limit it to the first 10 controls..so if you had a Button with ID of 10 or higher that you wanted to use..even if it was the only Button on the GUI, it still wouldn't work. The reason I'm pointing this out is because it's not limiting it to 10 Buttons, but the first 10 controls of the GUI.

Knox

hey cool i was looking for something like this in my game, gonna put it in twice just to make sure people notice!
--All that is necessary for evil to triumph is for good men to do nothing.

SMF spam blocked by CleanTalk