The Ur-Quan Masters Home Page Welcome, Guest. Please login or register.
Did you miss your activation email?
November 06, 2024, 05:35:17 am
Home Help Search Login Register
News: Celebrating 30 years of Star Control 2 - The Ur-Quan Masters

+  The Ur-Quan Masters Discussion Forum
|-+  The Ur-Quan Masters Re-Release
| |-+  General UQM Discussion (Moderator: Death 999)
| | |-+  Star Control 1: Thoughts, Impressions, etd.
« previous next »
Pages: 1 [2] Print
Author Topic: Star Control 1: Thoughts, Impressions, etd.  (Read 6913 times)
Adam
Guest


Email
Re: Star Control 1: Thoughts, Impressions, etd.
« Reply #15 on: January 25, 2006, 02:30:09 pm »

Hey all, I just read this forum and wanted you all to know I too love the idea of the strategy game.  I actually started a remake of the strategy section about 3 months ago!  I have the interfacec taken care of as well as the general shell of the game.  I am currently working on the map generation.  It is proving to be more difficult than I originally thought b/c I went into the project wtih the goal of making two changes:

1) The map won't be 3d or rotating (I know it was cool but this will save a crap load of time and provide the same strategy elements).

2) There will be 2-4 players supported.  To clarify, the strategy portion will be up to 4 players.... the melee combat will still take place between exactly two players.  The idea here is simple actually... as I'm sure everyone knows any randomly generated sc1 map has a central star which combines the two arms or spirals of the galaxy... this is still the case however there can be up to four spirals/arms.  The top and bottom spiral/arm are always generated for players 1 and 2.  The left is generated if the game is set to 3 or 4 players (for player 3 to start in) and the right is only generated if the game is set to 4 players (for the fourth player to start in).

With all that being said,  I have kept the same prices/build time/destroy time/income levels for everything to try to keep it as close to the original as possible.  I recently moved to Atlanta from Columbia, SC and started a new job so I haven't worked on it in about 3 weeks.  I was looking through some code last night when I decided to post something about it here today.  I am going to try to get in touch with the timewarp team to see if they would be interested in using their combat system for that part of the game.  It didn't occur to me until now that that may be an option.  I actually started making this game before I knew timewarp existed....  Anyways, their game is very well done and looks great as well.  It would be nice to use it for the battles since that is the hardest part to program and I don't have as much time anymore after starting this new job in Atl.

I'll check back here soon to see if anyone has any questions/ideas for me.

btw-I'm using C# to code the game in vs.net 2005.
Logged
Death 999
Global Moderator
Enlightened
*****
Offline Offline

Gender: Male
Posts: 3874


We did. You did. Yes we can. No.


View Profile
Re: Star Control 1: Thoughts, Impressions, etd.
« Reply #16 on: January 25, 2006, 06:31:29 pm »

Have you looked through the old SC1 threads? There were some others building such a thing, and I presented a few ideas on map-generating algorithms; they were well-received, so I suspect they might be good ones.
Logged
Adam
Guest


Email
Re: Star Control 1: Thoughts, Impressions, etd.
« Reply #17 on: January 26, 2006, 04:34:11 pm »

I will check it out!  I may redo it if you had a better idea than mine.  I actually have all the stars generating fine, randomly (with exception of mid star), and not too close together.  The complicated part is connecting them all, or determining which ones can travel directly to which ones.... and then making sure that there is a path from each to the middle.
Logged
Death 999
Global Moderator
Enlightened
*****
Offline Offline

Gender: Male
Posts: 3874


We did. You did. Yes we can. No.


View Profile
Re: Star Control 1: Thoughts, Impressions, etd.
« Reply #18 on: January 26, 2006, 04:56:40 pm »

That is precisely the problem I addressed. I didn't make my algorithm for more than 2 players, but it should be extended easily.

http://uqm.stack.nl/forum/index.php?topic=1111.45
« Last Edit: January 26, 2006, 04:59:08 pm by Death 999 » Logged
Censored
Enlightened
*****
Offline Offline

Gender: Male
Posts: 627


Somewhere, between the sacred silence and sleep.


View Profile
Re: Star Control 1: Thoughts, Impressions, etd.
« Reply #19 on: January 26, 2006, 09:01:07 pm »

I'm just finishing a course in Data Structures and Algorithms, and we had quite a few methods for creating trees, graphs, searching them and whatever else you want. I hate this course.

