Show Posts

You can view here all posts made by this member. Note that you can only see posts made in areas to which you currently have access.


Topics - abstauber

Pages: [1] 2 3 ... 5
1
Advanced Technical Forum / Static extenders confusion
« on: 01 Aug 2018, 12:18 »
After learning about attributes, I am currently implementing them to my modules. Now I have also learned that static extenders are possible since 3.4.

I have a static struct like this, along with its extenders:
Code: Adventure Game Studio
  1. struct CustomDialogGui {
  2.   import static void init();
  3.   import static attribute int DialogGuiOptions[];
  4. };
  5. import void prepare(static CustomDialogGui, DialogOptionsRenderingInfo *info);
  6. import void addOption(static CustomDialogGui, int position, int optionNumber, String optionText);
  7. import void getOptionDetails(static CustomDialogGui, DialogOptionsRenderingInfo *info);
  8. import void getRowCount(static CustomDialogGui, int width);
  9.  

An extender function head looks like this in the .asc file, as it was explained here http://www.adventuregamestudio.co.uk/manual/ags38.htm
Code: Adventure Game Studio
  1. void prepare(static CustomDialogGui, DialogOptionsRenderingInfo *info)
  2.  
Now here's the thing I don't understand.

The attribute extender has to be like declared like a non-static extender. And it even works (wtf)
Code: Adventure Game Studio
  1. bool seti_DialogGuiOptions(this CustomDialogGui*, eDialogGuiOptions index,  int value)
  2.  

So yes, it all works but I don't get why attribute extenders have to be non-static on static structs.

2
Over at the Scumm help thread, Daniel discovered some rather odd limites regarding descriptions.

It seems like inventory item descriptions can be 24 characters long, even though the editor allows more.
Hotspot descriptions can be almost infinite (tested 35 chars).
Object descriptions can only be 29 chars long and the editor also blocks any longer attempts.

Is there a technical reason for this or could these limites be removed in a future engine release?

3
This is the long overdue overhaul of the classic 9 Verbs template:
Tumbleweed Verbs!

Here are a few highlights:

Thimbleweed(tm) mode


A new save&load system


...while offering the classic SCUMM experience


And it still speaks your local language... sort of ;)


A more complete feature list:
  • cancelable interactions, no need to wait until the character reaches the object/hotspot etc
  • doubleclick to exit locations
  • all new template graphics
  • contains a scrollable dialog gui
  • running with a double click
  • contains a nice door script in case you have lots of those
  • customizable: invent your own verbs, remove a few or add even more
  • helps with unhandled events
  • player follows the cursor while running (if the mouse button is pressed)
  • complete code cleanup: all functions are in structs
  • all settings can be reached and modified anytime
  • all settings are conveniently grouped in a separate script file
  • translations available for Spanish, German, French, Portuguese, Italian and Dutch
  • includes two demo rooms to get you started
  • it comes with a manual :)


Code
https://github.com/dkrey/ags_tumbleweed

Download
(all files compiled with AGS 3.4.1 Patch3)

Here is the template:
http://shatten.sonores.de/wp-content/uploads/2018/08/Tumbleweed_1.1.zip

The documentation is included with the template and also available as a .chm file here:
http://shatten.sonores.de/wp-content/uploads/2017/05/tumbeweed_doc.zip

4
General Discussion / Embla, what's wrong?
« on: 19 Apr 2017, 07:14 »
Why on earth are you participating here with great help and encouragement while on the other hand you delete your posts/accounts on a weekly base. ???

I might have discussed this in private but since the account is gone for good (again): here it is.



5
I just stumbled upon this:
The basic MP3 decoding and encoding technology is patent-free in the European Union, all patents having expired there by 2012 at the latest. In the United States, the technology will be substantially patent-free on 31 December 2017 [....] If the longest-running patent mentioned in the aforementioned references is taken as a measure, then the MP3 technology will be patent-free in the United States on 30 December 2017 when U.S. Patent 5,703,999, held by the Fraunhofer-Gesellschaft[73] and administered by Technicolor,[74] expires.

Source: https://en.wikipedia.org/wiki/MP3#Licensing_and_patent_issues


So after this, I assume we can safely scrap the mp3 free branch.

