The Shadow of the Ramlord


It is the 18th Century, at the height of the Holy Roman Empire's power. In a small, nondescript region of Europe lies Caecea Manor, the seat of one of the more influential houses in power led by Count Anton Caecea. Rumors among the villagers, spreading far enough through the country to pique the interest of the Church, is that the Manor is the centerpiece of Occultist and Necromantic activity. Not able to stand idly by, the Church ordains the intervention of their leading Witchfinder in the region, Albert Gray, to investigate these claims. He follows the trail of an arranged marriage between the Count and a beloved Baroness, Emilia Hall, right to the manor itself.

An insidious narrative through the occult weaves itself from her pained diary entries, the lost secrets beneath the manor, and the confessions of the once dead. The extent of the depravity, and the depths plunged by the singularly corrupt Count, is beyond even the wildest speculations. The region is consumed by... The Shadow of the Ramlord.

Dark Craft Studios


Glenn Winkelmann Jr - Head Project Lead, Developer, Writer, Level Designer
Ian
Wiese - Lead Writer
Spelos - Lead Programmer
Karba -
Lead Level Designer
Jarod D'Camp - Lead Composer

David Bodtcher - Voice Acting Count Anton Caecea
Vacant - Voice Acting Albert Gray
Vacant - Voice Acting Countess Emilia Hall

  • View media
  • View media
  • View media
  • View media
  • View media
  • View media
Post article RSS Articles

Scripting in Amnesia

News

Hello, everyone!
I'm Spelos, and I'm the lead programmer of The Shadow of the Ramlord. In this development diary, I would like to talk about how we structure and organize our code, as well as keep it consistent throughout our codebase. While this article delves into the technicalities of programming, it also provides a few tips and suggestions to other developers or hobby mod creators. So let's get into it.

Amnesia's scripting language is very tightly coupled with Amnesia's API. That, unfortunately, means that a lot of proven methods of writing clean code do not apply. That is why I decided to write a derivative standard that tries to implement as many clean code principles as possible while keeping script files light and easy to read. The standard is public and you can find it HERE. This public standard goes into details of both styling and form of script files and proposes one of many possible structures.

Programmers read their code much more than they write it. Amnesia mod developers read Script_Functions part of the wiki much more than they read their code. Why is that?

It is because Amnesia modders have to interact with the API that Frictional Games designed. Your script is a plugin for Amnesia. That's why all of the code is dependant on Amnesia's internal signatures. Is Amnesia's API well written? Absolutely not. Can we work around it? Yes, we can.

A good example of the type of enhancement that we do to improve code readability is long function signature commenting. Take for example this extended function for creation of a particle system.

CreateParticleSystemAtEntityExt("BlueDust", "DustCloud.ps", "DustArea", false, 0.3f, 0.9f, 0.3f, 1.0f, true, 1.0f, 0.5f, 5.0f, 6.0f);

Granted, this is an extreme example, but it demonstrates the problem in a nice way. You see that 'false' boolean that's the fourth parameter? What does it do? And how does it differ from the ninth 'true' boolean? What are the floats on about?

Chances are, you would consult the all-knowing FictionalGames Wiki. What happens to a programmer when she needs to consult documentation in the middle of an algorithm? She loses flow, gets distracted, annoyed even.

We cannot completely get rid of this problem without abstracting the whole API, which is not an option given you cannot easily include other scripts inside your own and copying a few hundred lines into each of your script files isn't a good solution. And so we solved this potential issue by forcing an 80 character limit on a line and parameter comments for functions with long signatures. I mean, look for yourself, doesn't this look better?

You can now confidently say what those booleans do. And while some people would swear with their life that they remember all these parameters, since they're expert modders, I would argue that readability has more advantages.

Look at the color parameters. What color is it closest to? Green, yes. Now tell me, why is a "BlueDust" particle green? It is a bug, yes. Would you ever notice in the previous example? Most likely in the game when you see that the dust is green. Then you would go into the code look at the large function and... Well, you'd probably check the wiki to see what those parameters do. But in the readable version, you take a look at the color, go "Yep" and fix it within a few seconds.

