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 - deadsuperhero

#1
This project started off as many do: someone in a chatroom asking a question about how to do something. Someone asked about how to make text scroll in AGS for a parser game, and something about the question got me thinking about how I might do it.



Four days later, I've managed to hack together a working prototype of the module, dusted it off, and named it Promptly.
Promptly can do a couple of unique things, and it's all based on hacks on top of hacks. This text parser can:

  • Print out and parse dialog options, and then run them.
  • Check inventory items, and interact with them.
  • Provides context fallbacks, so that you don't get gummed up switching from, say, working with items, to talking to people.
  • Lets you show and hide images for things like dialogue and inspecting items
  • Provides scrollback, but lets you take it away in moments that the player needs to focus on just one thing.

There are still a few things I'd like to do with this, such as theme customization / palette swap support for 8-bit projects. Some of the code is a bit messy and requires clean-up, but I'm really happy with what I've managed to accomplish so far. Big shout out to CrimsonWizard for helping me figure out how to split up strings from the parser!

> SOURCE CODE
> DOCUMENTATION
#2
With everything going on with Twitter these days, there's been an increased interest in alternative spaces for people to congregate. One of these spaces is Mastodon, which in some aspects is very similar to Twitter due to being designed around microblogging. One fundamental difference, though, is that the network is not just on one website, but many sites that can all talk to each other.

Over the past few months, Mastodon has increased by roughly 2.5 million people, across a staggering 9,000+ servers (called "instances"). With all that being said, Mastodon is part of an even bigger network, though: the fediverse. It's kind of like a modern incarnation of Usenet, but with the conveniences of web interfaces and mobile apps. There are replacements for many different kinds of services: YouTube, Instagram, GoodReads, Reddit, MeetUp, GrooveShark, and Apple Podcasts. WordPress blogs and Drupal sites can integrate with it, and Tumblr and Flickr are mulling over native integrations to the network, too. All of these things are capable of talking to each other through a common protocol: a Mastodon user can follow someone from Pixelfed and see their photos in the stream, or do the same with a PeerTube user and see their videos. The Mastodon user's replies show up as native comments at the post's point of origin.

Anyway, with that explainer out of the way, I wanted to ask: are you on the network somewhere? I've noticed a handful of notable current and former AGS'ers on there so far, many of whom are on GameDev Place. Here are a couple of cool people I've found from the community:


Along with a couple of famous gamedevs:

Those are all of the ones I've managed to find so far. There are tons of indie game devs outside of the AGS Community, and in fact, lots of people from all walks of life on the network. Anyway, if you're interested in joining, or already on here, feel free to drop your link in th replies, and I'll update the list!
#3
Edit: This has been solved. Check out the solution!

I'm in the process of building out an adventure RPG in Adventure Game Studio, and over the past few months I've been making some pretty good progress.
Recently, though, I've wanted to implement a quest system, as a sort of visual way to assign things to the player and give them the opportunity to track things they have left to do.

In the process of building this, I've come across a few constaints, and haven't totally worked out the bugs yet. I'd like to touch upon what I've gotten working so far, along with a few ideas I've had.

Creating a Quest
Currently, Quest creation is little more than adding a new String to a ListBox. It looks like this:

Code: ags

function createQuest(const string questTitle,  const string questDesc) {
  questList.AddItem(questTitle);
  qDesc.Text = questDesc;
}


What we end up with looks like this:

https://i.imgur.com/YwdvbGu.png

The Description Problem
Anyone with experience in AGS will immediately realize there's a bit of a problem with doing things this way: the description is not actually being stored! The UI label just gets updated every single time a new quest gets assigned.

I've looked through the forums a couple of times to determine how exactly I'm supposed to update the label upon selecting a particular ListBox element. Thankfully, SelectedIndex is a thing, so we can at the very least update the label based on what the description is, like so...

Code: ags

function questList_OnSelectionChanged(GUIControl *control)
{
  if (questList.Items[questList.SelectedIndex] == "Sample Quest") {
    qDesc.Text = "The interface should update when selecting this";
  }
  
   if (questList.Items[questList.SelectedIndex] == "Get Ready for Work") {
     qDesc.Text = "You need to get ready to go to the office. Don't be late!";
  }

  else {
    qDesc.Text = "No description. Please select a quest.";
  }
}


