Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411283 Posts in 69325 Topics- by 58380 Members - Latest Member: bob1029

March 29, 2024, 03:24:57 AM

Need hosting? Check out Digital Ocean
(more details in this thread)
  Show Posts
Pages: 1 2 [3] 4 5 ... 8
41  Developer / Technical / Re: Mid-Point distance map generation on: July 01, 2011, 02:30:32 AM
Gotcha, I was trying to figure out how you were inserting nodes into the array. because from the tiny amount i can remember .push() adds to the end of the array.

while I posted some code above that doesn't exactly match your situation but its good for thought. again Make a formula that could produce this:

{1,1} ... 1+1+random = 3;
new Array inset 3
{1,3,1} ... 1+3+random = 2; 3+1+random = 3;
new Array insert 2 and 3
{1,2,3,3,1} ... 1+2+random = 2; 2+3+random = 5; 3+3+random = 7; 3+1+random = 4;
new array insert 2,5,7,4
{1,2,2,5,3,7,3,4,1}

Now in this case these would represent you nodes Y value as the x value likely changes at a constant rate.
42  Developer / Technical / Re: Mid-Point distance map generation on: July 01, 2011, 01:51:29 AM
So you have an Array of nodes that represents the heights, and you then create a array of  line segments between the nodes? Makes sense to me, Does it not do what you want? or just now work at all.


43  Developer / Technical / Re: What are you programming RIGHT NOW? on: July 01, 2011, 01:02:55 AM
Trying to figure out how Minecraft generates its maps in "chunks" where the chunks match seamlessly.

I need something like this for my game but right now I can only generate large finite maps.
44  Developer / Technical / Re: Mid-Point distance map generation on: June 30, 2011, 10:42:17 PM
Using http://www.gameprogrammer.com/fractal.html I get somthing like this:

Lol I like the link you give there, that's exactly the same place I went to learn about MDA.

Hahahaha I used that at first, page didn't make sense at first, but nowhere could I find a more specific answer. I couldn't find any source, and what I did find was Over complicated. Hopefully my above code will help aid someone.

I eventually used that to make 2D heightmaps when I was working on a rougelike like a year ago. and the results were:

(note these were generated by a script and the colors were added letter by letter, these may load slow...)
http://shadowphantom.webs.com/Results24320111.html
http://shadowphantom.webs.com/Results1779917981.html
http://shadowphantom.webs.com/Results1761624888.html
http://shadowphantom.webs.com/Results1068689589.html

These also used a Smoothing pattern that did this
Code:
T=Trees ~=water .=grass

Base, no Smoothing

......T....T~~~..T~~~~TT~~TT.......~.....T.....T.
..........~~~~~~..~~...~TT.T....TT...............
........~~.T~~T~~..T.~.~........TT.~.............
..T...~~~~..~.~~.~~.T.~..T...T...............T.T~
.....~..~...~~~~~~~......T.T.T.....T..........T.T
.~~.T..~.~...~~~~~~~~~...........T.......T.......
...~...T.~.T.~~~~.~T~..............T.T...........
..~~~....~..~.~.~~~................T..TT........T
..~...~~..~.~~~~.T..T.......T....T...............
T~~.TT~......T.~~............~...T...............
.~TT....T...T...TT......T...~~~..................
...........~.~.~~............T.....T....T........
.~.........TTT~~~....T.....T.~...T...........T...
~~~...........~.~.T.....T........T.T.............
~TT...........~..T........T.~.T...T..............
...............T......~.......~...~..T......T..T.
...........T...~...T.~~..TT..~~...T..............


