Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Topics - Atelier

#141
In my game, Text Quest, the player gets to decide which type of beast they are. Depending on which you choose the plot will be slightly changed, you'll be able to access exclusive areas, talk to different people, etc - but which creatures should make it onto the list? I'm posting this because I wanted to steer away from the hackneyed choices of human, elf, goblin; but while being different they still need to retain some of the traditional RPGness, and also offer a wide choice for players.

So, which class would you be?
#142
I'm coding four different times of day for my text game; morning, daytime, evening, and nightfall.

I have int timescale, which increases in value by 1 every game loop. When timsescale reaches 24000 (600 seconds), it will be reset at 0 and everything will start again (giving it the impression of a day's cycle).

I want to constantly check for the 4 boundaries. When timescale equals:

0-6000 (morning) - the morning effects will be activated
151-12000 (daytime) - the daytime effects will be activated
12040-18000 (evening) - the evening effects will be activated
18040-24000 (nightfall) - the nighttime effects will be activated

As you can see each time zone lasts roughly 150 seconds. But how do I check whether a value is in the range of something? I've played around with the >= and <= operators, but common sense told me it wouldn't work, as when it came round to night time, there would be three values which are all true! So is there a quick piece of code to check whether a variable is in a certain boundary?

Many thanks,
AtelierGames
#143
General Discussion / iPad
Wed 27/01/2010 20:21:10
http://www.apple.com/ipad/
http://news.bbc.co.uk/1/hi/technology/8483654.stm

I'm rather disappointed with Apple's new iPad. It's let down the skeptics, offers nothing revolutionary, and goes for $499. The screen resolution on the iPad is a mere 1024x768, not even the size of Full HD video. Have you seen the app pages? The text is huge and the bar at the bottom is an inch tall! It only needs to be half a centimetre.

I'm unsure whether it will ever take off.
#144
I'm afraid I have another question about the text parser. Here's the code I have for a say command:

Code: ags

function InputBox_OnActivate (GUIControl *control)
{
   Parser.ParseText(InputBox.Text);
   String saycommand = InputBox.Text; //The string I'm using to store the command temporarily is saycommand.

   if (Parser.Said("say rol")) Display("You say aloud: \"\%s\"\.", saycommand);


This works fine, however, since the player types in "say something" the say also appears in the display, so it ends up like this:

Code: ags

You say aloud: "say something".


Is there a way to extract the word 'say' from my saycommand string, so it's just left with whatever the player typed after it? I'd be really grateful for any solutions.
#145
I'm having trouble with the on_call function. I'm using the text parser and so want to call room-specific inputs. Here is the code in my global script:

Code: ags
function InputBox_OnActivate(GUIControl *control) //Input box is my text box.
{
   if (player.Room == 1) CallRoomScript(1); //When the player presses enter and is in room 1.
   if (player.Room == 2) CallRoomScript(2); //And so on.
}


And here is my room script (function at very top):

Code: ags
function on_call (int value) {
   if (value == 1) {

   if (Parser.Said("look tree")) Display("A tree.");
   if (Parser.Said("eat tree")) Display("That would give me indigestion."));
   //etc
   }
}


But when I type any of those two in the text box and enter, it doesn't respond at all. Is there anything wrong with my code on the outset?

Thanks,
AtelierGames
#146
Entries until: Thursday 21st January, GMT
Votes until: Saturday 23rd January, GMT


Winner: Dualnames

This fortnight, entrants should write a story or poem with the theme of love. Interpret how you will (i.e stories about love for your goldfish are just as valid :=). Good luck everybody, and here's the trophy:

#147
Critics' Lounge / Village Hall - Updated
Tue 01/12/2009 18:28:56
Today I added all the objects together to give the first signs of a finished background.



The large area of wall on the right will be filled with a banner for the village's Giant Vegetable Competition, and perhaps a few other paintings. The floor has been left white, because I wanted to check that everything was right before I finished off. Please critique as usual!

PS. I really struggled making tables and chairs that were in proportion with the men, but I'll have another go in the next few days.
#148
I'm working on a one room game at the moment where the player can choose some decorations to place upon a Christmas tree. I have a couple of problems though:

- First off, I have a rough idea of how the decorations will be placed. At the bottom of the screen will be a tray with different varieties of baubles, which the player drags out of the box and places them upon the tree. But how can I code this?

- Secondly, after the player has clicked on the finish button, how do I screenshot their decorated tree and save it as a picture file. (In the game folder, but ideally on their desktop).

Thanks for any help in advance.
#149
Misunderstanding

This fortnight, entrants should write a story (or poem!) with the theme of one big misunderstanding. Your entries can be any genre, but a clever twist at the end would go down with me a treat. That's it. So have fun with your favourite and penultimate comp before Christmas! (I think).

DATES:
Entries until: Friday 27th November (11:59 GMT)
Votes until: Monday 30th November (11:59 GMT)
Winner announced: Tuesday 1st December


Feast your eyes on this trophy up for grabs:

(updated to fit signatures)

Good luck everybody!
#150
General Discussion / Whizz-Kids
Thu 27/08/2009 20:47:06
I promise this will be the last BBC-News-related-thread, but I was reading this, and wondered what other people think about children with an IQ fifty times their age, (or whatever :)).

