Giter Site home page Giter Site logo

pyrdacor / ambermoon.net Goto Github PK

View Code? Open in Web Editor NEW
387.0 30.0 20.0 1.75 GB

Ambermoon rewrite in C#

License: GNU General Public License v3.0

C# 99.73% PowerShell 0.15% Shell 0.04% Batchfile 0.02% Inno Setup 0.07%
fantasy game-development games indie open-source port rewrite rpg amiga remake

ambermoon.net's Introduction

Ambermoon.net

Introduction

Ambermoon.net is a full C# rewrite of Ambermoon and will run at least on Windows, Linux and Mac.

Download

Version 1.9.9 is the most recent version from March 15th 2023. It includes original version 1.19 and also Ambermoon Advanced 1.03.

You can also download the game on my website at www.pyrdacor.net!

Platform Download 1.9.9
Windows 64bit Link
Linux 64bit Link
Mac 64bit (Intel processor) Link
Mac 64bit (ARM processor, M1, M2, etc) Link
Windows 32bit Link

Problems? The FAQ might help.

Other platforms like Android, iOS or Raspberry Pi4 might follow later.

Build status

Amiga versions

If you are interested in the original Amiga game files you can find them here: https://github.com/Pyrdacor/Ambermoon. I released some new versions and patches of the original game files there as well.

A completely new game extension was also released called Ambermoon Advanced. Check it out!

Additional Resources

Need help?

  • (English) New to Ambermoon? Please have a look here.
    If you have questions feel free to ask via email, on Twitter or here on GitHub on the issues page. Some more info follows below as well.
  • (German) Du kennst Ambermoon noch nicht? Schau bitte hier.
    Wenn du Fragen hast, meld dich einfach per Email, auf Twitter oder hier auf GitHub unter Issues. Weiter unten gibt es auch noch einige Infos.

Support the project

I appreciate all kind of support for this project. If you want to donate to help increase my motivation and allow me to spend more time developing this Ambermoon project and similar projects like a 3rd part of the trilogy or map and character editors, you can do so here. \

I will also post updates about releases and interesting stuff on twitter: https://twitter.com/Pyrdacor

Screenshots

Indoor map World map

Skies 3D map

Battles Spells

Battle loot Battle positions

Chests Inventory

Merchant Healer

Conversations Events

Monsters Map effects

Rest Items

Locked doors Level Up

Game Over Riddlemouth

Fog of war Drug effect

Automap Minimap

Main menu Character creation

Version selector Options

Important controls

Please also have a look here.

Key Description
Up or W Move up (2D) or forward (3D)
Down or S Move down (2D) or backward (3D)
Left or A Move left (2D) or turn left (3D)
Right or D Move right (2D) or turn right (3D)
F11 Toggle fullscreen mode
ESC Close ingame windows, stop item dragging/specific cursors/etc
Num1-Num9 Action buttons 1-9 (button panel in the lower right corner)
1-6 Set party member 1-6 as active
F1-F6 Open inventory of party member 1-6
Ctrl + 0-9 Quicksave into save slot 1-10 (0 saves into slot 10)
PrintScreen or Ctrl + P Saves a screenshot to the folder "Screenshots" next to the program (or in config folder if you have no permissions to write there)

Left clicks

  • On portrait will select the party member as the active one.
  • Drag&drop of items.
  • On map center (Zzz) it will wait for 5 minutes.
  • All kinds of interactions and selections.

Right clicks

  • On portrait will open the inventory.
  • On buttons in map view will toggle between move arrows and actions.
  • In 2D map view will show a crosshair cursor which can be used for interactions. Or it aborts an already active action cursor.
  • In 3D map view:
    • On the corners (turn arrows) it will perform 90° or 180° rotations.
    • On the center (Zzz) it will trigger interactions with a nearby map object.
  • On item it will pickup all the items without asking for the amount.
  • When dragging an item it will reset the item back to its source slot.

Mouse wheel

  • Scrolling the wheel on 2D maps changes the cursor.
  • Clicking the wheel or middle mouse button on 2D maps will show the crosshair or mouth cursor.
  • If a scrollbar is present, it can be controlled by the mouse wheel as well.

Configuration

Ambermoon.net can be configured ingame but also via a configuration file. See Configuration for more details.

Changelog

You can find the full changelog here. You can also look at the releases. They have more details in general.

Custom music

You can use your own music with Ambermoon (e.g. the Atari music or the remixes from Matthias Steinwachs). For more details read here.
I also provide the Atari tracks here. Just extract the mp3 to a folder called "music" next to the main executable to enjoy the music. Note that not all tracks were converted to Atari so only 13 out of 32 tracks are available.

Special thanks

