Project Genesis *NEW* *WIP*

Hi everyone,



i am working on a pretty big project (on my own) right now.



Currently i call it Project Genesis, but the official name might still change.



Well, a picture says more than thousand words … and i have many pictures already …



Here some of my highlights (starting with older attempts down to the current versions):



















































I am awaiting your feedback!



Greetings Fino;

1 Like

A close-up on a planets trail:





Here is how i did it:

[java]

private void createTrail(CPlanet planet, Node planetNode, ColorRGBA color) {

Vector3f[] points = new Vector3f[10];

for (int i = 0; i < points.length; i++) {

float angle = (-1f - i) / (float) points.length * 2f * (float) Math.PI / 8f; // an 8th of a circle

points = new Vector3f(planet.calcCurrentX(angle) - planet.calcCurrentX(0), 0, planet.calcCurrentY(angle) - planet.calcCurrentY(0));

}

Curve mesh = new Curve(points, 25);

mesh.setMode(Mode.Points);

mesh.setPointSize(2);

Geometry grid = new Geometry(planet.toString() + “-Trail”, mesh);

Material mat = new Material(assetManager, “Common/MatDefs/Misc/Unshaded.j3md”);

mat.setColor(“Color”, color.mult(0.01f));

mat.setColor(“GlowColor”, color.mult(0.8f));

grid.setMaterial(mat);

planetNode.attachChild(grid);

}

// CPlanet.class:

public float calcCurrentY(float angle) {

return (float) Math.cos(angle) * orbitDistance * 2f;

}

public float calcCurrentX(float angle) {

return (float) Math.sin(angle) * orbitDistance * 2f;

}

[/java]



Since i use mesh Mode.Points it keeps its intensity when zooming out.

Actually, since everything else is getting smaller the trails seem stronger from a distance (compare earlier pictures).

And when you zoom in really close you can barely see them.



Greetings Fino;

Cool!

What will be the point of this game? :slight_smile:

I see universe, some solar systems and planets? Looks complicated. :slight_smile:

Hehe.



It’ll be a Massive Multiplayer Online Strategy Game.



The player starts in the Galaxy on his own little corner of the universe (a little bit outside of the existing universe).

He will have a planet with a colony. He will be able to build and upgrade buildings on the planet and then build spaceships.

Then he can fly around in his star system. When his engines become better (science) he can then fly to other star systems.

The universe grows dynamically as players discover their surrounding stars systems.



Then when he meets other players he can interact with them in many different ways:

  • Trade
  • Fight
  • Piracy
  • Espionage
  • Allies



    The whole universe will have a fog of war. So the player only sees the systems where he has fleets.

    Other systems will be frozen in status as the player last saw them.



    The whole game will be in real-time, meaning it keeps running when the player is not online.

    And he can be attacked then.



    But there will be several functions to support the player even if not online:
  • Event log system informing the player about all that happened while gone
  • AI for fleets (improving with better technology) - it will be a simple scripting mechanism like “When strong enemy attacks - flee!”
  • Ally vision.
  • Defense systems.



    Then there will be several modes or you could say player classes, which involve completely different ways to play the game. Like:
  • Trader
  • Farmer
  • Pirate
  • Traveler
  • Warlord
  • Scientist



    The whole thing will be set up so it supports multiple languages (English and German for starters).



    The space fights will take place in the StarSystem View (as seen above) with the chance to interact in the battle.

    This will be a tricky part to design. But i so love it.

    There will be aspects like, when attacking from the side or back a ship is more vulnerable, which can be used for attacks.



    Then there is this little thing, that a fleets needs to cross the star system from one warp point to another.

    During the fly-through he can be attacked.



    Then there will be cloaking technologies of different types and sensor technologies to counter-act those again.



    And later there will be experimental jump drives which enables one to send fleets to anywhere in the discovered universe but with some risk involved like 50% of damaging the fleet. Nicely tuned to make it dangerous enough so people don’t use it all the time.



    So, that’s the short overview of it. It’s still a lot of work.

    But i am making some nice progress on the presentation.



    The whole thing is backed with a database (MS SQL right now).

    Large parts of what you see is already stored in and loaded from the database.



    As you might have noticed … i am not a designer … look at my houses and the space ship … so i will definitely need some help there.



    Ok, enough for now.

