Welcome to the Builder Academy

Question Visual Studio 2013

More
13 Nov 2014 12:28 #5116 by Rumble
Visual Studio 2013 was created by Rumble
I have heard many good things about this IDE but never got around to using it. I'm finally trying it since it is free and can import the tbaMUD github repository.

Download Vizual Studio 2013 for free here.

Rumble
The Builder Academy
tbamud.com 9091
rumble@tbamud.com

Please Log in or Create an account to join the conversation.

More
15 Nov 2014 19:42 #5122 by bazookia
Replied by bazookia on topic Visual Studio 2013
I was actually attempting to create a project for visual studio to run/compile/manage my code for tbaMUD, because it seems easier than my alternative which is notepad++ and a gcc compiler on a unix machine. I thought I would add to this post to the thread with my experience and some comments that others might find helpful who are new to MSVC2013 or may be experiencing the same issues as I.

I downloaded the latest release of tbaMUD a couple of days ago and attempted to create a solution in MSVC2013. I was able to get it to compile and run using the instructions for MSVC2008 in the doc/ directory and the conf.h.msvs file. For anyone attempting to create a project for tbaMUD in MSVC2013, I will note that as Rumble said, there are great features for cloning/checkout/checkin to a github repository.

Another way to setup the project is to use the “Create project from existing code” option after downloading the release and having it import the src directory. However, I would I would recommend not including the code from the src/util directory. This is because for every project in a solution, you can only compile one executable. I found the workaround to this is to create a new project inside of your solution for the code in the util folder (such as autowiz), import the source for the utility, and then add a reference path in the project settings to the src/ directory. There are also settings to change where the .obj and .exe files are output in the project settings, if you would like all your executables to dump in the bin/ directory or something like that.

A few things I noticed were that anytime a DG script was executed, particularly a greeting script, the MUD would crash. Not sure what the cause is, but to be honest I only looked into it for about 15 minutes and it gave some kind of memory error during debug. However, using the makefile in Cygwin produced a stable release, so I’m thinking it is likely something setup incorrectly in MSVC2013 or some weird windows issue.

I’m going to keep trying to get a functional/stable MSVC2013 project solution working for the current tbaMUD release to post for others to use. However, if anyone else has already done this, it would be pretty awesome if you would share so others can see the general setup of the entire solution.

-Bazookia

Please Log in or Create an account to join the conversation.

More
16 Nov 2014 09:51 #5124 by zusuk
Replied by zusuk on topic Visual Studio 2013
I'm just too use to Netbeans right now to switch :P Can't teach this old dawg new tricks :P

We use SVN too, and the interface between the two systems has been simply awesome for me :)

(It is obviously relative since I use to do all my coding in PICO)

-Z

Website
www.luminariMUD.com

Main Game Port
luminariMUD.com:4100

Please Log in or Create an account to join the conversation.

More
18 Nov 2014 11:55 #5126 by Ornir
Replied by Ornir on topic Visual Studio 2013
Another NetBeans user here, although I will say that MSVS is a good IDE.

I am sure MSVS can integrate just fine with SVN, just like every other IDE worth its bytes. I am an old vi-user (I JUST switched to NetBeans, I was doing all of my mud coding using vi on the server for 2+ years) and I gotta say i still miss the command line powah sometimes.

- Ornir Elunari (Ripley)

Luminari - a Pathfinder/D&D inspired adventure!
www.luminarimud.com
luminarimud.com 4100

Please Log in or Create an account to join the conversation.

More
01 Feb 2015 00:35 - 01 Feb 2015 02:44 #5218 by Rumble
Replied by Rumble on topic Visual Studio 2013
Thanks to Fade for configuring the latest 3.66 release to work with Microsoft Visual Studio. It is available in the tbamud/patches section as tbaMUD 3.66 changes for Windows.

And for also finding a crash bug in Windows. Uploaded to github.
Code:
diff --git a/src/dg_triggers.c b/src/dg_triggers.c index f721023..d48c754 100644 --- a/src/dg_triggers.c +++ b/src/dg_triggers.c @@ -202,6 +202,7 @@ int greet_mtrigger(char_data *actor, int dir) char_data *ch; char buf[MAX_INPUT_LENGTH]; int intermediate, final=TRUE; + struct trig_data *next_trig; if (!valid_dg_target(actor, DG_ALLOW_GODS)) return TRUE; @@ -212,8 +213,9 @@ int greet_mtrigger(char_data *actor, int dir) AFF_FLAGGED(ch, AFF_CHARM)) continue; - for (t = TRIGGERS(SCRIPT(ch)); t; t = t->next) { - if (((IS_SET(GET_TRIG_TYPE(t), MTRIG_GREET) && CAN_SEE(ch, actor)) || + for (t = TRIGGERS(SCRIPT(ch)); t; t = next_trig) { + next_trig = t->next; + if (((IS_SET(GET_TRIG_TYPE(t), MTRIG_GREET) && CAN_SEE(ch, actor)) || IS_SET(GET_TRIG_TYPE(t), MTRIG_GREET_ALL)) && !GET_TRIG_DEPTH(t) && (rand_number(1, 100) <= GET_TRIG_NARG(t))) { if (dir>=0 && dir < DIR_COUNT)

Rumble
The Builder Academy
tbamud.com 9091
rumble@tbamud.com
Last edit: 01 Feb 2015 02:44 by Rumble.
The following user(s) said Thank You: bazookia

Please Log in or Create an account to join the conversation.

More
02 Feb 2015 06:07 - 02 Feb 2015 07:12 #5222 by bazookia
Replied by bazookia on topic Visual Studio 2013
Hi all,

If you get this error:
Code:
C4703: potentially uninitialized local pointer variable 'pMudEvent' used d:\msvc_projects\tbamud-3.66\src\mud_event.c 2621

You can fix it by turning off "sdl" in the compiler settings. Right click on the project, click properties.

Click following:
Configuration Properties -> C/C++ -> General
Under general change SDL checks from "Yes" to "No". Then it should compile without any problems.
(All additional information goes thanks to Fade!)
::EDIT::
If you are still experiencing crashes, remove trigger #82 from the 0.trg file
Code:
tstat 82 Name: 'Obj Timer Example', VNum: [ 82], RNum: [ 82] Trigger Intended Assignment: Objects Trigger Type: Timer , Numeric Arg: 100, Arg list: None Commands: * By Rumble of The Builder Academy tbamud.com 9091 * This object will disappear once its timer value reaches 0. %echo% The ice cream melts away. %purge% %self%

::EDIT2::
Mail Crashing
If mail is crashing when a player tries to receive it from the post master, add this definition to conf.h (the conf.h.win included in patch above).
Code:
#define _USE_32BIT_TIME_T 1
Last edit: 02 Feb 2015 07:12 by bazookia. Reason: grammar

Please Log in or Create an account to join the conversation.

Time to create page: 0.220 seconds