after 1 pass
......T....~~~~~..~~~TT...T......TT......T..TT...
.......T...~~~~~~~~.....T......TTTT........TT.TT.
.......~~~.~~~~~~~~....TT....TTTT..........T..TT.
....T...~...~~~~~~~....TT.........T........T...T~
TT.TTT..~...~~~~~~~~~...........TTT.............T
....T...~...~~~~~~~~~.T...........T..............
....TTT.....~~~~~~~~.T..........TTT..............
....TTT.....~~~~~~..T...........................T
.~..T...TT..~~~~~...T.........T..................
....TT..TT........T....TTT.T.....................
~.........T.............TTT......................
...T......TT...~...........T.....................
~~.T......................TT.TT..TT..............
~.T..............T...TTT.TTT.TTTTT...............
.T..........T....T.T.TTT..T.....TTT..............
...........TTT..TTTT..T...T....TTT...............
...........T...~...T.~~..TT..~~...T..............



after 2 Passes
........T..~~~~~~~~~.....T.....TTT........TTTTT..
......T...~~~~~~~~~~....T......TTT.........TT.TT.
.....T.....~~~~~~~~~....T.....TTTT.........TTTTT.
..TTT......~~~~~~~~~~..T........TT.............T~
T..TTT.....~~~~~~~~~~..T.........T..............T
...........~~~~~~~~~..T.........TT...............
.....T.....~~~~~~~~..T..........TT...............
............~~~~~~...T..........................T
.....TTT.....~~~~...T...TT.TTTTT.................
....TTTTTT........T.....TTTT..TT.................
....T.....T.......T......TTT..TT.................
~..T.......T......T......TT...TT.................
~...........T.....T....TTTT..TTTTT...............
..T.........T....TTTTTTTTTT....TTT...............
T...........T....TTTTTTT.TT.....TT...............
...........TT....TT......TT....TT................
...........T...~...T.~~..TT..~~...T..............


After 3 Passes
......T...~~~~~~~~~~....TT.....TTT.........TTTT..
.....TT...~~~~~~~~~~....TT....TTTT.........TTTTT.
....TT....~~~~~~~~~~~...T.....TTTT.........TTTTT.
TTTTT.....~~~~~~~~~~~..TT......TTT............TT~
..........~~~~~~~~~~~..T.......TTT.............TT
..........~~~~~~~~~~..TT.......TTT...............
...........~~~~~~~~...TTT.....TTTT...............
...........~~~~~~~...TTTTTTTTTTTT...............T
............~~~~~...TTTTTTTTTTTT.................
.....TTTT.....~~...T....TTTT..TT.................
....T....TT.......TT....TTT...TTT................
~..T......TT......TT...TTTT...TTT................
...........T......TTTTTTTTT....TTT...............
.TT........TT.....TTTTTTTTT.....TT...............
...........TT.........TTTTT.....TT...............
...........TT..........T.TT....T.................
...........T...~...T.~~..TT..~~...T..............
45  Developer / Technical / Re: Finite vs Infinite Game Worlds on: June 30, 2011, 10:31:48 PM
I actually made a simple world generator using a "Bubble System" as well, which included big and small cities, towns, roads, forests and plains.

 Cry I have to start mine from scratch because My Hard drive crashed and I lost everything.... Mine did the same thing though. I was working on Adding Weather elements to mine to help with forestation and such.
46  Developer / Technical / Re: Finite vs Infinite Game Worlds on: June 29, 2011, 10:15:15 PM
I can tell you from experience that "level design" with a randomly generated world is exponentially more difficult than hand-crafting levels.

To put it metaphorically, one way you're trying to tame a flesh-hungry beast with nothing but a stick and two grapes. The other way you're a sea otter trying to crack open his dinner.

So uh, yeah.
Even so, there are great merits to generated levels.

Ohh yeah I know this all well enough. I was just stating that there's a difference between throwing in Noise Height Maps and saying you don't need a level designer, and developing a Procedural Generator that produces Interesting and varied environments that could be used in a game that has a plot without having the bounds of a Finite map area.

My game had the "Bubble System"(or BS for short Pun completely intended) where Depending on the size of cities or villages there was a minimum radius where nothing could be placed, and a maximum to which something HAD to be placed the bubbles came from Debugging where you could hold a key and see the min and max radius. therefore the Map was well populated without being over crowded.
47  Developer / Technical / Re: Finite vs Infinite Game Worlds on: June 29, 2011, 09:09:35 PM
The second is, well... it will remove the need of level design and the level designer Durr...?...