UPDATE



I worked over the PlanetView a little bit. Migrated to my CustomMesh class and adjusted some colors.

And finally merged in with the main application (it was a separate one before).

Now i can zoom from Galaxy to StarSystem to Planet and backwards …



For some reason i can not embed the pictures here confused … so i have to link them:

Dead Planet:



Ice Planet:

Desert Planet:

Earth-Like Planet:

Lava Planet:



Full Photo Album



I hope you like it!

really cool, i have a few questions for you



how many stars are generated in your galaxy?



what type of algorithm are you using for pathfinding between star systems in your “route planner”?



i ask because ive delved into this world of generating a galaxy, inspired by Infinity: Quest for Earth and the work done on that project. I was able to produce a galaxy which had about 100,000 stars visible at any time with about 500 million total locations possible to be visited. by stars i mean basically gl_points, so nothing as special as the spheres you are using. the galaxy was an octree of sorts and as you went deeper into the octree it would spawn stars around the camera based upon a seed, however there was a base of stars which were always visible. The hard part that got me was finding a way to select these stars once they are spawned. I had to go with only having ones near the camera selectable (so a majority of the visible ones couldnt be selected) by spawning a billboard over each near star.

how many stars are generated in your galaxy?

I start with 1. The rest is dynamic ... it grows with user's activities.
If a new player joins it creates a new starSystem with 4 connected undiscovered ones a little bit outside of what already existed.
The data is stored in a DB. Then as players fly around and discover their surroundings the universe grows.
If a player visits an uninitialized starSystem it gets initialized and surrounding uninitialized starSystems are being created (with some randomity).

what type of algorithm are you using for pathfinding between star systems in your “route planner”?

Well for starters the player will manually choose the paths - step by step.
Later i want to add automatic flight modes (in game "artificial intelligence") to control your fleets when not present.
For this i will need automatic path finding. But it seems quite simple to me ... probably because i have the connections as preset paths between the systems.

Algorithm:
You want from S1 to S5 - shortest way.
Go recursive (or in a loop with lists as reference point) and go into each possible connection of S1.
Calculate the absolute distance of each connected system to S5 and go into the ones that are closer first.
Repeat (recursive) until you reach S5 somehow.
Prevent double entries - if the only connection possible was already in the line - discard that route and go back one step.
Once you found one route you calculate its length and store it as minLength.
Then you continue with all other possible routes (in the recurse/repeat logic) and discard all routes that are longer than minLength and store the route and its length if it is shorter.
And finally you will end up with the shortest route.

Easy! *g*

What i think is more complicated is path-finding on a 2D map with random objects in the way. Worst case scenario: a labyrinth.
I was thinking about this and came up with an idea. Basically you want from point A to point B.
You plot (calculate) a straight line between them. Then you go point by point following the line until you hit a barrier.
At that point you split the line in two pieces and you start moving the point alongside the barrier until you reach it's corner.
Actually you add another path here and you go in both possible directions (in separate paths).
Once you found the corner you continue following the second part of the line between this new point and B (for each path).
Using recursion or loops you continue this until you reach B.
When moving points you need to recheck the lines starting from the prior point (one back) again, since by moving the line you might hit another corner with the line, at which point you would need to split the path again (add another point). But here you wouldn't need to go in two directions, since you have your next point already (the one that you are moving). This is like bending the line around a corner.
When progressing on each stored path simultaneously (in turns) the path that reaches B first should be the shortest.

I haven't implemented this yet, but i definitely want to, even if just to see how it works.

Hope that helped! And have fun!
Let me know if you implemented any of this.

i ask because ive delved into this world of generating a galaxy, inspired by Infinity: Quest for Earth and the work done on that project. I was able to produce a galaxy which had about 100,000 stars visible at any time with about 500 million total locations possible to be visited. by stars i mean basically gl_points, so nothing as special as the spheres you are using. the galaxy was an octree of sorts and as you went deeper into the octree it would spawn stars around the camera based upon a seed, however there was a base of stars which were always visible. The hard part that got me was finding a way to select these stars once they are spawned.

