Make game like Diner Dash?

Started by Arcangel, Sun 06/05/2012 15:50:43

Previous topic - Next topic

Arcangel

First I love the new design of te web. Very clean and profesional. Long time I dont pass here, working now with Unity 3D.

Any game similar o clone to Diner Dash, any help in the logic, of the game.

Thx for any help.


PD. Whats the name of the game in the home page over the Download button?
Or link?

selmiak

on the left is Annie Android and the other 2 screens are from an unreleased game afaik.

Arcangel

Thx selmiak... Any know how to script something similar to Diner Dash or any Dash.

Ghost

Not impossible but, frankly, also not something a beginner/medium-level AGS user will manage in short time. The DD games are pretty wicked in terms of action queues and timing, but AGS can defenitely handle such games; it's mostly about your skills and patience. How familiar are you with AGS or programming in general, and where exactly do you need help?

Khris

Yeah, asking "how to script X" where X is a semi-complex game concept is pretty much useless.
Are we supposed to produce a twenty page tutorial...? Probably not. So, what other option for us is there besides pointing out that you need to learn how to program?

I've looked at Diner Dash and it's not that hard. Basically, the tables change their state based on the passage of time, and depending on that and what the waiter carries or doesn't, they can interact with the table and a few other spots and change their state.

As soon as you're getting more specific problems, feel free to post in the Begginer's Tech forum.

Arcangel

Umm, well Im using AGS since version 2.55 last version I use was 2.72 never use 3.x

I have 2 concept that not clear to me.

1. Chain task ( Seat people, take order, send to chef, back to table, clean table). 

     (X)   Table 1         (X) Table 2   

      (X)   Table 3         (X) Table 4   

How chain that the character go to table 1 and table 2. Only 2 orders max at the same time. Click on table 1 and table 3. the character remember go first to table 1, then table 3. and do Steps in Pass 1. (Chain task)

2. How make the people I seat rotate to make chain color seat for bonus.

Flag the chairs?

That are the only 2 Functions that not found logic to program or escape to me right now.

Maybe... Structures, Pointers. not sure.


Khris

Mods: this should probably go in Advanced Tech

Ok, that's something we can work with :)

To chain commands, use a data structure that's like a spreadsheet. Every click adds a row to the bottom of the table, and AGS processes the table from the top down.
You could do this using only arrays, but structs are better suited for this.
To implement a struct, follow this schematic:

Code: ags
// header

struct MyStruct {
  int property1;
  String property2;
  import function DoSomething(int param1);
};

import MyStruct table_rows[50];

// main script

MyStruct table_rows[50];
export table_rows;

function name::DoSomething(int param1) {
  this.property1 = param1;
}


Now you can do this:
Code: ags
  Display("The first table's String property is: ", table_rows[0].property2);
  // set the third table's int property
  table_rows[2].property1 = 10;
  // or, using the function:
  table_rows[2].DoSomething(10);


To make the people rotate, assuming you're using Drag'n'Drop:
Code: ags
// inside repeatedly_execute

  if (mouse.IsButtonDown(eMouseLeft) && group_dragged_by_player > 0) {
    if (customers_who_are_waiting[group_dragged_by_player].group_size == 2) {
      // at this point, we know the player currently drags a group of two people
      if (IsTimerExpired(1)) {
        int dir = eForwards;
        if (customers_who_are_waiting[group_dragged_by_player].left_is_blue) dir = eBackwards;
        cDraggedGroup.Animate(3, 2, eOnce, eNoBlock, dir);
        // switch group's people order
        customers_who_are_waiting[group_dragged_by_player].left_is_blue = !customers_who_are_waiting[group_dragged_by_player].left_is_blue;
        SetTimer(1, 60);  // rotate every 1.5 seconds
      }
    }
  }


Of course, this code won't work as-is, it's just meant to give you an idea how to tackle stuff like that.

SMF spam blocked by CleanTalk