I agree and disagree, As you don't need a level designer, you need to design Algorithms that do the level designing for you.

So in all the only real benefit is when you start a new game its always a different experience. but I do agree that the amount of world detail is important, There has to be enough variety to make it interesting.
48  Developer / Technical / Re: Finite vs Infinite Game Worlds on: June 29, 2011, 08:46:07 PM
I actually started a project like this a long time ago. I was creating a procedurally generated world map with PG Cities which would give you PG quests to go to PG Dungeons to Get/Kill/Save/explore/find something/someone and had an Overall story but the Gameplay never ended as the Enemies Items and Side Quests are created randomly.

If you need a really good reference for this game, Id say check out Magic the Gathering:Shandalar as it has a Quest line but the whole game is PG. you have to Beat the 5 Wizards in each of the towers representing the 5 colors, and then you cna fight the dark lord.

This is making me want to start that back up hahahahaha
49  Developer / Technical / Re: Implementing a level/camera system on: June 29, 2011, 08:35:54 PM
I know that once entering a room/dungeon/new area, the level itself will change, but when in a single area thats larger than the screen, how does the camera scroll when the player moves off screen? Im just having trouble understanding how implement this. For example the current level might be something like 2000x2000 tiles, but the viewable area only 100x100, how is this normally dealt with.. thanks!

OMG I totally understand. I had the hardest time figuring out how to do this too. I ended up creating a "offset" point which everything was based off of like:

tile.render((tile.x+offset.x),(tile.y+offset.y)); But I do the same as Nugsy Said only Draw whats inside the window(although I add a buffer of about 100 pixels in every direction to make sure the image has plenty of time to load and render if it hasent already been loaded)
50  Developer / Technical / Re: Mid-Point distance map generation on: June 29, 2011, 08:18:54 PM
I Imagine it instead of having a line by default start with an array of 2 points then avrage the 2 and add a random value to it, random multiplied by the roughness constant

Code:
{0,0}
Becomes:
{0,3,0}
Becomes:
{0,2,3,1,0}
{0,1,2,3,1,1,0}
{0,2,1,2,2,3,3,2,1,0,1,0}


Using http://www.gameprogrammer.com/fractal.html I get somthing like this:
Code:
public float[] createHeightMap(int finalArrayLegnth, float startingRand, float roughConstant, float minHeight){
float[] finalHeightMap = new int[arrayLegnth];
float[] startingArray = {minHeight, minHeight};
boolean isAddZero = false;
int currentIndex = 0;
float[] tempAarray;
int randAmount = startingRand;
//some kind of legnth checking would have to go here because the array ends up having to be an odd number unless you clip the last number or something

int currentLegnth = 2;




while(tempArray.legnth()<= finalArrayLegnth){
//expand the array first
for(int i=0; i<=currentLegnth+(currentlegnth-1); i++){
tempAarray = new int[currentLegnth+(currentlegnth-1)];

//this alternates adding a number from currentArray and a 0
if(isAddZero){
 tempArray[i]=0;
 isAddZero = false;
}else{
 tempArray[i]=startingArray[currentIndex];
 currentIndex++;
 isAddZero = true;
}

}

//then you have to actually displace the "empty" points
for(int i=0; i<=tempArray.legnth();i++){
if(tempArray[i]==0){
 tempArray[i] = ((tempArray[i-1]/tempArray[i+1])+Math.Random(randAmount));
}
}

//lastly you have to Decrease the random amount by the constant
randAmount = randAmount*randConstant;

}

//then return the Finished height map

return tempArray;
}

note the only problem to my method is that it will never have points that are 0 since the method replaces anything that is 0 with an average of the 2 numbers next to it.