However (unless you took it yourself), I can help you with algorithms for computer AI to choosing paths, for example. I also think creating the star map might be even easier then you'd think if you were (are?) using a tree data structure or graphs (a more formal approach to what Death999 suggests in his algorithm).
Logged

"You boldly enter our space! Approach this Dreadnought as though it were a recreation base and then play the dumb hominid?
Who do you take us for, Captain... Spathi!?"
GeomanNL
*Many bubbles*
***
Offline Offline

Gender: Male
Posts: 167


I love YaBB 1G - SP1!


View Profile
Re: Star Control 1: Thoughts, Impressions, etd.
« Reply #20 on: January 27, 2006, 12:55:19 am »

I have an idea too (had it for a long time, but haven't tried it out yet). The idea is that you subdivide your area in ever finer pieces, and update paths between the stars each time you refine the map.

Step 1 (start):
create 4 points on the boundaries of the map, and create 2 triangles.

Step 2 (iterative):
Each triangle has a certain area, calculate that value for all triangles. Choose randomly one of the available triangles, weighted by their area.

Step 3.
Choose a random point inside your selected triangle. Note that you can choose 2 legs of the triangle, and choose randomly a point on those two. Then use the point in-between the two. In addition, you have to do additional scaling to get a uniform choice (because the legs are not parallel) - you've to take the root of the chosen position, the position being scaled between 0 and 1, if I remember correctly and hadn't made a mistake.

Step 4.
Reconnect the new point inside the triangle to the points of the neighbouring triangles. It may turn out, that one of the existing sides of the triangle you are in, is pretty long, compared to what would happen if you'd delete that side and connect your point to the opposite corner of the neighbouring triangle. You've to add/delete the sides to get the short ones.

Repeat this over and over, and I think you'll get a nice map, with shortest paths. If you want to try this, let me know the result please. In any case, I'm going to try this some day myself.
Logged
taltamir
Frungy champion
**
Offline Offline

Posts: 63



View Profile
Re: Star Control 1: Thoughts, Impressions, etd.
« Reply #21 on: January 27, 2006, 09:12:32 am »

at first I ran it on dosbox.. but then i accidently ran it straight from winXP pro and it ran without any issues (that I can recall) with 0 emulation...

As for reconstructing the game in Ur Quan, I think its possible and should be done...
The original game was so simple, I think I can write down most of the rules and info from memory (and the rest can be gotten by running the original game). All it has to do is call on the current super melee system for its space battles, the rest would be easy...
Logged
Adam
Guest


Email
Re: Star Control 1: Thoughts, Impressions, etd.
« Reply #22 on: January 27, 2006, 03:22:41 pm »

Thanks for the link death....  also the rest of you for helping.  Yeah, that data structures and algs class was a pain but important... I took it I think 4 or 5 years ago.

I think I am gonna try death's method it looks real good.  I will post a screenshot sometime this weekend (would right now but am at work) of a randomly generated galaxy w/ my current alg.  I will make sure to post a shot of 2, 3, and 4 player galaxies.  Once you see that it will be obvious why the clever triangle method mentioned wouldn't work for me.  I have the 4 players starting somewhere on each edge of the screen (and must go thru mid to get to each other), not the 4 corners of the screen..... also I plan on getting everything fully up and running before I even consider implementing any AI.  I will probably try for network support before AI as well.  I really am more interested in being able to play 2-4 humans in the strategy game.....

Thanks all, keep throwing me any ideas u come up with and look back throughout the weekend for the screenshots!

Adam
Logged
Censored
Enlightened
*****
Offline Offline

Gender: Male
Posts: 627


Somewhere, between the sacred silence and sleep.


View Profile
Re: Star Control 1: Thoughts, Impressions, etd.
« Reply #23 on: January 28, 2006, 12:56:08 pm »

Here is a nice implementation of the Kruskal and Prim algorithms with spanning trees - a maze.
If you think of it, it's exactly the same approach as the one you should take for a star map.

there is no need to re-invent the wheel.. all the algorithms, data structures, theories - and heck - even readily-made code.

http://www.cut-the-knot.org/ctk/Mazes.shtml

I recommend you move a bit down to the second applet (the big maze), click the arrows to size it down to 5x5 or so, then it's easier to visualize a starmap out of it.

all you have to do to make it random is assign different weights each time. it's also easy to cancel out dead ends.

good luck!
Logged

"You boldly enter our space! Approach this Dreadnought as though it were a recreation base and then play the dumb hominid?
Who do you take us for, Captain... Spathi!?"
Pages: 1 [2] Print 
« previous next »
Jump to:  


Login with username, password and session length

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!