Title: Compiling with Visual Studio .NET ... Post by: Kuma on June 04, 2005, 03:28:52 pm Is it even possible?
I've tinkered around with the source, and I've made what I think are some interesting modifications - but I haven't the first clue about how to compile it with Visual Studio. Can anyone give me a place to start? Title: Re: Compiling with Visual Studio .NET ... Post by: Halleck on June 04, 2005, 10:04:20 pm I use Visual C++ .NET 2003 to compile (VC7). I sometimes have issues, but I have gotten it to compile correctly.
First, make sure you have all the required libraries, and tell VC where to find them. Read the INSTALL file for a list of these. EDIT: Also, I'd reccomend compiling an unmodified copy first, to make sure all your libs and include directories are set up correctly. Then, you will be able to tell the difference between VC++ screwing up and your modifications causing errors. Title: Re: Compiling with Visual Studio .NET ... Post by: harth1026 on June 05, 2005, 07:30:22 pm What kind of errors are you getting? I too am using the .NET compiler so maybe I can help...
Title: Re: Compiling with Visual Studio .NET ... Post by: abcminiuser on June 26, 2005, 07:49:59 am I need som help with this also. I've downloaded and compiled all the components, but .NET now goes ape when I try to compile:
Ideas? The OGG .lib files seem to have compiled OK. - Dean :twisted: Title: Re: Compiling with Visual Studio .NET ... Post by: harth1026 on June 28, 2005, 01:43:37 am Part of the problem appears to be that you didn't tell Visual Studio where the Ogg Vorbis libraries are.
In the menubar, select Tools->Options... In the Options dialog, select Projects->VC++ Directories In the top right, it'll have a pulldown menu called "Show Directories for"... Select "Include files" Add the entry "C:\Oggvorbis\Include" or whatever path the include files are in. Now go back to the pulldown menu and select "Library files". Add the entry "C:\Oggvorbis\Lib". Change where necessary. After all that, recompile the code. Most of those linker errors should be gone... I'm not too sure why you're getting "already defined" errors though... Title: Re: Compiling with Visual Studio .NET ... Post by: Halleck on June 28, 2005, 05:21:13 am You actually need to follow harth's instructions for EVERY required lib/include package you download. Also, keep in mind that most of them need to be dev versions in order to work.
Title: Re: Compiling with Visual Studio .NET ... Post by: abcminiuser on June 28, 2005, 02:35:07 pm Hmm, I defined all the libraries I could find, must have missed the OGG one. No matter; I've got the binaries and only wanted to compile the source code so I could make changes/additions. After looking at the code I've decided to scrap that idea and create a new game ("Star Control 2.5", even though I HATE Star Control 3) with the SDL libraries et al. The SDL library is fantastic, isn't it! I've always wanted to make a proper game, just never found the right language and libraries to do it in, no I have.
- Dean :twisted: Title: Re: Compiling with Visual Studio .NET ... Post by: harth1026 on June 28, 2005, 09:31:01 pm Starting a new game like Star Control 2 from scratch will take a lot of time and dedication plus existing knowledge of game programming. My goal is to make an SC1 game using parts of the UQM code. Although I'm dedicated, I have little time and I'm just starting to learn the basics of game programming. If you don't have much experience with game programming, I recommend that you start off with small games that are similar to your goal. You may want to try making an Asteroids style game first and then build from there.
A good tutorial for making an asteroids game can be found at the following site. Although I couldn't get the code to compile without some work, the class structures he used gave me a better understanding how to make a game of this type. http://vcg.iei.pi.cnr.it/~cignoni/a_steroid/ Title: Re: Compiling with Visual Studio .NET ... Post by: abcminiuser on June 29, 2005, 06:16:07 am Nah, i've never listened to the experts before. I taught myself Visual Basic many years ago, then taught myself C last year. Going against all the experts advice for the latter language, I mamaged to produce a very complicated and *working* project.
I don't have much gaming experience, but I do write C for embedded systems - small microcontroller ICs. That involves a lot of abstract thinking on the best way to acomplish a task with the minimum amount of code, and also multiple threads when using a Real Time Operating System - similar to the SDL libraries's threads. Worked out how to implement all the music, text image and main SDL libraries now. I've made most fo the helper C files and got the main menu working as a test. I though threads for the Melee is the best way to go - a thread per bullet and ship, what do you think? I could make it to inline, just seemed the best and easiest option. - Dean Title: Re: Compiling with Visual Studio .NET ... Post by: meep-eep on June 29, 2005, 08:02:02 am Quote I though threads for the Melee is the best way to go - a thread per bullet and ship, what do you think? I could make it to inline, just seemed the best and easiest option. While one thread per object may closest resemble the intuitive idea, in practice it's probably the worst way to do this. There's a large overhead in context switching, and synchronisation would be a lot of work and would have its own overhead (which would be a lot as you'd need to synchronise frequently). How I would suggest you handle processing intead is to keep a list of all active objects, and process them one by one. Running at a fixed frame rate is easiest, as you can use "distance per frame" as a unit for speed. This is how UQM works. You could also use a dynamic frame rate, and process as often as you can (or want), multiplying speed by the time elapsed since the last update to get the distance to move. Title: Re: Compiling with Visual Studio .NET ... Post by: harth1026 on June 29, 2005, 08:24:25 pm Quote Nah, i've never listened to the experts before. It's a good thing I'm not an expert... ;) Title: Re: Compiling with Visual Studio .NET ... Post by: abcminiuser on June 30, 2005, 05:57:42 am *Sigh*. Ok, Ok, i'll give the asteroids game a look. I've managed to write the interface routines with the SDL, SDL Image, SDL Mixer and SDL Draw libraries so i'm finally ready to start. Made the main menu as a test, all works well.
- Dean :twisted: Title: Re: Compiling with Visual Studio .NET ... Post by: Dean on July 12, 2005, 12:38:59 pm So how would I go about "linking" the melee modules together? I'm able to program all the modules (like physics handler, keyboard handler, ship position updater, etc) but i'm at a loss as to put it all together. Normally i'd use said threads, but at the moment i'm resorting to using rather crude IF checks to ensure each routine is only executed after a specified millisecond elapse. This works OK (for now) but when I put in all the bullet handling routines this definetly wont work (well).
Writing dynamic routines - so that the routines could be executed as many times as possible without speeding up/slowing down the game - is possible for me, but it just seems like a hassle. How would I go about implementing a fixed run rate for each routine, like a simple task sheduler? - Dean Title: Re: Compiling with Visual Studio .NET ... Post by: meep-eep on July 12, 2005, 02:04:09 pm Something like this perhaps for a main loop (pseudocode):
Code: while (!exit) { timeIn = getTimeMilli(); checkInput(); updatePositions(); outputGraphics(); sleepMilli((1000 / frameRate) - timeIn); } Title: Re: Compiling with Visual Studio .NET ... Post by: abcminiuser on July 13, 2005, 02:07:27 am Oh. I coded in a simple task switcher yesterday - it works fine.
Each task is added with a function name and a timeout: MeleeTaskHandler_AddTask(Melee_PlayerKeyHandler, 20); The above code would tell the program to run the "Melee_PlayerKeyHandler" function every 20ms (or more, depending on machine speed). I decided to put a limit on the number of tasks, at 30. The main loop then calls the MeleeTaskHandler_CheckTasks routine, which checks the current SDL ticks, and then see if it should run any of the tasks. If a task is run, it's .NextTimeout tag is set to the current SDL tickcount + the timeout for the current task. It all works quite well. If the tasks are offset, then the whole thing runs nicely at 700MHz- will have to stress-test on all 30 tasks. Figuring out all the physics and such from scratch is difficult, but i'm going well and i'll have one hell-of-a sence of achievement when the whole thing's done. Anyone interested in submitting ship pictures/designs/music etc. once I have somthing to show for myself? Unlike TimeWarp and other projects, this will be a proper adventure game with a new and exciting(?!) story and BALANCED SHIPS. Stay tuned. - Dean Title: Re: Compiling with Visual Studio .NET ... Post by: Halleck on July 13, 2005, 09:01:22 am Sounds interesting. I'm a perfectly mediocre 3d modeller... if nobody else with more talent volunteers I would be happy to donate some ships.
Title: Re: Compiling with Visual Studio .NET ... Post by: Dean on July 13, 2005, 03:18:09 pm Hey, every little bit helps! I'll tell more once I finish the melee. I want to get the melee finished before starting on the actual game.
- Dean Title: Re: Compiling with Visual Studio .NET ... Post by: Dean on July 24, 2005, 08:28:04 am Hello!
Another small(>:() problem. I'm making my own game now from scratch inside C++.net. I can build my debug versions fine so I can test it as I write on my own computer, but when I try to build a release to test on another computer, the linker goes banannas. Before anyone asks, all the libraries are referenced correctly (I believe, at least the debug works) and i've set the mode to Multithreaded DLL as per the SDL FAQ. For reference, I'm using a lot of SDL libraries; SGE, SDL Draw, SDL Mixer and a few others. I've wacked the full built output in a text file at http://home.pacific.net.au/~sthelena/General/SC25BuildLog.txt but the gist is a LOT (88) of "Unresolved External Symbols". Ideas? - Dean Title: Re: Compiling with Visual Studio .NET ... Post by: rk on September 21, 2005, 04:17:02 am I've compiled under Visual Studio 2005 Beta 2, too. It was a defnite P.I.T.A. to get it all tied together, but it is possible. Once you've got the includes and lib directories all sorted out, you also need to get the update to the regex file that's in the CVS vault (note that it's tagged with something about "Visual Studio 2005 Beta 2").
I wrote an article in here a year ago, "Compiling the source for dummies", or something like that, which worked with the UQM 0.3 version, and it's a good starting point for how to get the latest one to compile (some changes required, though). |