the only other critizizm is that the array WILL be a odd number since after the first pass it goes 2,3,5,9,17,33 and so on, if you need it to be even clip the end until its the right legnth Ex, if you need 20 exactaly make 33 and cut the last 13 off the end.

Also, I wrote this on the fly, and I don't guarantee it will work copy and paste. but Try and understand what I did.

1)Expand the array inserting 0 in between every number in the array.
2)average the Numbers around the 0's in the Array and add a random number
3)decrease the random amount by the roughness constant.
4)repeat 1-3 until the array is the desired length(or bigger and clip it)

51  Developer / Technical / Re: POLYCODE (2D and 3D engine) on: June 29, 2011, 07:34:46 PM
Has anyone managed to get Polycode working in Code::Blocks? I'm currently having linker issues. Search directories seem OK, but the library doesn't actually link.

I'm about ready to go command-line, here.  Waaagh!

I'm having the same, as I use Eclipse. I cant seem to set up the Build Path the way it wants. Eclipse is Picky like that.
52  Developer / Technical / Re: POLYCODE (2D and 3D engine) on: June 28, 2011, 07:13:06 PM
Still Disappointed I cant get this working in eclipse... Installing Visual Studio now.
53  Developer / Technical / Re: What are you programming RIGHT NOW? on: June 27, 2011, 05:16:36 PM
Finally starting the Major coding on my first game. Little Nervous. But My first goal is to get Flying and the camera view working. Then hopefully by the end of the night have planets and systems being generated.

Edit: SNAP! Realized when I went to fix the windows partition on my laptop. I erased all the original source files from ALLLLLL my learning projects before this. Meaning I dont even have a solid footing anymore...

Time to start from Scratch!
54  Developer / Technical / Re: POLYCODE (2D and 3D engine) on: June 25, 2011, 07:14:36 PM
Sorry that might have been my fault, I used \ instead of / Sorry hahaha. I dont use \ either, but for some reason I had a brain fart and used \
55  Developer / Technical / Re: POLYCODE (2D and 3D engine) on: June 25, 2011, 07:52:10 AM
I had an issue with this as well, Make sure the logo is in the base folder as if the image is in the resources folder then it would be something like:

Code:
        <packedItems>
                <item path="Resources\polycode_logo.png" type="file"/>
        </packedItems>

its confusing but if the image is in the resources folder and the program is looking for it in the base folder, it will crash cause the image doesn't exist.
56  Developer / Design / Re: Cosmic Frontier Feature Poll - New Question 6/16 on: June 21, 2011, 04:40:29 PM
Work has been Slow the Past week, Ive had to work every day, tomorrow will be my first day in a while to sit down and Really WORK on the game.

The exact formula for Orbits is done, I'm looking to discuss Ship building as my next question. as Much as Id love for it to be complete customization, I think that having to Physically Maintain and repair more then 1000 parts is a bit much(Probably work this out more in play testing)

Right now I'm working on designing the surface elements of planets. creating colonies and terraforming.

I'm going to be working very hard on this tomorrow, and anyone interested in chatting with me let me know, as I'm trying to barrow a USB Headset cause when I tried to use my old headset, it made this horrid buzzing sound(bad grounding?)


P.S. for some reason Spell check thinks chatting is spelled wrong... Not that its important, but it shows you that nothing is perfect I suppose.

P.P.S. I'm working on my Music Library tonight to get some good Programing music. my 3 starting bands are Daft Punk, Pendulum, and Deadmau5 any more Ideas?
57  Community / Writing / Re: Ideas For Fantasy Settings on: June 20, 2011, 05:14:05 PM
I had this idea a while ago. You were a fantasy town blacksmith. And you explored a world to get ingredients to build new swords. There was no combat just running around to get what was needed. The hero would come and buy your sword to defeat the dragon. Here is the kicker. You are the dragon. You made a big metal dragon mech. To attract heels to boost the local economy so you equip them then
 fight them.

If you keep making the same sword over and over again the hero will find a new Blacksmith. so you need to keep making adjustments to make the sword slightly better then before.

