Jump to content
  • 0

Coding, testing and debugging questions


Nanako

Question

I've done enough theoretical poking around in code, now i'm attempting to compile and test things out, having downgraded my byond version to make the development branch compile


Everything seems to work just fine. I can compile an executable, host a local server in dream daemon, connect to it, and do stuff.


However, i have a lot of oddities and useability issues that i'd like some advice on:


1. Testing code changes. Right now the only way i can see to test things is to compile a binary, host a local server in dream daemon, connect to it, adminstart the round, and check things there. This process takes 5-10 minutes each time. Isn't there some quicker way to test things?


2. Debug messages. What's a good way to send messages to the client to report on things. So far i'm just using user.visible_message, which works i guess, but feels unsuitable


3. dmb security settings. Whenever i try to open a dmb by running it directly from the file explorer in windows, or by using Run in the build menu within dream maker, i get spammed by messages

 

GGJ4E8O.png

 

As far as i can tell this is because it's running in ultrasafe security mode, but why? And why is it asking for permission to access things inside .git folders anyway, those are related to github and not directly to the code. the more i answer yes to, the more come up, and i'm not sure if things will work right if i decline them.


any way to change the default security setting?


4. Whenever i attempt to save a character setup on my local server, dream daemon crashes. Maybe something to do with not having a place to save files, but what can/should i do about it?

Link to comment

8 answers to this question

Recommended Posts

  • 0

3. dmb security settings. Whenever i try to open a dmb by running it directly from the file explorer in windows, or by using Run in the build menu within dream maker, i get spammed by messages


Rename the folder that contains the source to the name of your .dme/.dmb


So: Aurora.3 would be renamed to baystation12, to bypass the security checks.

Link to comment
  • 0

You need to go into config/example and move all the files in their into Config folder. Next you should be opening Dream Daemon directly in byond, then opening your .dmb in there running it in trusted mode, It'll save you from having to press yes to all the security checks.

Link to comment
  • 0
1. Testing code changes. Right now the only way i can see to test things is to compile a binary, host a local server in dream daemon, connect to it, adminstart the round, and check things there. This process takes 5-10 minutes each time. Isn't there some quicker way to test things?

Not really, the only way you can reliably do it is via that method. If you want to be thorough, you're going to have to dedicate a good 20-30 minutes to trying to break anything new or different.


Most people skip detailed testing phases, and this is why things can quite often break with major code alterations. My advice, have fun whilst doing it, if you just rush through it you're going to miss more details than you otherwise would and skipping it entirely is a poor decision. There's really no way to speed up the server startup either, so one just has to get used to it.

Edited by Guest
Link to comment
  • 0

In practice, you should always compile and test a feature that you coded yourself before pushing a commit to the git. If you're not making sure it works, why're ya coding it, ya know?

Link to comment
  • 0

thanks for the replies guys. I've got everything working now. Good tip superballs, that worked perfectly. Special thianks to arcbot for teaching me the ropes


@1138 yes i always test anything i do before submitting it, no worries. I'm very careful about not creating new bugs

Link to comment
  • 0

1. Testing code changes. Right now the only way i can see to test things is to compile a binary, host a local server in dream daemon, connect to it, adminstart the round, and check things there. This process takes 5-10 minutes each time. Isn't there some quicker way to test things?

Unless you're touching the map or icon files, you can keep the DreamDaemon server running while you're compiling. So: test old changes, keep server running, make new changes, compile, admin issue a restart command, wait for server to restart, and voila, you're on newer code once it's booted again. The more advanced version is to use semantic linking, which will permit you to also edit map and icon files.

 

2. Debug messages. What's a good way to send messages to the client to report on things. So far i'm just using user.visible_message, which works i guess, but feels unsuitable

I personally use the testing() proc. This feeds messages into the DreamDaemon window directly. Helps that I have 4 screens, so I can have DreamDaemon visible on one, and the actual testing game on another. but all of the ones I'll list below work, and since you remove them before committing, whatever you use is personal preference. If you must include debug info in live code, use log_debug(), or was it debug(). I forget.

 

testing(var/string)
world << "text"
admin_msg(var/string)
debug(var/string)

 

3. dmb security settings. Whenever i try to open a dmb by running it directly from the file explorer in windows, or by using Run in the build menu within dream maker, i get spammed by messages

On DreamDaemon. Change this: http://puu.sh/p20k9/966d617286.png to this: http://puu.sh/p20kz/4f42102188.png

Link to comment
  • 0

Thanks for the reply skull, some interesting info there


I've found the method that works best for me at least, first of all superballs's suggestion allows it to run in safe, instead of ultrasafe mode by default.


Then i just use the Run option from within dream maker. In two clicks it compiles the code, launches a server, launches a client, and conenects me to it. So i can go make a cup of tea for 5-10 mins while everything loads, and come back when i hear the lobby music

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...