informa
4 min read
article

Newsletter #62 - Volund Prankster

Slightly changed update system, item duping bug still present, atexit() and the CLR don't mix, new sketches, and a suspicious banker.


News

There is no news to report in this issue.


From the Testers
Written by Jay

(Click to enlarge)

A suspicious new banker in town... When did he show up?!

Using an item cloning bug found by Acaceol (and described in Newsletter #60 - "Loradon 3.0" Closed Beta), I started to clone rare items to amass a large sum of cash. Of course, doing this after the preview is released would get you banned (however, it will be fixed by then), but for now it's okay as long as we are testing it. Anyway, after buying and duping more expensive items as I went along, I ended up with 55 Talcite (the equivalent of 5,500 Gold, which is the equivalent of 550,000 Silver). That is... a huge amount of money.


From the Programmer
Written by Invisible

The update system for Volund has been in place for a while. Your client is notified if it needs to install any updates, and which exact patch to download. It then accesses the HTTP server and downloads the patch, which is an executable. Volund then runs the patch and terminates itself so that the patch can update all files. The patcher waits for Volund to close and then starts downloading the updated files from the HTTP server, saving them to the correct locations in the installation.

This works well, but unfortunately it would mean that you can download Volund without being logged into your account. To remedy this, I am creating a file transfer server for the updater (and I will most likely be able to reuse it for future projects as well). The update system will work pretty much the same, except it will now ask for your username and password before patching.

As I usually do, I am experimenting with different (and hopefully better) code designs while creating this file transfer server. One big design issue that I have ran into in the past is object lifetime. At some point in an object's update code, the object may need to be removed for various reasons (client objects need to be disconnected, character objects need to die, projectiles need to collide with something, etc). This causes a problem when later update code is executed on the removed object in the same frame. To solve this, each object has a state. When an object is in a certain state, the object's manager removes it at the end of the frame. If parts of the object must not be accessed when the object is pending removal, the code will need to check for that state and deny access if it is set.

With this new server, I am using atexit() to handle shutdown. Previously, I was using kbhit() to detect a key press, which would then execute the shutdown code. The problem with only using kbhit() to handle shutdown is that your application will not shutdown correctly if the console window is closed or your program is terminated with Ctrl+C or similar methods. Another downside with kbhit() is that if you accidentally press a key while the console window has focus, your application shuts down.

If you are using atexit() and your program is crashing on shutdown, make sure you aren't using the common language runtime. For some reason, the CLR causes atexit() to fail (at least for me) with "the string binding is invalid".


Artist's Easel
Written by GreyKnight

iScribble Sketches #20

(Click to enlarge)

(Click to enlarge)


Community Spotlight

There is no community spotlight in this issue.


Funny Quote of the Week

Background Information: GreyKnight went to sell stuff to the blacksmith, but found that the blacksmith had somehow become cloned. The game glitched when he tried to trade with the clone, causing his client to crash. When he logged back in, the clone was gone. Figuring it was just a bug, he went to the bank... To find that there was somehow a third banker.

Banker: Welcome to the bank!
Banker: Please deposit your gold here!
Message from Test to Banker: Uh... hello?
Test: That is odd...
Roarman: What?
Test: The "Banker" is talking to me
Banker: Welcome to the bank!
Turret: Sentience!
Test: Did you see that?
Turret: o:
Message from Test to Banker: Hello?
Message from Banker to Test: Welcome to the bank!
Test: Banker stole my torch 0.o
JaytheFrozen: That's not nice
Message from Test to Banker: Roarman, is that you?
Message from Banker to Test: Welcome to the bank!

Latest Jobs

Disbelief

Chicago, Illinois
05.10.22
Producer

Build a Rocket Boy Games

Edinburgh, Scotland
05.12.22
Lead Animation Programmer

Windwalk Games

Austin, Texas
05.16.22
Game Designer

Sucker Punch Productions

Bellevue, Washington
05.10.22
Campaign Director
More Jobs   

CONNECT WITH US

Register for a
Subscribe to
Follow us

Game Developer Account

Game Developer Newsletter

@gamedevdotcom

Register for a

Game Developer Account

Gain full access to resources (events, white paper, webinars, reports, etc)
Single sign-on to all Informa products

Register
Subscribe to

Game Developer Newsletter

Get daily Game Developer top stories every morning straight into your inbox

Subscribe
Follow us

@gamedevdotcom

Follow us @gamedevdotcom to stay up-to-date with the latest news & insider information about events & more