6
Have you ever been tired of drawing all your GUI buttons in a paint program? Is it even more boring to create versions for highlighted and clicked buttons in all the different languages? If your answer is 'yes', continue reading :)

Abstract:
This module generates rectangular buttons, which you can assign to anything: GUI buttons, objects, inventory or dynamic sprites - you name it.

Dependencies:
AGS 3.x
Alpha support in AGS has been fixed recently, so you might want to use AGS 3.3 if you need proper alpha channel support.

Download:
http://shatten.sonores.de/wp-content/uploads/2016/04/BtnHelper_1.1.1.zip

Demo:

Now with rounded buttons

Usage:
To turn this

into this:


all you need is this bit of code:
Code: Adventure Game Studio
  1.   import cBtns Btns[MAX_BTNS];
  2.   // Button1: normal. Define the basic values
  3.   int btn1 = BtnHelper.createFromGuiButton(ActionButton1, true);
  4.   Btns[btn1].setColors(2, 48599, 16937);
  5.   Btns[btn1].setBorder(3);
  6.   Btns[btn1].setBevel(3);
  7.   Btns[btn1].setBackgroundImg(3, 0, false);
  8.   Btns[btn1].setBackgroundGradient(28030, 19445, eBtnBlend_easeIn, 50, 70);  
  9.   Btns[btn1].setForegroundImg(1, 0, eBtnAlignVertical_center, eBtnAlignHorizontal_right);
  10.   Btns[btn1].setText("Ags",59228, eFontFont3);
  11.   Btns[btn1].setTextShadow(16937);
  12.   Btns[btn1].render();
  13.  
  14.   // Button2: highlight. Set an outline and change font color
  15.   int btn2 = BtnHelper.createFromGuiButton(ActionButton2, true);
  16.   Btns[btn2].copyAttributes(btn1);
  17.   Btns[btn2].setOutline(59228);
  18.   Btns[btn2].setText("Ags",65490, eFontFont3);
  19.   Btns[btn2].render();
  20.  
  21.   // Button3: clicked. Inverse bevel and adjust border
  22.   int btn3 = BtnHelper.createFromGuiButton(ActionButton2, true);
  23.   Btns[btn3].copyAttributes(btn2);
  24.   Btns[btn3].setBorder(4);
  25.   Btns[btn3].setColors(2,16937, 48599);
  26.   Btns[btn3].render();
  27.  
  28.   // Assign the graphics to the GUI buttons
  29.   ActionButton1.NormalGraphic = Btns[btn1].getGraphic();
  30.   ActionButton2.NormalGraphic = Btns[btn2].getGraphic();  
  31.   ActionButton3.NormalGraphic = Btns[btn3].getGraphic();  
  32.  



Documentation:
First you need to import the button struct called Btns in your script
Code: Adventure Game Studio
  1. import cBtns Btns[MAX_BTNS];

Now here's a simple rounded blue Button with white text.
Code: Adventure Game Studio
  1.   //The Gui Button we want to use is called Button1
  2.   int btn = BtnHelper.createFromGuiButton(ActionButton, true);
  3.   // Set some attributes
  4.   Btns[btn].setRoundness(10);
  5.   Btns[btn].setColors(1);
  6.   Btns[btn].setText("Hello",15, eFontFont3);
  7.   // Create the image
  8.   Btns[btn].render();
  9.  
  10.   // After the image has been rendered, we need to assign the new graphic to the button.
  11.   Button1.NormalGraphic = Btns[btn].getGraphic();    
  12.  


To create a button, you need to call BtnHelper struct - think of it as a factory which creates button dummies :) After that, you call the button struct directly with the generated id.
Code: Adventure Game Studio
  1. // First we call the helper
  2. int id = BtnHelper.create(30,20);
  3. // Now use the struct
  4. Btns[id].setColors(15);
  5. Btns[id].render();
  6.  
This results in a white 30x20px rectangle. But you can't see it yet. First you need to assign it to some AGS element, e.g. a GUI button.
Code: Adventure Game Studio
  1.  
  2. Button1.NormalGraphic = Btns[id].getGraphic();    
  3.  
There you go. The button will now show as a white rectangle.