Special thanks to my top patreons and github sponsors:

  • Philip Breitsprecher
  • Mike Valtix
  • Sebberick
  • Thomas Ritschel
  • Tschorle
  • Daniel Egger
  • Kaspar
  • NeXuS-Arts
  • timbo t
  • Other Retro Matt
  • Anton Huber
  • Lars
  • Robin Mattheussen
  • giom
  • Levidega
  • Lorenz P.
  • LoneRaider
  • MD
  • Unreality
  • Milan
  • Peter Holtgrewe
  • frostworx
  • meok meok
  • Martin Tramm
  • Stay Forever
  • Alexander Holland
  • Stephan Mankie
  • André Wösten
  • Benno
  • orgi
  • JR_Riketz
  • Wolfgang
  • Sprudel
  • NLS
  • Benjamin Ziebert
  • David Geiger
  • skobry
  • crediar
  • AMike
  • soulsuckingjerk
  • Mahen
  • Teladi

Special thanks to some special contributors and testers as well:

  • kermitfrog
  • a1exh (Alex Holland)
  • Metibor
  • Thallyrion
  • Uukrull
  • Nephilim
  • skdubg
  • crediar
  • nicode
  • Jurie Horneman
  • dlfrsilver and CFOU! (French translation)
  • galon3 (Polish translation)
  • Czudak (App icon, suggestion for a patreon page)

Other projects

Checkout my already working 'SerfCity (Die Siedler) rewrite' at freeserf.net.

I also created another github project called Ambermoon for providing resources and research the game data. Feel free to have a look or contribute.

And I work on a huge extension of Ambermoon called Ambermoon Advanced.

ambermoon.net's People

Contributors

cbrueffer avatar dependabot[bot] avatar metibor avatar midwan avatar pyrdacor avatar sisch avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ambermoon.net's Issues

[Feature request] Auto De-rune

In the original Amiga game there is a rune sheet included in the game box and some of the fun is decoding the writing you find around Ambermoon. But it soon becomes a chore. How about an enhancement that once you've found the rune sheet in the game (I think there is a rune sheet item in the game) all the runes are displayed as plain text? OR perhaps if you hold down a key, like TAB or something?

This idea was suggested/implemented by Ambermoon fan st-th in 2009 when he was making his own Amiga patch. However he disappeared without releasing anything. I still think it is a good enhancement.

[Wanted] Battle testers

First implementation of battles is out there.

Please start testing battles with v1.1.18. Report bugs here so I won't get drowned in oceans of bugs. :D This is still beta and will have many flaws.

Spells are not implemented yet as well as advancing the group. So don't report issues regarding these features.

Every text character is rendered twice

While trying to figure out how to display the map name correctly, I found out, that all text characters and shadows are created and rendered twice, every time Text.set(IText value) is called.

The call stack for a hovered item:
grafik

This is not visible on manually positioned texts, like in chests:
grafik

But if I use for example mapName.Place(new Rect(16, 40, 175, 10), TextAlign.Center); and then change the Text-property to a new name one pair of characters is rendered correctly centered and the other one is rendered left aligned beginning from center of the rectangle.
grafik

