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

#1
Since you can only read/write to these directories, $INSTALLDIR$, $SAVEGAMEDIR$ and $APPDATADIR$ (not even sure about INSTALLDIR) I chose to store my files in $SAVEGAMEDIR while they are still in development and I would have shipped the level in $INSTALLDIR.

The level files are custom binary files, created by the editor.
TENG::load_map and TENG::save_map can be found here:
https://github.com/dkrey/ags_krokus/blob/main/TENG.asc

They consist mostly of simple looped file writes like this:

Code: ags
  //Save BG Tiles
  j=0; 
  index = 0;
  file.WriteInt(bg_tile_cnt);
  while ( j < num_tiles_y ) {
    i = 0;
    while ( i < num_tiles_x ) {
      if (tile[index].tileno[0]>0) {
        file.WriteInt(index);
        file.WriteInt(tile[index].mirrored_x[0]);
        file.WriteInt(tile[index].mirrored_y[0]);
        file.WriteInt(tile[index].tileno[0]);
      }
      index ++;
      i++;
    } 
    j++;
  }  
#2
Don't worry, I also need to re-understand the code every time I work on it. I wrote it more than a decade ago, back when AGS didn't support dynamic arrays.

AGS is actually able to import PCX files, at least at runtime ;)
https://adventuregamestudio.github.io/ags-manual/DynamicSprite.html#dynamicspritecreatefromfile


The way I implemented the tile engine (and I had lots of inspirations from DKH) is that I ignore most room functions and just draw on its surface.

In an external tile editor you need to create a tile map and export the tiles in a long row of tiles / tile strip.
Everything else can be done in the ingame editor, map size, walkable tiles, harmful tiles and so on.

For tile animations a view can be assigned for each level and a loop can then be assigned to a tile.

The work flow can be this:
* Import a tileset
* If you want moving platforms, also import platform sprites

* Run the game
* Enter the editor room
* Create a new level
* set the map dimensions, sprite slots and view
* click through the tiles and mark them as either as solid, ramp, hostile and so on
* Draw the level, place enemies, set items, waypoints and so on.
* Save the level
* Close the game
* Create a room and tell it to load the level, you just created
* Let the player character start in the room and see if it works.
* From there on you can edit the level in game by going the editors room and switching back the level's rooms.
#3
Nice work indeed, this also caught my attention and it looks pretty good  (nod)

Btw. dkh also did a tile based game in 2007 with an ASCII art text file serving as a tile map.
https://www.adventuregamestudio.co.uk/play/game/933/

oh, and here's a screenshot of my tile editor (based on DKH's work).


Unfortunately I never managed to finish it, the last showstopper was implementing at somewhat acceptable pathfinding. But if it's on github, in case you're curious:
https://github.com/dkrey/ags_krokus
#4
The Rumpus Room / Re: Name the Game
Tue 08/04/2025 07:50:55
Indeed, Atari 8bitters can do much better than this quite cheap conversion.

Anyway - you got it. It is the Dark Crystal, a very early Sierra Online game. There's even a browser version over here: https://www.darkcrystal.com/galleries/dark-crystal-galleries/play/

#5
The Rumpus Room / Re: Name the Game
Mon 07/04/2025 10:23:27
Oh how I wish Sheep Quest would be on Apple II  :-D

The game in question was also released on Atari's 8-Bitters
#6
The Rumpus Room / Re: Name the Game
Mon 31/03/2025 10:58:05
Yay, here's the next one.

#7
The Rumpus Room / Re: Name the Game
Sat 29/03/2025 16:04:57
Questron 2 ?
#8
The Rumpus Room / Re: Name the Game
Thu 13/03/2025 07:52:11
That's it, Volcan is next.
#9
The Rumpus Room / Re: Name the Game
Mon 03/03/2025 07:04:51
Nope, this guy is a few years younger.

Here's the next hint:

#10
The Rumpus Room / Re: Name the Game
Tue 25/02/2025 13:58:26
Hell freezes over  :=

Here's the next one:

#11
The Rumpus Room / Re: Name the Game
Mon 24/02/2025 10:41:57
I've finally found it:
Phasmophobia: Hall of Spectres

It's also on PC:
https://indgaming.itch.io/phasmophobia
#12
Hi,
the module is briefly explained in the header file. Even though I would not recommend this module for a first game, it's of course possible.
This is the interesting part from the header file
Code: ags
Syntax of dialog options in icon mode:
  ([d/i][icon],[highlighted icon])Text
 
  Example: 
(d12,13)Want a cup of tea?
 
  This means, the topic uses sprite slot 12 as a normal icon,
  slot 13 for the highlighted icon and it's a dialog item.

  Example: 
(i14,15)Jelly Beans

  This adds an "inventory-topic" which is sorted after the dialog topics.
It's also used in the dialog topic dDialog2 and setup in the room1.asc room script.