Now the way how i solved this is twofold:
1.) I split the galaxy into sectors (100x100 coordinates). And when a player enters the game he starts for example at 243, 371 so i load only sector (200, 300) and maybe the surrounding ones. Then when he moves around (in his client) additional sectors get loaded on demand.
2.) Limited view. The player only sees a small area. He doesn't need to see more. Usually he will be operating in a very small area. The game will be slow ... it's space ... it takes time to get somewhere. And his traveling will be limited by his technology as well (range limit). But the essential part is the limited view. The way i implemented this is again twofold:
a.) I create the 3D objects (starts & connections) on demand when they are close to the ZERO point of view (the point where the camera looks at in plane X-Z). The distance is calculated with pytagoras (circualrs form). On some of the pictures you see a circular universe. This is only a small area of the full universe.
b.) Culling. Now let's say the player moves around in the Galaxy (with the camera). Then stars and connections are culled and un-culled once again based on their distance to ZERO (cam look-at point).

This gives a cool effect, speeds up rendering and no more is needed.

Soon i will fix up the webstart part of it again so i can show it in action.
I just need a server for it ... or a faster internet connection.


I had to go with only having ones near the camera selectable (so a majority of the visible ones couldnt be selected) by spawning a billboard over each near star.

Ehm ... could you send me the key parts of your bill-boarding logic?
Because i haven't looked into that yet. That would help a lot.

Greetings Fino;

I think this game could be even more exciting if it was not a MMO, a MMO needs lots of people to be exciting, in a single or say two player game its much easier to have exciting AI etc. Looking good nonetheless ^^

Well my whole concept is that should feel REAL.

And it should be an MMO game.



The trick is, that the beginning of the game is more like a single player game.

But then as you play longer and discover more of the universe you meet others.



Also there will be an advanced start mode where you would start somewhere in the middle of the universe straight into the action.

While the normal start mode would be (as described before) a little bit outside.



Of course there would also be quests/missions to do, treasures to find, pirates and NPC aliens to fight.

But the really big battles will be the alliance battles !!!

OMG … big big battles with hundreds of ships from different players … OMG!!! HAR HAR!



In order to make that work it needs to run sufficiently slow enough so the players can interact and coordinate battles.



It’s a lot of work still …



Also it’s an open universe … it will always grow and it will probably always be developed further.

And for sure it will be moderated to some degree as far as special events go … like supernovas … black wholes, etc. … HEHE!

WOW … the super novas will be incredible !!! Ha! new idea … they will be visible for everyone … that enables people to navigate in the universe.

Thats the thing about AI in a MMO. In a single player game the player is only at one location, so you can do a basic, generalized AI computation in the areas where he is not. For a MMO, you have to expect that everywhere theres at least somebody roaming, hence you would have to compute “full” AI everywhere, for which you need an armada of computers.

I don’t see the problem. The AI will be very basic and simple.

Like occasionally attack a player somewhere or just sitting somewhere having a base and defending it.

The most difficult thing will be the balancing.



Oh, maybe i know why you think it will be complex …

You think the AI has to play by the players rules and interact on a very high level …

That’s not needed. The whole game will be event-based internally.

So the AI will look something like this:

[java]

onPlayerAttack() {

if (attacker.strength > self.strength) {

if (canHide) {

hide();

} else {

tryToFlee();

}

} else {

defend();

}

}

[/java]

That was my point, the AI will be boring, only many players will make this exciting :wink:

I see. But there is so much more that i have planned that i didn’t even mention here … i don’t think it will become boring.

And also it WILL be an MMO, so there WILL be many players … g

Yeah, don’t want to sound like I am bashing this, I wish you all the best with your project :slight_smile:

Kinda neat. A project similar to mine although tackled from a very different perspective.



The huge difference is my project might (ok, most probably will) support MP, but definitively won’t be an MMO.



I wish you the best.

Really cool! It looks like Spore :open_mouth:

Yeah looks like spore, but better :smiley: