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

Messages - markbilly

#21
Hi,

I have this function, which I want to be able to repeat in a loop. It needs to do its thing without blocking - so the player can click on things at the same time.

Basically all it's doing is moving a line of text down the page - 1 pixel every second - until it gets to a certain y value.

This is the code I tried to write so it didn't block:
Code: ags

function ScrollSentence(int speed = 40)
{
  int timer = 0;
  sentence = Overlay.CreateTextual(134, 36, 80, Game.SpeechFont, 15, "Sentence 1");
  while (sentence.Y < 108) {
      timer++;
      if (timer == speed) {
        sentence.Y++;
        timer = 0;
      }
  }
  sentence.Remove();
}


Except that doesn't work just locks the game up. The only way to fix it is to add a Wait(1) - but that destroys the point.

Code: ags

function ScrollSentence(int speed)
{
  int timer = 0;
  //determine what "sentence one" from lists
  sentence = Overlay.CreateTextual(134, 36, 80, Game.SpeechFont, 15, "Sentence 1");
  while (sentence.Y < 108) {
      timer++;
      if (timer == 40) {
        sentence.Y++;
        timer = 0;
      }
      Wait(1);
  }
  sentence.Remove();
}


Help - this is integral to getting the game working! Thanks, Mark.
#22
As I have, so far, only been tweeting about this I thought I'd better drop a line here.

I am going to start building a prototype for the spiritual sequel to PMQs: the Game over the next few days and if that goes well I'll be contacting the bakers about joining in :D

The hope is to draw some more - and different - press attention to the community and AGS in general.
#23
Hi Alistair,

I can think of no immediate issue for the gake on your set up.

What's best to di us to delete all the files, and doebload the game again. You should then unzipped the game and run PMQs.exe

There is no need to do anything else. Also, there is no "quit" built into the gake, it is deliberately set up in a window so you can just use the "x" at the top of the window.

Hope this helps,

Mark
#24
I contacted Rock Paper Shotgun but the rest happened on its own. Having a presence on Twitter helped an awful lot.

The game is about politics as well, which puts it in a unique position with a MUCH larger potential audience.
#27
Thanks for the kind words, Creed Malay!

The "Flashman" reference probably gives away my political leaning, as it's one of the unflattering labels that have been given to David Cameron. Go here for explanation of sorts. - Victor6 beat me to it!

The game has now been featured on Rock Paper Shotgun and Indiegames.com WOOP! :D
#28
YAY, thanks for all the nice feedback! :)

@Stupot: I posted this somewhere else to address the "playing as the enemy problem" and the choosing sides issue:

QuoteFirstly, having Dave as the protagonist was the most sensible and obvious choice from a gameplay perspective and that has to come first.

Secondly, having the player choose questions would be pretty difficult, because then there's no game. You have to be faced with a choice and then try to make the right one for this type of game to work. Having the player's "turn" first makes no sense, unfortunately.

EDIT:

@Dualnames: PHEW!
#29
Quote from: KodiakBehr on Mon 25/07/2011 23:28:40
(Salivates over a Canadian version, pre-majority-government)

That would take an incalculable amount of research! :P

Thanks for all the great comments, everyone!
#30
Quote from: Dualnames on Mon 25/07/2011 19:19:30
W
T
F

Is that a good kind of WTF or a bad kind of WTF, Mr. Names?
#31
DOWNLOAD PAGE



Do your Wednesdays feel joyless and empty now Parliament’s in its summer recess? Does 12 o’clock pass without event, leaving you deflated and depressed?

Prime Minister’s Questions is every political nut’s favourite time of the week and we all deserve to enjoy it whenever we want.

With that in mind, Pixel Politics has come up with PRIME MINISTER’S QUESTIONS: THE GAME. Play as the prime minister in this satirical, retro style game as he faces his weekly grilling from Her Majesty’s Opposition.


With sound effects by Matthew Brown.



Go to the Games Page.

DOWNLOAD PAGE
#32
Aw thanks, this is really spurring me on! I have a couple of smaller projects to sort out and then I'll be back on TLG full time - I can assure everyone of that! :)
#33
Quote from: TheRoger on Thu 16/06/2011 06:22:48
The Longevity Gene

This isn't cancelled, by the way! But I am really busy... So sorry everyone! :(

It is pretty amazing that people are still looking forward to the game, though :)
#34
Works a treat. Thanks, Khris!
#35
I have written, with the help of a few threads on the forum, a function for typewriter-style credits.

Unfortunately, when I re-use the function for the next line of the credits, the line before disappears because I've written over it.

I tried having the Overlay* credit as an argument of the function, so a new Overlay is created each time a use it. This didn't work though, for some reason, and it was also really messy. I was declaring an Overlay for each line of the credits and exporting/importing them all. Eurgh!

Here is the code for the function and then how it's use in the room script. Any ideas how I can tell it to make a new Overlay for each use of the function and have it stick around so the credits don't disappear.

Code: ags

function CreditsMessage(String message, int y_coord)
{
  Overlay* credit;
  int cred_colour = (Random(51000) + 9000);
  int i = 1;
  while (i < message.Length) { 
    String cred_part = message.Truncate(i);
    credit = Overlay.CreateTextual(10, y_coord, 300, Game.SpeechFont, cred_colour, cred_part);
    Wait(2);
    i++;
  }
  credit = Overlay.CreateTextual(10, y_coord, 300, Game.SpeechFont, cred_colour, message);
  Wait(20);
}


Code: ags

  CreditsMessage("XXXX",50);
  CreditsMessage("XXXX",55);
  Wait(20);
  CreditsMessage("XXXX",65);
  CreditsMessage("XXXX",70);
  Wait(20);
  CreditsMessage("XXXX",75);
  CreditsMessage("XXXX",80);
  Wait(20);
  CreditsMessage("XXXX",85);
  CreditsMessage("XXXX",90);
  Wait(20);
  CreditsMessage("XXXX",95);
  CreditsMessage("XXXX",100);
  CreditsMessage("XXXX",105);
  CreditsMessage("XXXX",110);
  CreditsMessage("XXXX",115);
  Wait(120);
  RestartGame();


Thanks (again!)
Mark
#36
I only need to use this check once in the whole script and it is almost certain that it will also only run once in any given game session, so Calin's little bit of code is perfect.

Also, areSame may be pointless, granted. But it makes the code easily understandable, should I take a break from development and forget what I was doing...

@monkey_05_06:

Yeah, I tried writing a function for it and got a couple of compiler errors. Reading your post, I now know this is because I needed a dynamic array. Very useful, so thanks :)
#37
Yay, thanks Mr. Leafshade!

And sorry about the pen and paper comment - caught me on a bad day! ;)
#38
Is there a way of checking if all array elements are the same?

i.e. ask the condition "Is every element in the String array questions the same value?" but in code.

I had no idea where to ask this question, as it's basic programming more than scripting, so apologies if I've broken the rules.

Cheers,
Mark
#39
Hi everyone,

I am looking for five testers for my short project. Just a couple of requirements:

1) You must be interested in, and have some basic knowledge of, UK politics and
2) be able to provide feedback within a couple of days.

The game is a non-adventure, play-once-through kind of affair and testing it a couple of times should take no time at all.

More info if you're interested - I'm wanting to keep it fairly hush-hush for now ;)

PM me,

Regards,
Mark
#40
Just read through a couple of months worth of the dev blog - I've been out of the AGS loop for while - and I have to say this is coming along BRILLIANTLY. I love the 3D animation work you've done.
SMF spam blocked by CleanTalk