Author Topic: Athanor 2 - an adventure game  (Read 2652 times)

Offline Astrofra

  • Newbie
  • *
  • Posts: 9
  • Karma: +1/-0
Athanor 2 - an adventure game
« on: July 08, 2019, 08:33:50 PM »
Athanor 2
The Legend of the Birdmen

An Adventure game for the the 16/32 bits machines (Atari ST/Amiga) by SafarGames.fr
Game created by Eric Safar, including the story & ST version.
Original graphics designed by Angel Bautista.
Graphics colorization and Amiga adaptation by your truly.
Additionnal graphics colorization by Vincent Jambut.


In this thread, exclusive to AmigaLife, I will try to post updates, as much as possible, about my progress of the Amiga adaptation of Athanor 2.
This project started super slowly around 2015. It is mostly based on the original Amstrad CPC version, using the same original drawings, except that everything was re-colored from the ground up.
The game itself is programmed in C, targeting the OCS Amigas, including the good old unexpanded A500.
 
Stay tuned!  8)

Offline Astrofra

  • Newbie
  • *
  • Posts: 9
  • Karma: +1/-0
Re: Athanor 2 - an adventure game
« Reply #1 on: July 08, 2019, 08:39:17 PM »
Let's start with a video capture of the current WIP version :



As said above, the game is programmed in C.

The video shows the game running directly on the scenario data of the ATARI ST version. All the data are massaged in Python and reinjected in the C project.

The graphics (GUI & sceneries) are in 32 colors specifically converted to the Amiga OCS. The sprites are (temporarilly) untouched bitmaps of the ATARI ST version.

This video shows the first basic routine to handle the game inventory. The player can grab objects, they are added to the inventory. If an object is in the inventory it is considered to be in the hand of the player, thus simplifying greatly the game's puzzles. This is temporary as well.

Some of the texts are not the correct one, for some reasons yet to be investigated ^^;

I hope you will like it :)
« Last Edit: July 08, 2019, 08:41:18 PM by Astrofra »

Offline kriz

  • Newbie
  • *
  • Posts: 16
  • Karma: +0/-0
Re: Athanor 2 - an adventure game
« Reply #2 on: July 09, 2019, 09:47:55 AM »
Cool concept, following this project :) Keep on the good work ..

Offline Astrofra

  • Newbie
  • *
  • Posts: 9
  • Karma: +1/-0
Re: Athanor 2 - an adventure game
« Reply #3 on: July 14, 2019, 09:42:43 PM »
Cool concept, following this project :) Keep on the good work ..

thanks! :)

Tonight, I worked on the mouse pointer, to have it reflecting dynamically the current action:

LOOK



TAKE/DROP



USE



TALK


The PNG -> Hardware sprite conversion was done with Png2Image, a set of Python scripts originaly created by Wei-ju Wu

Offline Astrofra

  • Newbie
  • *
  • Posts: 9
  • Karma: +1/-0
Re: Athanor 2 - an adventure game
« Reply #4 on: February 16, 2020, 11:18:21 AM »
While working on the game, I occasionnaly test it on various configurations, including the bare bone A500 without any RAM expansion.
That means that the game should run with only 512Kb of CHIP RAM.

This shouldn't be an issue for this genre of classic adventure game, but remember that everything is done using the AmigaOS calls, and even on an A500 the game is supposed to be OS-Friendly.

I tried to reclaim memory occupied by the CLI/SHELL screen + window opened by AmigaOS1.3 when booting the game (the game starts using a regular startup sequence) but it turns out the game itself cannot invoke CloseWorkBench() or even EndCli(). 1st option will fail silently, 2nd option will shutdown the game (as it seems to be a child taks of the CLI that we are trying to end).

Anyways... I used a fallback strategy : add21k, aka add44k, aka add36k.
All of these tools use the same trick : remove one of the bitplanes from the CLI/Workbench screen to free as much memory as possible.

I found one of these on Aminet, and it includes the source code :
https://aminet.net/package.php?package=util/misc/add36k.lzh

So I decided to borrow the routine and add it to the R-Page engine.
The result looks like this :

Code: [Select]
/// Add36k does nearly the same as 'subbp' or 'add21k', exept that it does not
/// only free 21kb of memory (one std. workbench plane), but in fact 36kb of
/// memory (that is one plane and 250 lines of the others).
/// Original code by Alexander Rawass
VOID add36k(struct IntuitionBase *ibase)
{
long pl0,pl1,plb,ple;
struct Screen *scr;
struct BitMap *bm;
struct Window *win;
ULONG origheight;

if (ibase != NULL)
{
scr = ibase->ActiveScreen;
win = ibase->ActiveWindow;

origheight=scr->Height;
SizeWindow(win,0,-150);

Delay(1*50);

scr->Height=50;
scr->Depth=1;
bm=&scr->BitMap;
bm->Rows=50;
bm->Depth=1;
pl0=bm->Planes[0];
pl1=bm->Planes[1];
bm->Planes[1]=NULL;
plb=pl0+(640*50/8);
ple=pl1+(640*origheight/8);

RemakeDisplay();
FreeMem(plb,ple-plb);
}
}

Once added to the project, it allows the game to allocate more memory to its internal cache. That means the player will have to wait less time when going from a place to another, as the screens/places he visited will remain longer in memory, thus reducing the disk access.

In the end, I might spare this extra memory for something else. Stay tuned!

Without add36k, the screen cache is 90Kb large :
 


When calling add36k, the screen cache is 135Kb large :
 


Offline Astrofra

  • Newbie
  • *
  • Posts: 9
  • Karma: +1/-0
Re: Athanor 2 - an adventure game
« Reply #5 on: February 19, 2020, 10:16:49 PM »
Lately, I replaced the system-friendly "flash/bell" call (DisplayBeep()) by a simple visual FX, inspired by MacOS X :



I could (should ?) have used an interruption to handle this, but instead this is just a simple piece of code I'm calling from within the main update loop of the game :

Code: [Select]
void __inline gui_update_fx(void)
{
    // Shake
    if (fx_shake >= 0)
    {
        int x_screen, easing;
        x_screen = (sintab32[(fx_shake << 7) & 0x3FF] * fx_shake) >> 14;
        rpage_video_scroll(x_screen, 0);
        fx_shake--;
        if (fx_shake == 0)
            rpage_input_enable(TRUE);
    }

}

The core of the FX is the famous hardware scroll of the Amiga, controlled by the graphics.library (yaye) :

Code: [Select]
void __inline rpage_video_scroll(short x, short y)
{
    if ((scr_x_offset != x) || (scr_y_offset != y))
    {
        main_screen->screen->ViewPort.DxOffset = x;
        main_screen->screen->ViewPort.DyOffset = y;
        ScrollVPort(&(main_screen->screen->ViewPort));
    }

    scr_x_offset = x;
    scr_y_offset = y;
}