There is a ton of small little improvements you can do to ease your development and save yourself from dealing with terrible issues. Most of these are not even specific to AngelScript. I would highly recommend a book by Dustin Boswell and Trevor Foucher called "The Art of Readable Code". There is a free online version. It includes a lot more great tips for improving your programming and making it more human-friendly.

After all, programming with other people is the best way to improve, have fun, and make something awesome together.


February Development Diary

February Development Diary

News 1 comment

A look at the first month of development for The Shadow of the Ramlord.

Announcing The Shadow of the Ramlord

Announcing The Shadow of the Ramlord

News 4 comments

A look at the next Dark Craft Studios project, The Shadow of the Ramlord.

Comments
OrganicShelter
OrganicShelter

If this mod have some custom assets, i would like to play it

Reply Good karma Bad karma+2 votes
Shyrtexx
Shyrtexx

Wow, that lighting looks good! Also gave it a track, seems good! :) I will surely play it when it gets released

Reply Good karma Bad karma+2 votes
C-zom Creator
C-zom

There's a large status update and February Development Diary ready to authorize whenever Moddb pushes it though, it talks a lot about our direction and plans.

Things have been going wonderfully in the studio, and Ramlord progress has been awesome.

Reply Good karma+2 votes
entropy_maker91
entropy_maker91

Can't wait to play Amnesia this summer! :D

Reply Good karma Bad karma+3 votes
TheGamerPro9071
TheGamerPro9071

It looks cool the new images! ;)

Reply Good karma Bad karma+3 votes
Richy:D
Richy:D

I like the lighting of your maps! =)

Reply Good karma Bad karma+2 votes
NeplyKota
NeplyKota

boom. following. looking forward to seeing where this goes

Reply Good karma Bad karma+2 votes
TheGamerPro9071
TheGamerPro9071

when is will be released?

Reply Good karma Bad karma+2 votes
C-zom Creator
C-zom

We're shooting for late Summer/Early Fall. We've been making tremendous progress in a short amount of time, expect this page to be fleshed out and detailed with more information in the next week or two!

Reply Good karma+1 vote
Post a comment
Sign in or join with:

Only registered members can share their thoughts. So come on! Join the community today (totally free - or sign in with your social account on the right) and join in the conversation.

Follow Report Profile
Icon
Amnesia: The Dark Descent
Developer
Contact
Send Message
Release date
Mod watch
Follow
Share
Style
Genre
Adventure
Theme
Horror
Players
Single Player
Twitter

Latest tweets from @darkcraftstudio

#Triptych 1.1c Final Edition is out, with all updates rolled into one full download. Thank you all for the support! Moddb.com

May 28 2017

RT @ModDB: Play @darkcraftstudio's Triptych mod for @Crysis which turns the tropical shooter into a dark Lovecraftian adventur… T.co

May 21 2017

#Triptych has released. Owners of Crysis 1 can play our free total conversion modification below. It is finished. Moddb.com

Mar 13 2017

#Triptych will release March 13th, 2017. I am excited to announce our official pre-release trailer; Youtube.com

Mar 7 2017

#Triptych has ongoing auditions for Samael, the villain of the narrative. Cast your attention over to Voiceactingalliance.com to apply!

Dec 6 2016

#Triptych Act III Near - Final Level Desig peek. T.co

Nov 24 2016

#Triptych Entrance to Sarcon -- Updated Details T.co

Oct 15 2016

#Triptych Act II Near Final Level design. T.co

Oct 15 2016

#Triptych Entrance to Sarcon T.co

Oct 6 2016

#Triptych Act II Level Design; we will go gold on it in two weeks. T.co

Oct 6 2016

Embed Buttons
Link to The Shadow of the Ramlord by selecting a button and using the embed code provided more...
The Shadow of the Ramlord
Statistics
Last Update
Watchers
20 members
Articles
3