These are all public helper functions.
Code: Adventure Game Studio
  1.   // creates a button from scratch and returns the id to address it in the button struct
  2.   int id  = BtnHelper.create(int width,  int height,  bool preserveAlpha );
  3.   // same as above, but takes the sizes and (optional) image from the GUI Button.
  4.   int id2 = BtnHelper.createFromGuiButton(Button *guiButton, bool preserveAlpha );
  5.  
  6.   // Deletes a button. Make sure it's image isn't in use anymore
  7.   BtnHelper.reset(id);  
  8.  
  9.   // Deletes all buttons. Make sure the images aren't in use anymore
  10.   BtnHelper.resetAll();
  11.  

These are the public functions to change the button's look.
Code: Adventure Game Studio
  1. copyAttributes(int src_btn_id);
  2. setColors(int baseCol,  int highCol,  int shadowCol);
  3. setBorder(int amount);
  4. setBevel(int amount);
  5. setBackgroundGradient(int startColor,  int endColor, eBtnBlend blendMode, int startTransparency, int endTransparency);
  6. setForegroundGradient(int startColor,  int endColor, eBtnBlend blendMode, int startTransparency, int endTransparency);
  7. setText(String text, int color, int font, eBtnAlignVertical vAlign, eBtnAlignHorizontal hAlign);
  8. setTextShadow(int color);
  9. setTextGradient(int startColor,  int endColor, eBtnBlend blendMode, int startTransparency, int endTransparency);
  10. setBackgroundImg(int spriteSlot, int transparency, bool scaling);
  11. setForegroundImg(int spriteSlot, int transparency, eBtnAlignVertical vAlign, eBtnAlignHorizontal hAlign );
  12. setRoundness(int amount);
  13. setOutline(int color);
  14. getGraphic();
  15. render();
  16.  
The private functions start with an underscore, you shouldn't need to call them directly.


Revision History:
1.0   initial release
1.1   rounded button support
1.1.1 added the function "getGraphic()", minor touch ups

7
CGA
Christmas Game Arcade

Enjoy three nice laps of classic racing goodness. Or grab the sources and make a game yourself.


Features:
* 1 track, 3 laps, 24 presents
* 4 blazing colors
* Christmas spirit from 1981 8-)

Hopefully this evolves into a proper game next year, think of this more like a Christmas greeting card :)

Downloads
http://www.adventuregamestudio.co.uk/site/games/game/1994/

Sources:
You need to use AGS 3.4.0.6 or higher to open and compile the sources
http://shatten.sonores.de/wp-content/uploads/2015/12/CGA_sources_1.0.7z (24 MB)

8
Hey,
I'm currently working on a Christmas game (or Holiday Season game including snow, gifts and an altruistic old man... whatever you prefer ;) )
And since working on it in secrecy is boring, I've decided to start this thread.

So what is this about, you might ask?
Remember Red Hot Overdrive, Outrun, Super Hang-On or even TechnoCop? That is pseudo-3D racing. Ever dreamed of Roger driving to his next adventure? Maybe soon he might be able to do that. There's an excellent site on the net explaining how everything works: http://codeincomplete.com/posts/2012/6/22/javascript_racer/

My personal goal is to create a small Christmas themed racing game in CGA, but let's face it... time is short and I have no idea if I can make it. So in the meantime I just post my progress here and maybe some of you might  look at the code and find it useful (or even improve it and post it back.. *cough* that would be wonderful to be honest)


So here's the first preview - made with AGS 3.4.0.6 (hooray for managed structs!)
Current features are:
* curves
* hills
*slowdowns



Download the source here:
http://shatten.sonores.de/wp-content/uploads/2015/12/xmasracer_01.zip
Get the game/sources here:
http://www.adventuregamestudio.co.uk/forums/index.php?topic=53023

PS
Many thanks to Khris and AprilSkies for all their advice and input so far! You guys rock.

9
Recruitment / [AGS HELP WANTED] Christmas Midi Remix needed
« on: 27 Nov 2015, 10:44 »
For a silly (and free) Christmas kart racer, I'm in the need of a certain music track.
The game is going to be a pseudo 3d Racer in the vain of Outrun, just with a Sleigh and CGA graphics.
Therefore it would be awesome, if the game could have a Christmas remix of the famous "Magical Sound Shower" http://www.vgmusic.com/file/c9f955c172868127f952fc6b6d0b1db1.html
Adlib /OPL2 sound is highly appreciated.

