Pages: 1 2 [3] 4
|
 |
|
Author
|
Topic: Starcon with UQM ships (Read 13496 times)
|
|
|
|
Culture20
Enlightened
    
Offline
Posts: 917

Thraddash Flower Child
|
Man, my last post got shot off the bottom of the page so fast with someone who posted like 20 reply posts in one day.
However, I have a question that I believe goes in this thread.
To make a sc1 3-d randomly generated map, How? See, how do you make the stars so that they are close enough to each other without crossing into other planetary lanes? Am I making sense.
What I'm asking is on a technical level how would one generate a 3-d planetary map like in Sc1? As the code for sc1 is gone I suppose the answer is "any way that you want," but as my programming expertiese is rusty and wasn't that good to begin with, I need someone else to go "It was probably done like ...." And that's what I'm asking for.
I'm using the following evil/naive algorithm (which isn't even complete:
//generate navpoints loop for (the amount of nav points) generate random navpoint in 3D space loop while (navpoint just created is outside max_radius) remove navpoint generate random navpoint in 3D space end loop end loop
//then, connect all navpoints within range of each other //every navpoint is assured to be within range of a group, //so that all navpoints will be connected by one or more edges. TODO
loop for(the amount of navpoints (a)) loop for(the amount of navpoints (b)) if(navpoint in loop (a) is not same navpoint in loop (b) AND if navpoint(a) is within range of navpoint(b) AND if they aren't already connected) then add (b) to (a)'s connection list end if end loop if it's not near enough to any other stars, then connect it to the nearest star end if end loop
Just noticed this thread. Orz from the Timewarp project had an SC1 knock-off he named TACT that used the most recent unnofficial timewarp beta (0.05u5) for its melee engine. That beta's quite old, so we're in the process of updating TACT (sporadically). It's embarassingly incomplete right now since I sort of gutted it and started over for the graphics stuff last December. It's using a GL library that allows openGL functions within allegro (allegroGL). For anyone who's concerned that the 3D starmap will hurt their head again, let me assure you that in its current state, you can twist the starmap any way you wish, zoom, and turn off and on the auto-rotate. You can also cause all of the starlanes to become visible or invisible at will (there are plans to create fog-of-war and explorable starlanes). I don't have anything publicly available yet (because of the "embarassingly incompleteness"), but if anyone who knows openGL and/or C++ wants to help, hop onto http://www.classicgaming.com/starcontrol/timewarp/, click the Channel44 link, sign into our forums, and message Baltar2002 or one of the other Teammembers. We always appreciate new coders. Now that I know that graphics work, I can work on using good algorithms and incorperating Orz's old code.
I would simply create a rectangular grid with the right topology, then apply repulsive forces to the nodes, and apply a relaxaion algorithm it until it was nice and smooth. Note that we wouldn't need to cook these up, as there are standard, free libraries which will do this kind of stuff in microseconds.
I have no idea what you're talking about since I'm not a 3D programmer. Do you know which libraries might be better than others (is this stuff already in GL, GLU or GLUT)?
|
|
« Last Edit: April 10, 2003, 05:23:55 am by Culture20 »
|
Logged
|
|
|
|
Death 999
Global Moderator
Enlightened
    
Offline
Gender: 
Posts: 3876
We did. You did. Yes we can. No.
|
Your algorithm has the possibility of creating two nav-points very close to each other.
Also, the libraries I'm talking about are not graphics libraries, they're number crunching. Essentially, you say, "I want this board to be equivalent to this graph" say,
and then you tell the library to 'relax' this graph until it's a nice, natural-looking arrangement of stars in 3D rather than a rectangular grid in 2D. Of course, initial graphs need not start off with neat 2D representations.
Once the grid has been relaxed, the library returns a series of X,Y,Z coordinates. Put a star at each of those coordinates, and send THAT to the graphics library.
|
|
|
Logged
|
|
|
|
guesst
Enlightened
    
Offline
Gender: 
Posts: 692

Ancient Shofixti Warrior
|
Death_999, my man, who are you? You have all the answers I'm looking for. You're "grid relaxed to a 3-d map is what I believe SC1 did. To support my hypothesis, try finding ANYWHERE on a SC1 map that let you go more than 4 places. Eh? can't find one. What would blow this out of the water is if you find a triangle of stars. However, I feel this solution would work perfect as far as allowing random maps or purposefully designed space maps. Tell me, in your opinion, what's the best compiler for making a game in (Windows, 3-d?).
|
|
|
Logged
|
|
|
|
|
Azzizi
Zebranky food

Offline
Posts: 10

I love YaBB 1G - SP1!
|
Tell me, in your opinion, what's the best compiler for making a game in (Windows, 3-d?).
I would go with MSVC 6.0. Two reasons:
First, windows. MS, given that they sort of own Windows, makes a very good IDE/Compiler for Windows apps. (I mean, who wouldn't expect that?) In my experience, you tend to get a bit better performance and stability out of MSVC apps under windows, because it was specifically designed to build them.
Second, because if you plan to do a game, given the sorts of hardware on the market(especially for 3D work), it's best to give the user as many options for taking advantage of their hardware as possible. Which, to cut to the chase, means that ideally, you really want to offer the choice of OpenGL, Direct 3D, and pure software rendering if possible. Some cards just work better under OpenGL or DirectX, and some heavy-processor systems will get best results out of software rendering, though that's probably the least necessary (and hardest) of the three to implement. So, MSVC is a good choice at that point because the DirectX API was designed to work with it, and OpenGL isn't really any worse off than anything else.
Finally, MS or no, it's just a very nice IDE. Say what you will about Microsoft, but there are a few places where the company turns out very, very nice products, and their developer tools are generally one of them.
I will admit to a slight touch of pseudo-hypocrisy here, because I do all my code in DirectX but not OpenGL. This has more to do with the fact that getting good at using two different APIs at the same time is confusing and vaguely foolhardy, though.
|
|
|
Logged
|
|
|
|
chmmravatar
*Many bubbles*
  
Offline
Posts: 109

WHAT IS DONE IS DONE
|
I would go with VC++ .NET (7). In general, the GUI is a little more intuitive, and plus it has some nifty run-time checks when debugging. Of course, DON'T use managed C/C++. That's just an all-around bad idea. DX versus openGL, I'd just say openGL because it's portable. Anyhow, if you haven't programmed in a long while, you're in for quite the ride. Console apps are one thing, but this isn't a console app .
|
|
|
Logged
|
|
|
|
|
ScreamingTemporalDoom
Guest
|
I would NOT suggest MSVC or .Net. Both of these are horrible compilers in my experience. First off, they're very expensive. Secondly, their standards support is extremely lacking. They also have a whole heap of compiler bugs which are difficult to detect and work around. MSVC IDE sucks in a big way. .Net is better, but not by much. In addition, both of these are INCREDIBLY HUGE for a compiler and IDE. And .Net requires a multi-megabyte runtime file which only comes with Windows XP and above, meaning you'd have to distribute it with the exe if you plan to have the thing work with Win95, Win98, WinME, and Win2000.
In my opinion, the Dev C++ compiler from www.bloodshed.net is far superior. It uses GCC for the compiler and the MingW windows libraries to link to Windows. It doesn't produce quite as fast code as MSVC, but it's still no slouch and will probably be undetectable to most people. It is also 100% Free, both in code and in cost. Dev C++ also comes with an integrated CVS client as an added bonus (although you must still get the CVS exe elsewhere).
|
|
|
Logged
|
|
|
|
chmmravatar
*Many bubbles*
  
Offline
Posts: 109

WHAT IS DONE IS DONE
|
And .Net requires a multi-megabyte runtime file which only comes with Windows XP and above, meaning you'd have to distribute it with the exe if you plan to have the thing work with Win95, Win98, WinME, and Win2000.
Actually, this is only if you use Managed C/C++. If you compile a normal win32 app, you don't need the .NET runtime. You do however, need a more up-to-date MFC dll if you plan on using MFC (but you can just choose not to, and in the case of a game you probably don't want to use MFC, anyhow).
Yes, they are expensive (if you have to pay for them, in my case I didn't because it's free through my school), but I disagree that they're "horrible" IDEs. DevC++ is free, but that's really the only thing it has on Visual Studio .NET. My install of .NET IS about 1.5gb. But almost all of that (about 1.2gb) is the MSDN stuff. You can find almost anything you need to know about all the windows API functions, all the directX stuff, basically everything you need to know to do successful windows programming. Granted, most of that you would not need for the game, so then just don't install it.
Also, the speed issue is a big deal in the case of a game, because you want to have optimized code. Also, the compiler "bugs" you refer to are almost always not really "bugs", per se, but just a different, not really ANSI C/C++ standard. The only time I've ever had problems is when I'm messing with #pragma directives, which I really don't recommend doing anyhow.
Anyhow, if you plan on doing any sort of actual windows programming, you really need to use a Visual C++. I don't think UQM even compiles with Dev C++.
|
|
|
Logged
|
|
|
|
guesst
Enlightened
    
Offline
Gender: 
Posts: 692

Ancient Shofixti Warrior
|
Okay, since this has become a programming discussion, I have a graphical question. The graphics on Timewarp are basicly the same as SC1/2 except higher res with more rotations. The advantage of this, though, is that the ships can be really pretty like with shadows and everything. If 3-d graphics were employed for the ships (and I've seen a few projects that do this) why doen't they ever have a dynamic shadow map casting the fins shadows on the body of the ship or the like? Is that sort of thing really that processor intensive?
|
|
|
Logged
|
|
|
|
guesst
Enlightened
    
Offline
Gender: 
Posts: 692

Ancient Shofixti Warrior
|
Time to resurect another thread.
Hey new guys? What do you think of this idea. Would you like to play SC1-type full game with UQM ships?
What about adding converstions and goals other than kill all enemy? What goals would you add? What do you think of the ones already mentioned?
|
|
|
Logged
|
|
|
|
Death 999
Global Moderator
Enlightened
    
Offline
Gender: 
Posts: 3876
We did. You did. Yes we can. No.
|
Goal: Recovery. Take a ship to a particular (known) planet, then get it back to your starbase.
Goal: Rendezvous. You start off with split forces; get all forces back to your starbase.
|
|
|
Logged
|
|
|
|
Pages: 1 2 [3] 4
|
|
|
|
|