If I change UpdateTextSprites() to the following code, the text is only drawn once, but at the wrong position.

        void UpdateTextSprites()
        {
            if (!UpdateCharacterPositions())
                return;

            characterSprites.ForEach(s => s?.Delete());
            characterSprites.Clear();
            characterShadowSprites.ForEach(s => s?.Delete());
            characterShadowSprites.Clear();

Could you have a look at it?

PaletteIndex maybe wrong in 3D maps

This is the current view I have in the first 3D map:
grafik

First I thought it is a data problem, because I used the extracted data files and maybe they are corrupt, but I get the same colors, when I use Ambermoon.net v1.0.6 with the adf files you have under Ambermoon/Disks/German/ambermoon_german_1.01.zip

I am able to correct the problem by changing the PaletteIndex by 1:
grafik

Then I get the same colors as you get in your screenshots:
grafik

Same goes for the other 3D maps.

Are you able to reproduce it and have an idea, what is causing the problem?

[Feature] Add game data writers

Those writers should allow to save game objects back to files. Useful for savegame writing, game data patching or modding.

Writers needed for:

  • Party members
  • Monsters
  • NPCs
  • Chests
  • Merchants
  • Automap
  • Saves (savegame names)
  • Savegame data (party data sav)
  • Items
  • ItemSlots
  • Texts (NPC, party member, map, objects)
  • Dictionaries (words)
  • Maps
    • Map data
    • Icon data (Tileset)
    • Lab data
  • Monster groups
  • Places (data)

Maybe also add palettes writer later?
Maybe also allow graphic writing later?

Floor and Ceiling have border pixels missing or have garbage pixels

In the 3D maps the floor and ceiling textures are missing a pixel or have garbage pixels on two of the borders.
I am pretty sure that this is another 0.5f problem (the color index is 0 or something else instead of the correct value because the index is read on the border of the pixel instead of the middle), but I was not able to tweak the shaders to get it working.

Ceiling
Missing pixels on the border with tilted camera
grafik

Extracted graphic with the missing pixels of one square marked in red
grafik

Floor
Missing pixels and garbage pixels on the border with tilted camera
grafik

Extracted graphic with the missing pixels of one square marked in red and the garbage pixels marked in yellow (I flipped the image to have the same orientation)
grafik

Ignore the palettes, it seems to be off in the extracted images the 3d palette is fine.

According to your screenshots I don't think it is just me again with my AMD gpu. ;-)

Feature: Map names in map window

I made a commit in my repository that adds the original map names to the main window:
Metibor@f51b328

I think it is not ready for a PR, yet, but if its okay, I will create one

Positive:

  • Works for both languages
  • Uses the world names from the executable data

Negative:

  • Uses just White as text color => I don't know which one to use, but the layout also doesn't use the correct colors (palettes should be different the various layouts, see this Let's Play for example)
  • Adds a new dependency from the Core project to Data.Legacy
  • I don't know if I did the handling of the mapName object is correct, but I had to Delete it or it would render twice.

I am open for criticism. 😃

grafik

grafik

Open issues

I guess the bugs here are either fixed or not important or even the same in the original. For other bugs I will now use indepedent issues. This will be closed now.

[Feature suggestion] Add some filters and/or shaders to interface and/or fullscreen

Right now the high resolution rendering of the 3D-world clashes with the low resolution of the game interface and 2D-world.

My suggestion would be twofold:

  1. Add a fullscreen filters like 2xSAI and HQ2x and combine this with a bilinear filter
    and/or
    add the option of using a full screen shader (for example crt-caligari) or even the option the add your own shaders

  2. Allow a filter (again for example 2xSAI or HQ2x) to be added to all 2D elements like the interface, 2D sprites and 3D textures.

Z-ordering issue in 3D and 2D maps

Apart from the palette problem I described in the other issue, I am having Z-ordering problems in both map types.
Your screenshots suggest, that you don't have the problem, so I will post it as an issue.

This is the room with the well in the first 3D map which is mostly looking okay:
grafik

But if I turn around all walls and objects are drawn in the wrong order:
grafik

In 2D maps I have the issue, that the main character is drawn behind the decoration tiles
grafik

grafik

I am using a Radeon HD 5670 on one computer and a HD6850 on my other. Both have the same problem.

Btw, I am closely following the project since day 2 or 3.
I will try to help where I can, but I don't have much experience in reverse engineering!

Item drag&drop issues

Sometimes the item is dropped somewhere when resetting the drag with right mouse. Also saw duplication of items this way. Needs testing and fixing.

Map X/Y co-ordinates

I saw in v1.1.16 you implemented "active special items" the compass, clock.

Can I please request the X/Y co-ordinates next?

This is a very useful feature when play testing.

Crash while opening Inventory of Party Members

I get this crash when i try to open the inventory of the 2nd member (in my case Egil):

Unhandled exception. System.Collections.Generic.KeyNotFoundException: The given key '0' was not present in the dictionary.
at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
at Ambermoon.Data.Legacy.ItemManager.GetItem(UInt32 index)
at Ambermoon.UI.UIItem.Update(Boolean itemTypeChanged)
at Ambermoon.UI.UIItem..ctor(IRenderView renderView, IItemManager itemManager, ItemSlot item)
at Ambermoon.UI.ItemGrid.SetItem(Int32 slot, ItemSlot item)
at Ambermoon.Game.<>c__DisplayClass92_0.b__0()
at Ambermoon.Game.OpenPartyMember(Int32 slot)
at Ambermoon.Game.OnKeyDown(Key key, KeyModifiers modifiers)
at Ambermoon.GameWindow.Keyboard_KeyDown(IKeyboard keyboard, Key key, Int32 value)
at Silk.NET.Input.Desktop.GlfwKeyboard.b__26_1(WindowHandle* _, Keys key, Int32 code, InputAction action, KeyModifiers mods)
at Silk.NET.Input.Desktop.GlfwEvents.<.ctor>b__0_1(WindowHandle* a, Keys b, Int32 c, InputAction d, KeyModifiers e)
at Silk.NET.GLFW.XDFEF5638.Glfw.PollEvents()
at Silk.NET.Windowing.Desktop.GlfwWindow.DoEvents()
at Silk.NET.Windowing.Common.WindowExtensions.<>c__DisplayClass2_0.b__0()
at Silk.NET.Windowing.Desktop.GlfwWindow.Run(Action onFrame)
at Silk.NET.Windowing.Common.WindowExtensions.Run(IView view)
at Ambermoon.GameWindow.Run(Configuration configuration)
at Ambermoon.Program.Main()

Add cursor change with mouse wheel

When i just started a new game, i cant add any item into my wallet.
Ill remember that i can scroll the actions with the middle mousebutton and do a left click on a chest or a bookshelf.

Thas not possible right now.

Z-Issue: Shadow of title text is on same layer as UI

Text shadow and UI now are both drawn on RenderLayer 0.70f due commit 8894be7

The title text (Thalion Büro) has now shadow
grafik

It is easy to fix. For example

            0.70f,  // UI
            0.71f,  // Items
            0.72f,  // Text

but then this happens:
grafik

So the issue seems to be a little bit more complicated...

For the wrong window title, see #46

[Feature] Add day-night-cycle and skies

  • Add skies (color, world sky image, correct palette)
  • Add time and time progression
  • Add clock display and day/night icon (update them related to time)
  • Add correct light to 3D
  • Add fog of war to 2D with correct radius

[Wanted] Original game testers

I need a bunch of information from the original game and I don't have the time for it. So maybe you guys could help me with some things:

  • There is a flag which is used on the Guard Demon and all kinds of Gargoyles. Maybe it's some kind of immunity. My guess would be either the spell "Monster knowledge" or "Show monster LP". Could someone try these spells on Guard Demon and Gargoyle and check if the spells are possible to cast, are always reflected and/or have no effect if succeeded. (In the unfixed versions this flag is also used for Reg in the orc caves so you may test on him as well).
  • There is a flag for almost all the undead monsters so I guess it means "Anti-undead spells will work on them". But the zombie master does not have this flag. So could you try to use spells like "Destroy Undead" on a zombie master and tell me if it works.
  • What effects do the barrels in Spannenberg have if you touch them?
  • How much SP and SLP is needed for the spell "Show monster LP"?

I will add some points here from time to time. Thanks for your support.

Messages from executable have different indexes in DE and EN version

Hi, I am still there! Just too much stuff going on right now. 🤔

The DontForgetItems has index 24 in the English v1.07 but 22 in the German v1.05 version.

English
grafik

German
grafik

The German version is missing index 5 and 23 in comparison to the English version.

German LoadWhichSavegame is 2 off
grafik

English is correct
grafik

[Feature] Add player stat window

  • Add window with player attributes, abilities, languages and ailments
  • The window is accessible from player inventory via button
  • The inventory is accessible from the new window via button
  • Also finish inventory window
  • Add exit button functionality for both windows

Crash when clicking on load savegame symbol - 1.1.14

I get the following crash when i click on the load savegame symbol

Unhandled exception. Ambermoon.AmbermoonException: [Data] Unsupported text character '▄'.
at Ambermoon.Data.Legacy.TextProcessor.CharToGlyph(Char ch, Boolean rune)
at Ambermoon.Data.Legacy.TextProcessor.<>c.b__2_0(Char ch)
at System.Linq.Enumerable.SelectEnumerableIterator2.MoveNext() at Ambermoon.Data.Legacy.TextProcessor.FinalizeText(IEnumerable1 glyphs)
at Ambermoon.Data.Legacy.TextProcessor.CreateText(String text)
at Ambermoon.UI.Popup.AddText(Position position, String text, TextColor textColor, Boolean shadow, Byte displayLayer)
at Ambermoon.UI.ListBox..ctor(IRenderView renderView, Game game, Popup popup, List1 items, Rect area, Position itemBasePosition, Int32 itemHeight, Int32 hoverBoxWidth, Position relativeHoverBoxOffset, Boolean withIndex, Int32 maxItems) at Ambermoon.UI.ListBox.CreateSavegameListbox(IRenderView renderView, Game game, Popup popup, List1 items)
at Ambermoon.UI.Popup.AddSavegameListBox(List1 items) at Ambermoon.UI.Layout.OpenLoadMenu() at Ambermoon.UI.Button.ExecuteActions(UInt32 currentTicks) at Ambermoon.UI.Button.LeftMouseUp(Position position, Nullable1& cursorType, UInt32 currentTicks)
at Ambermoon.UI.ButtonGrid.MouseUp(Position position, MouseButtons mouseButtons, Nullable1& newCursorType, UInt32 currentTicks) at Ambermoon.UI.Layout.LeftMouseUp(Position position, Nullable1& newCursorType, UInt32 currentTicks)
at Ambermoon.Game.OnMouseUp(Position cursorPosition, MouseButtons buttons)
at Ambermoon.GameWindow.Mouse_MouseUp(IMouse mouse, MouseButton button)
at Silk.NET.Input.Desktop.GlfwMouse.b__62_2(WindowHandle* _, MouseButton btn, InputAction action, KeyModifiers mods)
at Silk.NET.Input.Desktop.GlfwEvents.<.ctor>b__0_2(WindowHandle* a, MouseButton b, InputAction c, KeyModifiers d)
at Silk.NET.GLFW.X8A925E35.Glfw.PollEvents()
at Silk.NET.Windowing.Desktop.GlfwWindow.DoEvents()
at Silk.NET.Windowing.Common.WindowExtensions.<>c__DisplayClass2_0.b__0()
at Silk.NET.Windowing.Desktop.GlfwWindow.Run(Action onFrame)
at Silk.NET.Windowing.Common.WindowExtensions.Run(IView view)
at Ambermoon.GameWindow.Run(Configuration configuration)
at Ambermoon.Program.Main()

My guess is this happens because of unsupported "space character" in savegame name

[Announcement] NPCs added and Twitter account

I released v1.1.14 just now. It contains 2D NPCs (with moving and all) and a rudimentary conversation window.

From now on I will also announce new releases on twitter (https://twitter.com/Pyrdacor2 with hashtag #Ambermoon) cause github isn't the best platform to do so.

I changed a lot of code so maybe there will be bugs. Not everything is working yet but feel free to report any issues. :)

Automatic Message Appearance on 2D World Map

There needs to be some check whether the Message should be displayed when near a position or just when active clicking on something with Eye or Hand.

Example is this message:
message appearance
This message should not appear automagically. Only when actively clicked on the signpost.

2D Map - Invisible Wall after Event

Sorry for the title, didn't know how to exactly name it.

There is a problem with a Map Event in the thieves Guild. After pressing the hidden lever in the fireplace, the Wall should disappear so you can get into the cellar.
There are issues with this:

  • Wall is not entirely disappeard
  • Wall is just invisible and you can't go through

See Screenshot
thieves guild bug

[Wanted] Savegame data decoders

I could need some help with decoding savegame data. Basically it is easy:

You need WinUAE and a hex editor (e.g. HxD) or even better a hex data comparer (e.g. winmerge).

Process of data decoding:

  • You save the game in WinUAE
  • You load the game in WinUAE immediately
    • This way it is copied decoded to the main folder (e.g. C:\WinUAE\Ambermoon\Amberfiles\Party_data.sav)
  • Create a copy of Party_data.sav somewhere else (other directory or filename)
  • Then do some action in the game (see below)
  • Then again save the game and load it
  • The new savegame is now decoded inside your Amberfiles folder
  • Now you can compare your older copy and the new savegame with a hex data comparer or hex editor (manual compare)

Possible actions to decode:

  • Defeat a monster group (somewhere defeated monsters must be tracked)
  • Finish quests (somewhere quest status must be tracked)
  • Trigger text popups (somewhere must be tracked if a text popup already occured, as long as it is a "one time"-popup)
  • ...

There may be other stuff that is stored there. Use your imagination what must be stored so a loaded game knows about it. Note that all chest, merchant and party member data is stored in other files. The same is true for exploration of 3D maps. Those data is mostly decoded except for some character values.

What already is decoded:

  • Chest open states and chest items, food and gold
  • Values for all characters including items and equip
  • All merchant items
  • Current hour and minute
  • Hours without sleep
  • Locations of all transports (like horses or ships)
  • Current travel mode (horse, walk, etc)
  • Active spells with duration (e.g. light)
  • Current map index, position and direction
  • Tile change events (= visible map changes)
  • Location of "mark of return" spell

Some tips with winmerge

You can just drag&drop both files into the program. Most of the times it does not compare the files in binary format. To do so you can go to "File > Recompare as > Binary".

You will see differences highlighted in yellow. Note that some bytes will always changed (like map position or current time). Those values are located at the beginning. So don't bother with bytes prior to offset 58 (hex 3A) as those bytes are already decoded. The only exception is byte 0-5 which are also unknown yet.

If you mark/select data in winmerge you will see the offset and selection length at the bottom of the window for the file.

@Metibor @Thallyrion Maybe you guys want to help.

If you have some results, please let me know here. Thanks in advance.

Contribution

I added a contribution section in the readme. I will add all contributors there. I hope this is ok.

Thanks for helping to bring this project to life.

Crash trying to load savegame

After pressing the load button in the disk menu i get this error

Unhandled exception. System.IndexOutOfRangeException: Data index out of range.
at Ambermoon.Data.Legacy.DataReader.set_Position(Int32 value)
at Ambermoon.Data.Legacy.SavegameManager.GetSavegameNames(IGameData gameData, Int32& current)
at Ambermoon.UI.Layout.OpenLoadMenu()
at Ambermoon.UI.Button.ExecuteActions(UInt32 currentTicks)
at Ambermoon.UI.Button.LeftMouseUp(Position position, Nullable1& cursorType, UInt32 currentTicks) at Ambermoon.UI.ButtonGrid.MouseUp(Position position, MouseButtons mouseButtons, Nullable1& newCursorType, UInt32 currentTicks)
at Ambermoon.UI.Layout.LeftMouseUp(Position position, Nullable`1& newCursorType, UInt32 currentTicks)
at Ambermoon.Game.OnMouseUp(Position position, MouseButtons buttons)
at Ambermoon.GameWindow.Mouse_MouseUp(IMouse mouse, MouseButton button)
at Silk.NET.Input.Desktop.GlfwMouse.b__62_2(WindowHandle* _, MouseButton btn, InputAction action, KeyModifiers mods)
at Silk.NET.Input.Desktop.GlfwEvents.<.ctor>b__0_2(WindowHandle* a, MouseButton b, InputAction c, KeyModifiers d)
at Silk.NET.GLFW.X84D602C1.Glfw.PollEvents()
at Silk.NET.Windowing.Desktop.GlfwWindow.DoEvents()
at Silk.NET.Windowing.Common.WindowExtensions.<>c__DisplayClass2_0.b__0()
at Silk.NET.Windowing.Desktop.GlfwWindow.Run(Action onFrame)
at Silk.NET.Windowing.Common.WindowExtensions.Run(IView view)
at Ambermoon.GameWindow.Run(Configuration configuration)
at Ambermoon.Program.Main()

3D Movement

The 3D movement via the movement arrows (num key movement) does not resemble the original behaviour yet.

The Num 7+9+1+3 should only rotate the perspective and not move + rotate
The arrow keys left + right do it correctly

Chest items not shown

I don't know how many chest are implemented. In 2D environment i wasn't able to open any. Only Moving Cursor and ZZZZ cursor is available. But in the 3D environemnt i could access some stashes. But no items are shown.
stash

Crash on 3D Map

Surprisingly i had this crash. Cannot exactly pinpoint it but it happend after entering Spannenberg and right clicking on the movement menu.

Unhandled exception. System.IndexOutOfRangeException: Index was outside the bounds of the array.
at Ambermoon.MapExtensions.TriggerEvents(Map map, Game game, IRenderPlayer player, MapEventTrigger trigger, UInt32 x, UInt32 y, IMapManager mapManager, UInt32 ticks)
at Ambermoon.Game.TriggerMapEvents(MapEventTrigger trigger, UInt32 x, UInt32 y)
at Ambermoon.Game.TriggerMapEvents(MapEventTrigger trigger)
at Ambermoon.UI.Layout.b__62_3()
at Ambermoon.UI.Button.ExecuteActions(UInt32 currentTicks)
at Ambermoon.UI.Button.LeftMouseDown(Position position, Nullable1& cursorType, UInt32 currentTicks) at Ambermoon.UI.ButtonGrid.MouseDown(Position position, MouseButtons mouseButtons, Nullable1& newCursorType, UInt32 currentTicks)
at Ambermoon.UI.Layout.Click(Position position, MouseButtons buttons, CursorType& cursorType, UInt32 currentTicks)
at Ambermoon.Game.OnMouseDown(Position position, MouseButtons buttons)
at Ambermoon.GameWindow.Mouse_MouseDown(IMouse mouse, MouseButton button)
at Silk.NET.Input.Desktop.GlfwMouse.HandleMouseDown(IMouse mouse, MouseButton button)
at Silk.NET.GLFW.XC9BB5C31.Glfw.PollEvents()
at Silk.NET.Windowing.Desktop.GlfwWindow.DoEvents()
at Silk.NET.Windowing.Common.WindowExtensions.<>c__DisplayClass2_0.b__0()
at Silk.NET.Windowing.Desktop.GlfwWindow.Run(Action onFrame)
at Silk.NET.Windowing.Common.WindowExtensions.Run(IView view)
at Ambermoon.GameWindow.Run(Configuration configuration)
at Ambermoon.Program.Main()

[Feature] Add text popups

  • Add text popups with border, text and background
  • Add optional image for events
  • Positioning and sizing based on text size and image
  • Implement text map events

Avoid map event triggering on savegame load

When saving while standing next to a chest etc and then loading the game, the map events is immediately triggered (e.g. opening the chest window). This should be avoided.

Animation and offset for billboards

Some billboards are animated in original game (like the pendulums in luminor's tower). They are not animated yet in Ambermoon.net though. Moreover floor billboards (like lava) seems to stuck partly inside the ground in luminor's tower. A little offset is needed there I guess. Also in luminor's tower the torches consist of two billboards (wood and flame). The flame should be displayed above the wood but it is not at the moment.

Todo list

I will prioritize the next steps here so you can see what's coming next and what I am working on. This should also allow others to pick stuff for contribution.

Next steps

  • Add game data writers #53
  • Add place data reader
  • Add battles (event, window, monster groups, images, etc) #43
  • Add skies and day-night-cycle #44
  • Add music. #30

Ideas for contribution

  • Test performance of larger render texts and if the performance is bad, find reasons for it.
  • General performance tests / fps in 2D maps, different sized 3D maps, look angles, UI windows etc.
  • Tests if features work as expected. Explore maps, open chests, load different save games, etc.

More to come. I am open for suggestions. I will update this list from time to time. Stay tuned. :)

[Feature] Add battles

  • Add monsters and NPCs to map including their movement
  • Add battle events
  • Add battle window
    • Battle background
    • Buttons with actions
    • Battle field with characters (battle positions) and monsters (including tooltips)
    • Fight animations
    • Fight logic

Note: This will be a big one. But battles are too important to leave them out for too long. 🗡️

Crash on 2D Map

I get this crash alway at a very specific place.

See Screenshot - It crashes if i move to the yellow circle.

2D map crash

Unhandled exception. System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection. (Parameter 'index')
at System.Collections.Generic.List1.get_Item(Int32 index) at Ambermoon.Game.ShowTextPopup(PopupTextEvent popupTextEvent, Action1 responseHandler)
at Ambermoon.MapExtensions.ExecuteEvent(Map map, Game game, IRenderPlayer player, MapEventTrigger trigger, UInt32 x, UInt32 y, IMapManager mapManager, UInt32 ticks, MapEvent mapEvent, Boolean& lastEventStatus)
at Ambermoon.MapExtensions.TriggerEventChain(Map map, Game game, IRenderPlayer player, MapEventTrigger trigger, UInt32 x, UInt32 y, IMapManager mapManager, UInt32 ticks, MapEvent firstMapEvent)
at Ambermoon.MapExtensions.TriggerEvents(Map map, Game game, IRenderPlayer player, MapEventTrigger trigger, UInt32 x, UInt32 y, IMapManager mapManager, UInt32 ticks)
at Ambermoon.Render.RenderMap2D.TriggerEvents(IRenderPlayer player, MapEventTrigger trigger, UInt32 x, UInt32 y, IMapManager mapManager, UInt32 ticks)
at Ambermoon.Render.Player2D.Move(Int32 x, Int32 y, UInt32 ticks, Nullable`1 prevDirection, Boolean updateDirectionIfNotMoving)
at Ambermoon.Game.Move2D(Int32 x, Int32 y)
at Ambermoon.Game.Move(CursorType cursorType)
at Ambermoon.Game.HandleClickMovement()
at Ambermoon.Game.OnMouseDown(Position position, MouseButtons buttons)
at Ambermoon.GameWindow.Mouse_MouseDown(IMouse mouse, MouseButton button)
at Silk.NET.Input.Desktop.GlfwMouse.HandleMouseDown(IMouse mouse, MouseButton button)
at Silk.NET.Input.Desktop.GlfwMouse.b__62_2(WindowHandle* _, MouseButton btn, InputAction action, KeyModifiers mods)
at Silk.NET.Input.Desktop.GlfwEvents.<.ctor>b__0_2(WindowHandle* a, MouseButton b, InputAction c, KeyModifiers d)
at Silk.NET.GLFW.XEEB4BF50.Glfw.PollEvents()
at Silk.NET.Windowing.Desktop.GlfwWindow.DoEvents()
at Silk.NET.Windowing.Common.WindowExtensions.<>c__DisplayClass2_0.b__0()
at Silk.NET.Windowing.Desktop.GlfwWindow.Run(Action onFrame)
at Silk.NET.Windowing.Common.WindowExtensions.Run(IView view)
at Ambermoon.GameWindow.Run(Configuration configuration)
at Ambermoon.Program.Main()

[Feature] Music playback

Okay, I will start to implement it.

My thoughts so far:

IAudioPlayer
For playing the audio tracks
Methods like SetTrack, SetVolume, Play, Stop.
Maybe Pause/Continue for the default track, because one thing that bothered me is, that the tracks alway start at the beginning.

Implementations will be:

  • NullAudioPlayer => Does nothing
  • MP3AudioPlayer => Plays MP3 data
  • SonicArrangerAudioPlayer => Plays the original modules

Can be switched via ambermoon.cfg (and later in game)

IAudioProvider
For loading/extracting and caching the audio data and providing it to the AudioPlayer

Implementations will be:

  • NullAudioProvider => Does nothing
  • MP3AudioProvider => Loads mp3 files from disk
  • SonicArrangerAudioProvider => Extracts SA modules from the 3 GameData.Files that contain the modules

AudioTrack
Enumeration for Map.MusicIndex with all audio tracks 32 in game files + 3 for intro, menu and extro + Index 0 for Default Track

DataNameProvider
Could provide the song names, but I don't think that they are really needed.

Wrong character encoding in German Version

When opening the inventory screen in the German version, we get an exception because of an encoding problem.
The UIText "MÄNNLICH" is read as "M─NNLICH" from the Executable.

Just changing Encoding = Encoding.GetEncoding(437); to another value in Ambermoon.Data.Legacy.DataReader does not work, because then the other data files won't load.

We could extend CharToGlyph with the additional characters though.

Unhandled exception. Ambermoon.AmbermoonException: [Data] Unsupported text character '─'.
   at Ambermoon.Data.Legacy.TextProcessor.CharToGlyph(Char ch, Boolean rune) in K:\GIT\Ambermoon.net\Ambermoon.Data.Legacy\Text.cs:line 117
   at Ambermoon.Data.Legacy.TextProcessor.<>c.<CreateText>b__1_0(Char ch) in K:\GIT\Ambermoon.net\Ambermoon.Data.Legacy\Text.cs:line 121
   at System.Linq.Enumerable.SelectEnumerableIterator`2.ToArray()
   at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
   at Ambermoon.Data.Legacy.TextProcessor.CreateText(String text) in K:\GIT\Ambermoon.net\Ambermoon.Data.Legacy\Text.cs:line 121
   at Ambermoon.UI.Layout.AddText(Rect rect, String text, TextColor color, TextAlign textAlign, Byte displayLayer) in K:\GIT\Ambermoon.net\Ambermoon.Core\UI\Layout.cs:line 393
   at Ambermoon.Game.<>c__DisplayClass92_0.<OpenPartyMember>b__0() in K:\GIT\Ambermoon.net\Ambermoon.Core\Game.cs:line 849
   at Ambermoon.Game.OpenPartyMember(Int32 slot) in K:\GIT\Ambermoon.net\Ambermoon.Core\Game.cs:line 870
   at Ambermoon.UI.Layout.Click(Position position, MouseButtons buttons, CursorType& cursorType) in K:\GIT\Ambermoon.net\Ambermoon.Core\UI\Layout.cs:line 614
   at Ambermoon.Game.OnMouseDown(Position position, MouseButtons buttons) in K:\GIT\Ambermoon.net\Ambermoon.Core\Game.cs:line 618
   at Ambermoon.GameWindow.Mouse_MouseDown(IMouse mouse, MouseButton button) in K:\GIT\Ambermoon.net\Ambermoon.net\GameWindow.cs:line 174
   at Silk.NET.Input.Desktop.GlfwMouse.HandleMouseDown(IMouse mouse, MouseButton button)
   at Silk.NET.Input.Desktop.GlfwMouse.<Subscribe>b__62_2(WindowHandle* _, MouseButton btn, InputAction action, KeyModifiers mods)
   at Silk.NET.Input.Desktop.GlfwEvents.<.ctor>b__0_2(WindowHandle* a, MouseButton b, InputAction c, KeyModifiers d)
   at Silk.NET.GLFW.XBD8D053E.Glfw.PollEvents()
   at Silk.NET.Windowing.Desktop.GlfwWindow.DoEvents()
   at Silk.NET.Windowing.Common.WindowExtensions.<>c__DisplayClass2_0.<Run>b__0()
   at Silk.NET.Windowing.Desktop.GlfwWindow.Run(Action onFrame)
   at Silk.NET.Windowing.Common.WindowExtensions.Run(IView view)
   at Ambermoon.GameWindow.Run(Configuration configuration) in K:\GIT\Ambermoon.net\Ambermoon.net\GameWindow.cs:line 250
   at Ambermoon.Program.Main() in K:\GIT\Ambermoon.net\Ambermoon.net\Program.cs:line 16

grafik

DOS-Encoding
grafik

ANSI-Encoding
grafik

[Feature] Add buttons

  • Add 3x3 buttons to the lower right
  • Add normal and pressed state images
  • Add all button images
  • Add functionality for movement, eye, hand and mouth buttons
  • Add option menu and load savegame functionality
  • Add swapping buttons with right click
  • Numpad keys 1-9 should trigger the associated buttons

Crash on 2D Worldmap

I was walking around the worldmap near Spannenberg when a crash occured:

Unhandled exception. Ambermoon.AmbermoonException: [Render] Invalid index
at Ambermoon.Renderer.RenderBuffer.GetDrawIndex(ISurface3D surface)
at Ambermoon.Renderer.RenderLayer.GetDrawIndex(ISurface3D surface)
at Ambermoon.Renderer.OpenGL.Surface3D.AddToLayer()
at Ambermoon.Renderer.OpenGL.Surface3D.set_Visible(Boolean value)
at Ambermoon.Render.RenderMap3D.AddObject(ISurface3DFactory surfaceFactory, IRenderLayer layer, UInt32 mapX, UInt32 mapY, Object obj)
at Ambermoon.Render.RenderMap3D.UpdateSurfaces()
at Ambermoon.Render.RenderMap3D.SetMap(Map map, UInt32 playerX, UInt32 playerY, CharacterDirection playerDirection)
at Ambermoon.Game.Start3D(Map map, UInt32 playerX, UInt32 playerY, CharacterDirection direction)
at Ambermoon.Render.Character2D.MoveTo(Map map, UInt32 x, UInt32 y, UInt32 ticks, Boolean frameReset, Nullable1 newDirection) at Ambermoon.Render.Player2D.Move(Int32 x, Int32 y, UInt32 ticks, Nullable1 prevDirection, Boolean updateDirectionIfNotMoving)
at Ambermoon.Game.Move()
at Ambermoon.GameWindow.Keyboard_KeyDown(IKeyboard keyboard, Key key, Int32 value)
at Silk.NET.GLFW.XC6DECC54.Glfw.PollEvents()
at Silk.NET.Windowing.Desktop.GlfwWindow.DoEvents()
at Silk.NET.Windowing.Common.WindowExtensions.<>c__DisplayClass2_0.b__0()
at Silk.NET.Windowing.Desktop.GlfwWindow.Run(Action onFrame)
at Silk.NET.Windowing.Common.WindowExtensions.Run(IView view)
at Ambermoon.GameWindow.Run(Configuration configuration)
at Ambermoon.Program.Main()

Version 1.09
I could not reproduce it. Occured only once.

Edit: Could reproduce the crash. It randomly occurs on entering another 3D locations. In this case the Orc Caves/Burnville Tunnel
Edit2: I don't know if this actually is an issue (could not be implemented yet) not all 3D location are visitable. E.g. entering Sylph/Gala Temple does not work. And in Spannenberg you have no Sky textures, background is just Black.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.