on top of that, you need to Keep upgrading and repairing the dragon without anyone noticing. if you dont then the hero(s) will kill the dragon and find out your a hoax.

Its a never ending battle against yourself!!
58  Developer / Design / Re: Cosmic Frontier Feature Poll on: June 12, 2011, 05:01:33 PM
For orbits, why not at least make them elliptical? It's more accurate than what you've got now and probably not as much of a bother as what Splinter suggested.

My example Drawing was poor but the end result is Elliptical. Belosw is a Transformation of a Circle to an Ellipse. Basicly as you approach 0 or 180 there is a increasing Change in the radius.



The Final Product can have them rotated any which way by adding a Starting angle to the equation. instead of the Ellipse extending out at 0 and 180 you could do 30 and 210.

assuming I do it right I could also make irregular ellipses by changing the angles at which the radius extends.

EDIT: On second thought, i'm trying to make my way though that article i linked, but i think you and Kepler are working with completely different data sets, but the page itself might still be useful. In particular, his second law, if you can figure out the partial area of an elipse.

On the other hand, if you don't want to mess with the difficult math, i don't think many gamers would complain that planets orbit in circular paths.

The Seccond Law thing actually really helps. I have a way to make an Elipcical Path. but I believe I can Update My equations

by adding dSun and dCenter, or Distance to the Sun vs Distance to the Center of the Ellipse, I can Help Develop a Change in speed to get the "Faster When Closer" effect without breaking the Static orbit. See Figure 3
59  Developer / Design / Re: Cosmic Frontier Feature Poll on: June 11, 2011, 11:26:38 PM
So, if time is a major factor in how your game works and you make planing a rout convenient, then the logistics could create a rewarding challenge for the player, making sure to travel in such a way that each planet is as close-as-possible to the next one.

If time is only a factor in calculating the ship's position, i don't know this would add much to the game. Though, this is the first i've heard of it, so i chose not to vote since i'm just ignorant.

Timing your travel is a Core aspect of the space travel portion of the game. Its Slightly Difficult but but planning a route is easy after the first upgrade.



This Image is a concept for Plotting a course, but in game would be represented by an animation where the Blue dot follows the grey line and the Green dot follows the Black Circle. Showing that at 5 The Player should be able to see the planet.

Well, you say it's not real physics, but why not? F = G m1 m2 / r^2 should create exactly the orbit you want.

Im staying on the safe side, If I get a Hiccup that increases that perfect Orbit a little, the planets will start getting pulled into the stars. Id love to try it but id rather stay safe with this.

On top of that, Planets and Systems are Randomly Generated. So there's a Level of Random in there that I cant Predict. plus Safe Predictable orbits make Plotting courses easier.
60  Developer / Design / Re: Cosmic Frontier Feature Poll on: June 11, 2011, 09:48:16 PM
For everyone who Chose "No I dont want to have to Calculate new Planet positions all the time"

At the beginning of the game, you are in a System made entirely of man made Stations. that do not change their locations. I refer to this as the Home base because its Always findable. at this point in the game you only have the Galaxy map. The Galaxy map lets you set nav points and change the time so you can see updated Planet locations.

After completing or not completing the optional pseudo-tutorial. you can Venture out and eventually come across a planet! This Planet will be logged in your Galaxy map with all its info.

After a Suggestion from a crew member(that happens Right after you find your First planet), you can find the Upgraded NavComputer is Available in the ship upgrade shop(if you did the tutorial or played before you would know where this is but it can always be found on the map by hovering over it).

The Upgraded computer allows you to set Nav Points like the base map. but also set Planets as Nav points. this will calculate a orbit intercept point, which is a point that assuming you travel directly there at full speed, and take no detours, the planet will be there.

and Lastly after Discovering your Seccond System(that isent the home base) Your Given the last upgrade as a gift, from a Story character.

If that Helps change your mind Let me know
Pages: 1 2 [3] 4 5 ... 8
Theme orange-lt created by panic