Three languages, muscial instruments and an A* at eight. With a name like Xavier the first thing that came into my head was "poor, pushed child" but seemingly not. But is it really nature or is it just nurture? It would be interesting to see what other people think, anyway.
#151
General Discussion / Hit them Hard and Often
Tue 18/08/2009 10:47:01
I saw this and had to share: http://news.bbc.co.uk/1/hi/sci/tech/8206280.stm

QuoteIn their scientific paper, the authors conclude that humanity's only hope is to "hit them hard and hit them often".

:) So this is how they employ their time...
#152
Hullo.

So I've begun programming my project, and everything was going fine, until I realised that my scripts would soon become illegible. So I've partioned the global script up into nice chunks, with no problems.

However, I'm having to change my method of getting the player's input (it's a text game) and giving them the response in the text box. Here's my old code for doing that...

Code: ags

function InputBox_OnActivate(GUIControl *control)
{
   if (player.Room == 1)
      {
         if (InputBox.Text == "Leave - East")
         {
            DisplayBox.AddItem("Leave - East: You walk away from the church and reach the meadow, where you steal a view of the castle.");
            player.Changeroom(5);
         }
      }
}


This is a pain, bearing in mind that there could easily be over fifty interactions in a single room, and dozens of rooms. So, I need a shorter and sharper way of doing the exact same things in ideally one line. Here's what I've started on below, but I've hit a snag and so would be grateful for help.

(This is what I've got in the global script).

Code: ags

function InputBox_OnActivate(GUIControl *control)
{
    InputBox.Text = Input; //I've created a global variable called Input to make things simpler.
    Scene_One_Inputs(); //This is a custom function which I have created in a separate script and imported.
    Scene_Two_Inputs(); //Another custom function in a different script.
    Scene_Three_Inputs(); //And another.
    //You get the idea.
}


Here's the driving force behind giving the response:

Code: ags

function On_Input([string TEST]) //This is the part I need help with.
{
   Input = "";
   DisplayBox.AddItem(TEST);
}


Then I link the three functions together: Scene_One_Inputs; On_Input; and InputBox_OnActivate, like so:

(In Room 1.asc. It's not the normal room script, I've just created one to hold the Input codes so my global script isn't so messy).
Code: ags

function Scene_One_Inputs() //This is the custom function which I put under InputBox_OnActivate.
{
   if (Input == "Leave - East") On_Input(["Leave - East: You walk away from the church and reach the meadow, where you steal a view of the castle."]);
}


This has condensed all of my old method down. But I should probably get to the problem :-\ I thought that I should explain how everything works, as it is all connected.

I need help with the On_Input function, namely the last part, ([string TEST]) . How could I enter the text, whatever it may be, into this parameter, and have the line inside the function (DisplayBox.AddItem) recognise it and then add it.

It tells me there's a parse error near the "[", in this line:

Code: ags

if (Input == "Leave - East") On_Input(["Leave - East: You walk away from the church and reach the meadow, where you steal a view of the castle."]);


I've tried fiddling around with the order of everything, but nothing seems to work. My query has been poorly explained, and I went a bit crazy with the code tags, but I would be very grateful for some help and/or alternatives. Thanks. :)
#153
Hullo.

The list box is a fairly integral part of my project. But I've come up with a problem. When there's too many words in a list box, it doesn't fill down the box create a block of writing, but instead it just carries on over the rest of the screen. I cannot possibly make my box any wider, and I must use a list box, too.

It is possible to get rid of this overspill and have the text carried on downwards and not across, like labels do? Thanks. :)
#154
Critics' Lounge / Paunch Characters' C&C
Sun 19/07/2009 19:08:15
Hullo.

I've just started yet another little project, which I hope will keep me busy through the holidays. So far, I have the plot mapped out, the music sorted, and some graphics. (Below). Each of these little men have their own personality, which I hope I've captured. But what could I do to improve them? It's my first go at any kind of art really, so I'd like to know what's not right about them. Any little picky points are welcome!



Left to right: Paunch the Ogre; Sheriff of Sherwood; Soldier; Robin Hood; Friar Tuck; Dungeon Guard.

Progress: Added shading to Robin. Added shading to Dungeon Guard. Added shading to Paunch. Added shading to Friar Tuck. Added shading to the captain.

UPDATE:
The Sheriff, who only makes one appearance, has been made to look a lot older and more important. No doubt the poor serfs' extortionate taxes went on that golden armour... I've now completed the captain, who will also take on the same appearance as the soldiers. Therefore, the captain is effectively not needed. I'm not too happy about his helmet, and I might need to change the pattern of his armour - but I've added him in the line up nevertheless. So that just leaves one more, plus another four or five to complete! It negates the effect of boredom from staying home with swine flu at least =D. I've finished the Friar. He's supposed to be the old, wise brother of the Abbey, therefore I have left his muscles out. Paunch the Ogre has now been shaded. I'm very happy with the result - I've managed to flaunt his huge muscles, but at the same time I think I've retained some of his intended cuteness. His unsightly boils went well too. Having him a different size wasn't intentional however, but I reckon I could make it work. I'm calling the guard done, as he doesn't have a very big part/appearance in Paunch, and also because I'm happy with the way he looks. Over the next few days I'll redo the characters one by one, and start the final few. I'll keep this original post updated. I've taken off Paunch's club because I think it would make an ideal cursor.
#155
Hullo.

I have a small problem with running my game using 32-bit true colour. When a room loads, or a GUI appears, or you leave a room, (etc) the screen flashes white for a few seconds. Although the problem disappears after the room is loaded, it really doesn't look very nice.

What can I do to stop this happening? I know others have had this problem before, but the only similar thread didn't have any replies. Thanks. :)
#156
Hullo.

I have a text box on a GUI. When the user clicks the enter button after they have entered their name, is there any way to count how many of a certain letter their input has? For example, how would I count how many Ls appear in their name and store that as an int using a global variable?

Thanks in advance.
#157
Hullo.

So far I've come across heaps of problems with my project. Here's what's happening:


  • For my one room game I have three themes.
  • These three themes take the form of different background frames which you can change by pressing 1, 2, or 3.
  • I have created a simple label GUI to appear in a certain place in the room, whatever the theme.
  • In my room script, under the room_Load function, I have got 250 different phrases that are randomly selected when the player enters.
  • The phrase that gets selected appears in the label.
  • I want the player to be able to change the text in the label so they get another random phrase.

Now, this last point I have been able to do with no problems. To change the theme, I am using the restart function to restart the game. Since it is only a one room game, it restarts at the very beginning of the game before the phrase is selected. I'm using this because I cannot use resetroom, as the player can't reset the room they're in.

My problem starts when the player changes the theme. The text in the label stays as it is, which is fine, but if you want to get another phrase and continue using that theme you have to press the space bar (which is the button to restart.) This means it restarts the game at the very beginning again, and although it gives a new phrase, it changes from the theme the player chose and uses the default theme.

To stop this happening, I have entered the second line under the button's code.

Code: ags
function on_key_press()
{
   if (keycode == 2) SetBackgroundFrame(2);
   SetRestartPoint();
}


Now, whenever the player changes theme it sets that theme as the restart point so it continues to use that every time the players restarts. BUT this is where the problem continues. The phrase in the label is stuck as it was when you changed theme, and restarting doesn't change the phrase. Then, it doesn't matter it you re-change themes - the phrase is stuck until you close the game.

I have tried having the three themes as separate rooms, but this doesn't work for another reason. How would I reselect the phrase every time the game reloads? I've tried various different things but it never works for something or another is wrong. I probably haven't explained as well as I should have, but I'd appreciate any help at the moment.

Thanks! :)
#158
Hullo.

Restarting is quite an integral part in my game. It is a one room game, and rather simple. Yet when the player restarts by pressing the space bar, it starts playing the music from the beginning again. However, I want the music to carry on playing. How can I get the game to restart without resetting the music, or can't I?

Thanks!
#159
General Discussion / Block PAD - Thread Closed
Fri 12/06/2009 20:00:37
Block PAD
Suggestion Thread

You're not a writer if you don't get afflicted with that terrible ailment: writer's block. But with Block PAD, there's no need to snap your pen in frustration or tear up that manuscript of yours - there's a wealth of fresh ideas to keep you going.

I'm creating a one room AGS-abused game with a random phrase generator to help with writers' block. A bit like a toilet plunger for the mind. And seeing how everybody on the forums has a certain creative flare, I thought that this would be a good place to gather phrases to add into Block PAD. There are however a few criteria that your contributions need to meet...


  • It cannot be too long (max. 10 words)
  • It must be kept suitable for every age. :)
  • Quotes are fine.
  • Single words are fine.
  • Plots are fine.
  • Random midnight muses are definitely fine.