Code: ags
    lblGuiType.Text = "GUI: Horizont.Icons";
    
    // look at dDialog1 to see, how icons work
    // this var is just a global var and is not needed
    // when you're using your own gui
    dialog_id = 1; 
    
    CDG.gui_type = eIconMode;
    CDG.gui_xpos = 50;
    CDG.gui_ypos = 20;
    CDG.reset_scrollstate = true;
    
    CDG.gui_stays_centered_x = true;
    CDG.gui_stays_centered_y = true;
    
    CDG.icon_align_horizontal   = true;
    CDG.icon_horizontal_center  = true;
    CDG.icon_inv_linefeed       = 6;
    CDG.icon_sort_inv           = true;
    
    CDG.setAutosizeCorners(51, 52, 53, 54);
    CDG.setAutosizeBorders(55, 56, 57, 58);
    CDG.border_left             = 10;
    CDG.border_right            = 10;
    CDG.border_top              = 7;
    CDG.border_bottom           = 16;
    CDG.seperator_visible       = false;
    CDG.border_visible          = false;
    
    CDG.bg_color                = COLOR_TRANSPARENT;
    CDG.bg_img                  = 0;
    CDG.bg_img_scaling          = 1;
    CDG.bg_img_transparency     = 0;  
    
    CDG.autosize_height       = true; 
    CDG.autosize_width        = true;
    CDG.autosize_minheight    = 20; 
    CDG.autosize_maxheight    = 150; 
    CDG.autosize_minwidth     = 60;
    CDG.autosize_maxwidth     = 200;       
    CDG.auto_arrow_align      = 3;
#13
I've just noticed that it's not so trivial to pause a game while being in a dialog :)
Anyway a quick and dirty solution would be to wrap everything inside the function  dialog_options_render in a "isGamePaused" check.

Code: ags
function dialog_options_render(DialogOptionsRenderingInfo *info)
{
  if (!IsGamePaused()) {
    int i = 1, j = 1, k = 1, ypos = CDG.border_top, ypos_offset, xpos = CDG.border_left, xpos_offset, current_height = 0, 
        option_count=0, current_option, temp_height = 0, current_icon, blank_icons, linefeed_leftout_icons, temp_text_height;
    // and so on

Also you might want give function dialog_options_repexec the same treatment.

At least in the demo game it prevents the gui from showing up and processing things.

#14
I still have a Thinkpad 11e with an i3 processor. It's very durable and serviceable (RAM + Storage can be changed), just the screen is a cheap TN panel and not very great.
Also the older HP Elitebooks are quite nice, it just depends on your budget and preferred OS. You could get a cheap Elitebook 840 G4 12", which runs Win10 and Linux but no Win11. (more money = newer generation).
#15
Removing some verbs is actually way easier than adding more ;)
First you need to set this constant to your new verb count + 1 (5 in your case)
Code: ags
#define ACT_COUNT 5  // Action Button Count (gMain)

Then you need to get rid of all unwanted verbs in these functions:

Code: ags
static void Verbs::CheckDefaultAction() 
static void Verbs::MapButtons() 
static void Verbs::Localize() 
Unfortunately you need to do it for all languages in Localize()

The last thing you need to do is removing the buttons. But since you need button IDs from 0 to 4, you have to remove the buttons from the gui, not the verbs you don't want.

So your edited GUI should like this (presented in glorious ascii art)
Code: ags
┌───────────────────────────────────────────────────────────────────────────────┐
│ ┌──────┐    ┌────────┐                                                        │
│ │Open  │    │Pick up │               ▲ ┌─────────┐ ┌──────────┐ ┌──────────┐  │
│ └──────┘    └────────┘               │ │         │ │          │ │          │  │
│ ┌──────┐                             │ │         │ │          │ │          │  │
│ │Close │                               └─────────┘ └──────────┘ └──────────┘  │
│ └──────┘                             │ ┌─────────┐ ┌──────────┐  ┌─────────┐  │
│ ┌──────┐                             │ │         │ │          │  │         │  │
│ │Give  │                             ▼ └─────────┘ └──────────┘  └─────────┘  │
│ └──────┘                                                                      │
└───────────────────────────────────────────────────────────────────────────────┘

The GUI script will take care of remapping the buttons with the correct verbs.

That should be it.

@Discussion about code complexity:
I know, there's a lot going on in this template and I already tried to keep it simple.

The goal was to provide the same functionality as Thimbleweed Park and there's not much out of the box to work with (Save / Load, Custom Dialog Rendering, double click handling). Of course there modules available providing these features, but at least this way the included modules are all compatible with the template.
#16
Just wanted to show my appreciation for this project, as I failed twice to create something similar.  :-D Also the last module offering something similar was Hypertext by SSH and that one is from the Stone Age of AGS.

Awesome work, @eri0o !
#17
I'm afraid Christina and I already booked our whole vacation time. We'll be in Finland for 6 weeks. But in the rare case that Mittens would happens in Finland during August ...  (roll)
#18
My bad, I forgot that this settings was introduced - sorry.
Great to know that you managed to solve this  (nod)
#19
Hmm.. I'm having trouble replicating the issue with the current version of the template. But in the revision history I see that a bug has been fixed two years ago.

I'm pretty sure that the code is backwards compatible. In case you didn't change the module, could you please try to update it with these most recent files?
https://raw.githubusercontent.com/dkrey/ags_tumbleweed/master/CustomDialogGui.asc
https://raw.githubusercontent.com/dkrey/ags_tumbleweed/master/CustomDialogGui.ash

(and of course make a backup of the old files)
#20
Hi,
before I start digging deeper into this issue: Is this option present in your version of the template and set to true?

TemplateSettings.asc
Code: ags
  // Always begins the dialog with the first option available
  CustomDialogGui.DialogGuiOptions[eDialogGui_reset_scrollstate] = true;
SMF spam blocked by CleanTalk