Unfortunately, this is kind of unwieldy, and goes against the principle of DRY (Don't Repeat Yourself) in programming. It might not be a problem if I only have a dozen or so quests, but it doesn't exactly scale up if I want a game with 60+ quests or something. It also kind of goes against the initial function pattern I was hoping to follow.

Another headache that I've noticed is that SelectedIndex appears to only work on matching results against an exact title. One thing I'd love to figure out is whether or not it's possible to use some other kind of value, like an ID or something. My thought is that, if I could somehow store the description somewhere, and associate that with the title, I might be able to update certain elements through that association.

A Possible Solution - Structs!
So, I've been banging my head against the wall, trying to figure out how to store Quests as a type of Script Object that can be referenced in the UI. I came across the AGS Documentation on Structs, and it almost seems perfect...

So, in the global script header, I defined my Quest struct like so:

Code: ags

struct Quest {
  String title;
  String desc;
  int ID;
  bool complete;
  import function Create(int questID, const string questTitle, const string questDesc);
};


I also have this function in the Global Script:

Code: ags

function Quest::Create(int questID, const string questTitle, const string questDesc) {
  this.title = questTitle;
  this.desc = questDesc;
  this.ID = questID;
  this.complete = false;
  questList.AddItem(this.title);
}


The editor compiles with no problems, and this seems to be a semantically better way to generate quests. Now, whenever I try to create a new quest, I define an ID, the title, and the description, and it should get added to the Quest UI.

Let's try this with a Sample Quest...

Code: ags

  // Generate fake quest
 Quest.Create(1,  "Sample Quest", "The interface should update when selecting this");


This is unfortunately where I hit my first serious snag with Structs. Upon attempting to compile, the editor gives me an error:

Code: ags

GlobalScript.asc(198): Error (line 198): must have an instance of the struct to access a non-static member


At this point, I'm not really sure about what I need to do to move forward. This is the first time I've tried to work with Structs, and it's not 100% clear how I'm supposed to make them accessible to global or local scripts. Unfortunately, many of the examples I've seen of Structs being used are fairly abstract, or fit use-cases that are put together quite differently.

Goals and Questions
Ideally, what I'd like to do is successfully generate a Quest struct, and update the Quest UI so that the ListBox gets populated and the Label gets changed in a more efficient way.
Here are my questions on "How do I...?"


  • What am I doing wrong in creating the struct from the function?
  • Can SelectedIndex use something other than the Quest Title for setting the label? Such as an ID?
  • If I have to use the Quest Title for SelectedIndex, how might I be able to parse out other values of an existing Quest struct and update the UI accordingly?
  • Given that ListBox has a relatively limited API, is there a way to include sprites inside of the ListBox to represent completion state?
#4
----------------------------------------------------

MODERATOR NOTE (12/10/2016):

Hello!

This thread is an archive of offers made prior to 2016, which will continue to exist for legacy's sake. Some of the later offers may still stand, but many of the earlier ones probably don't.

For current offers, please see the Offer Your Services! 2016/2017 thread.

Thank you. :)


----------------------------------------------------



It seems you've cleaned out the old entries, so here's mine. :)

Web Designer

I specialize in Drupal sites, and can give you a totally integrated forum, series of galleries, community blog posts, you name it. I can build websites to custom-fit a use case. I'm looking at expanding my portfolio, so the first couple of people that contact me here will get my services and consultations for absolutely free. You don't even have to bribe me with one of your games.  ;)

"Well now," you say casually, "what all can you make with a Drupal site?"

You can have:

-A news site
-A site with reviews of things
-Galleries
-Built-in forums (comes with private messaging, possibly even group functionality if needed)
-An events site.
-A podcasting site
-Something to showcase your game team or company
-A portfolio
-Some kind of user-generated-content thing, like "Texts from Last Night"
-A video portal featuring videos you've done.

Check out my website here.

Please note that I do have to feed myself at some point, so I can only keep this going for so long.

So wait, what do you do?
I build and design websites.

What does that entail?
Graphic design, coding, and CSS work. I can also put some jQuery and HTML5 magic into your site. ;)

Can you do Wordpress?
I really don't like Wordpress very much, but I am competent enough to put sites together in it. However, I'll always argue to use Drupal over it, for a multitude of reasons.

If that promotional thing is over, how much do you charge?
The initial consultation is always, always free. Just private message me, and we'll set up a Skype chat or something to further discuss it. I can't realistically give a price without evaluating the scale of a project. So let's talk about it!
SMF spam blocked by CleanTalk