Thanks for looking at Block PAD, and thanks for your co-operation in anticipation! Contributions may not be added into the first version, but in a later expanded version I'll put everything in! :) (Credit will be given to all you good people on the forums, of course!)

You can visit the production thread for Block PAD HERE, if you're interested/care.

#160
Hullo.

I'm using a list box GUI at the bottom to display everything the player looks at. It works fine, but the code that you have to write for it is long and will slow up the game if I have to do it for every hotspot. Here's the code I use at the moment:

Code: ags
function hHotspotX_Look ()
{
   int ran=Random(4);
   if (ran==0) {
      DisplayBox.ScrollDown();
      DisplayBox.AddItem ("You got the first phrase.");
}
   else if (ran==1){
      DisplayBox.ScrollDown();
      DisplayBox.AddItem ("You got the second phrase.");
}
   else if (ran==2){
      DisplayBox.ScrollDown();
      DisplayBox.AddItem ("You got the third phrase.");
}
   else if (ran==3){
      DisplayBox.ScrollDown();
      DisplayBox.AddItem ("You got the fourth phrase.");
}
   else if (ran==4){
      DisplayBox.ScrollDown();
      DisplayBox.AddItem ("You got the fifth phrase.");
   }
}


Like so. Now if I had to do this I'd need to enter all this (or copy and paste) for every single hotspot. Is there a way I can simplify it by making my own custom code? I've looked into structs but I don't know where to start.

Thanks.


SMF spam blocked by CleanTalk