Is anyone willing to do this?

10
Hey everyone,
Dualnames made me make this hourgame :) And since nobody except Cuiki every played it, I thought I'd share it with all of you!

http://shatten.sonores.de/wp-content/uploads/2014/12/xmashour.zip
You have 30 seconds to fetch as many presents as you can get.
* Move in 4 - yes, F_O_U_R breathtaking directions
* be greedy
* train your reflexes
* no DLC, no ingame purchases

You need the Stella Emulator (or a real VCS 2600) to run it:
http://stella.sourceforge.net/downloads.php

Oh - and this is my first Atari game ever, it's a bit .. err. rough around the edges :P
Merry XMAS from GMT+1 :D

11
Sorry, I still don't have the rights to access the Suggestion Tracker, so I post it here:

How about adding native joystick support to AGS?
Currently we only have Wyz' closed source windows-only plugin. I googled a bit and found out that Allegro4 has at least joystick support for Linux and Windows. So that would be an improvement :)

12
Hey,
I'm thinking about to translate the 9-Verb GUI to russian cyrillics. Unfortunately I don't have any experience with non-latin-char based translations - is there anyone who already did it?
Any fonts to suggest? Or if you do speak russian, do you mind translating the 9verbs + a few strings?

13
I think this has already been discussed, but the search function doesn't reveal it to me. So I'm sorry in advance in case I waste your time ;)

In the mid of development I converted my project from 16bit to 32bit, so there are quite a few 16bit sprites left and the editor identifies them as 16bit sprites. Now unfortunately these sprites aren't rendered on 32bit/alpha GUI surfaces (they simply don't show up), only after I re-import them.
But since I have hundreds of 16bit sprites in my project I would prefer to convert them inside the editor instead of reimporting them.

Something like: "right click -> convert to 32bit" would be really helpful.

14
I just found out that Aseprite has finally reached 1.0!
http://www.aseprite.org/
It's still free if you decide to compile it yourself.

Working with it is pretty fun so far - especially the pixel-perfect drawing is neat. It also features RGB-color modes and a pretty advanced rotation feature (Rotsprite).

15
The Rumpus Room / cardboard robots + chiptunes
« on: 25 May 2014, 00:04 »
in case you have a party going on and are all out of chiptunes:

16
Hey,
I've worked a bit on custom dialogs again. The dialogs work fine and are rendered correctly, but unfortunately the warnings.log is full of these:
Code: Adventure Game Studio
  1. (in room 10): RawDrawImage: Sprite 387 colour depth 15-bit not same as background depth 16-bit
  2. (in room 10): RawDrawImage: Sprite 393 colour depth 15-bit not same as background depth 16-bit
  3. ....
  4.  

I've just imported a 8-bit gif and the game is in 16 bit mode. Also in the editor, the file looks perfectly normal.


Does anyone have a clue what this means?

17
Is there a way to determine, whether dialogs options are currently displayed?
I have a custom dialog GUI and few function in rep_exec_always which I only want to check while the GUI is shown.

Thanks for any help :)

18
Editor Development / Funky Drawing on roomsurfaces
« on: 24 Mar 2014, 07:45 »
If you try to draw on roomsurfaces without having a background pic, you get this nice CGA effect 8-)
Spoiler: ShowHide



Unfortunately it also drops the framerate to 2-3 fps.
This also happens when you update the game to 32-bit and don't reload a dummy pic as room background.

It's not a major issue, but worth mentioning.

19
Beginners' Technical Questions / Tint a sprite to white?
« on: 21 Mar 2014, 07:52 »
Hi,
is it possible to tint a character to solid white? Whenever I try it, the character just turns out kind of desaturated. Tinting to solid black on the other hand is no problem.



source sprite

20
Beginners' Technical Questions / Check if sprite exists?
« on: 12 Mar 2014, 21:51 »
Hey,
is it possible to check via script, if the given sprite slot even exists?
I'd like to create dynamic sprites from a textbox, but of course the game crashes when I enter an invalid number.

Is there a way to prevent this?

Thanks!

Pages: [1] 2 3 ... 5