Star Explorers

Posted By: Dooley

Star Explorers - 12/13/14 21:40

Hello 3D Game Studio people!
I'm working on a project called "Star Explorers." That's the working title anyway.

I have put it on Steam's Greenlight concept forum...
http://steamcommunity.com/sharedfiles/filedetails/?id=354789892

The video is also on Youtube...
https://www.youtube.com/watch?v=0-PY5OvrZ3o

Currently, it allows the player to explore, map and document a procedurally generated galaxy. It does not look great right now, but I am focused on getting it to work before I focus on getting it to look good.

Each sector of the galaxy has a random number of stars, planets, asteroid belts, nebulas and other celestial objects. The player can scan them into his database, and it automatically adds basic information about each sector into the expanding 3D Map. Planets can be orbited, and also landed on to explore.

Each planet is created on the fly with a set of interlocking terrain tiles, so each planet has a unique terrain. Also, the terrain texture, rocks, plants and any liquid are also chosen randomly. Right now there are not too many different options, but I will be adding more variety later on.

Right now, the planets are kind of small, but they are unbounded. This means when you travel in one direction, you will end up "teleporting" to the opposite side of the map seamlessly (well, almost seamlessly). I like this approach, but it forces me to generate 9 different terrains instead of just one, which in turn forces me to keep the levels on the small side.

I've also started developing a cave system. A planet will randomly spawn a number of caves which the player can explore. These caves are again randomly built on the fly, and like the planets themselves, the player can leave and come back to the exact same cave. Currently the caves are empty, but I will be adding lots of features in the near future.

There are also living things on the planets. Currently, there is only one "type" of alien. However, for every planet with the right conditions, the game spawns a variation of this alien type. It randomly picks a head, body type, legs, neck, tail, mouth and eyes from a set of different models, then it pieces them together in-game for unique looking aliens. As with the terrain features, there is only a small set right now, but it will be expanded in the future for more variation.

Alien behavior is the same for all right now, but I want to add more types later. Some will be more aggressive, others will ignore the player, others will be frightened, etc...

I know there are other games out there like this now, but when I started the project last year I thought it was the only one of its kind ... oh well.

Please check out the screenshots and youtube video, and let me know what you think. I have a few questions I'd love to hear answers to also.

1. I want the life-supporting planets to have more plant-life. When I've increased the number of plant models, it has tended to crash. I've increased the nexus to 500 and max_entities to 100,000, but I'm still getting crashes when too many plants are allowed to appear on the level. Is there a way to use particles for grass instead of entities? Perhaps clones? Currently, the game is stable, but I really want to figure out how to get more foliage!

2. Currently I'm using game_save to save each level the player visits, and game_load to reload the levels when he/she visits them again. This works, but I've noticed that it has some limitations when reloading some levels. I was looking into saving the level parameters into a text file instead, and then manually re-creating the level from the text file each time the player revisits. So far, my efforts to do this have been unsuccessful. Any advice?

3. I've noticed that when I export the game to an .exe file, it tends to take a lot of tweaking and editing to get it to actually work. Can anyone explain why this happens, and what steps I might take to avoid this issue in the future?

Thanks a lot for any feedback or advice you guys have.
Cheers!


Title Screen


Spaceship Hallway - currently working on Control Room

I've been doing a lot of work on the planet surfaces themselves. I've managed to add some surface shaders like bump mapping on the terrain, trees and rocks, along with some nice stencil shadows and reflective water/liquids depending on the planet.


A peaceful lake


Sunset - there is an active day/night cycle on each planet.


A valley


Forests ... you can see the stencil shadows working in this one laugh
Posted By: Dooley

Re: Star Explorers - 12/13/14 21:47

I haven't updated the caves yet, but will be doing so soon... Look for more images here.
Posted By: alibaba

Re: Star Explorers - 12/14/14 11:26

Wow! Looks really cool! I really wonder how the caves are created! Could you explain a bit?
Posted By: Dooley

Re: Star Explorers - 12/14/14 23:34

Thanks!
I created a bunch of different cave tiles, and I wrote a script that randomly places the tiles on the level. The script makes sure that corresponding tiles are placed next to each other, so the caves fit together correctly.

Right now there are not a lot of different tiles, so each cave looks pretty much the same, but I am adding more as I go along. I just added a tile which goes down to a lower level, so the caves can randomly build themselves vertically as well as horizontally.

Once I have the caves working the way I want, I will attend to the textures. Currently, the textures do not really match up, so you can see big lines where one tile meets another tile. Form follows function, right?

I should also mention, I'm using A7 - Commercial Edition.

Do you think some of my issues might be resolved be upgrading to A8? Has Lite-C changed much since A7? I would hate to have to re-code everything...
Posted By: alibaba

Re: Star Explorers - 12/14/14 23:58

Not really much. Only some small changes. I can only say something for you 3rd question.
You should have a script, where you PRAGMA_BIND everything you use in your project, because 3DGS does not always detect, what you use so it may forget some stuff in your publish directory.
Happened to me also a lot.
I just created a script which reads through all folders in my project directory and writes a header file with all PRAGMA_BINDS.
If you want i can share it, but you have to clean you project folder, because it will also add .wmp and .$$M files.
So in the end you may have a lot of unnecessary files in you publish folder, which just makes it take more space than necessary. laugh
Posted By: Dooley

Re: Star Explorers - 12/15/14 07:59

Thank You!
Posted By: Reconnoiter

Re: Star Explorers - 12/15/14 20:10

The cave system is cool. This could become a fun (cave/)dungeon crawler, with a space theme grin .

As for your first question, what is precisely the error message? To many functions? Or to many ents? Anyway the solution for this would be to not generate the planets all at the same time, but only when the player is near and remove them when the player is (far) away. Or have a map for each planet if you don't mind loading time.

something funny: I clicked your link to your Star Explorers video on youtube, and now the right bar which shows recommended videos in youtube is filled with Dora the Explorer stuff grin
Posted By: Dooley

Re: Star Explorers - 12/15/14 21:52

Thanks,
Yes, each planet is actually a different level to itself. So it's not a seamless exploration of space... It says there's a script crash in SYS, but only when I really have it put in a lot of plants. I reduced the number of plants and its very stable right now, but I'm trying to figure out ways to add more. Adding a CLIP range helped a lot, and I have more now than I used to. Also, I reduced the number of polygons in my plant models quite a bit, and that allowed me to have more as well, but I really want to see a lot more. Like this screenshot from MapBuilder 2:

http://www.opserver.de/ubb7/ubbthreads.php?ubb=showpic&id=2547

Lots of games have this really intense amount of grass/surface detail, but it seems I don't know that right type of tool to get the effect. Perhaps having a shorter CLIP range for grass, and a longer one for other objects like bigger plants and trees. I will keep experimenting with it...
Posted By: Dooley

Re: Star Explorers - 12/15/14 21:58

I can actually build the levels with a lot more plants. However, if I leave and come back to the same planet, it crashes in the game_load process. That's why I asked question #2. If I can manually rebuild each level, I think it will be more stable as well.
Posted By: sivan

Re: Star Explorers - 12/16/14 10:37

the best you can do is to buy an A8 Pro from a user, much cheaper than buying from the store. A8 is much faster, especially if you use terrain lod with pro. And you can make nice dynamic shadows too... wmb has an entity limit of approx. 3000, so you can place grass and vegetation using an own load/save system, e.g. in MapBuilder I could achieve nice enough quality and performance. setting entity lod and clipping properly is a must.

moreover this game reminds me to Solus, a recent game made with UE4 (it looks really great): http://www.hourences.com/thesolusproject/
Posted By: Dooley

Re: Star Explorers - 12/17/14 02:52

I will look into A8 for sure. Thanks for the advice.

There's a big PS4 game called "No Man's Sky" coming out soon. They pretty much have the same concept, and it looks way better than my game. But I might come up with some things to make this game unique.

I will check out solus...
Posted By: Dooley

Re: Star Explorers - 12/09/15 05:59

Learning how to do texture baking in Blender ... this is still early, and very rough, but it's definitely a step in the right direction.
Posted By: EpsiloN

Re: Star Explorers - 12/09/15 08:25

I just noticed your post and all this looks amazing laugh with a boost in graphics it'll become a gem.

On your issue with entities, I made a game with A6, so imagine the limitations... laugh
One way of dealing with this is to have no functions for your entities, I mean no while loops in them. If you need to animate them or something, just use one big function to iterate over each env model.
You could also use models composed of two sprites arranged like "X" from top, for distant objects...

On the issue on loading/saving, I made my own level format arranging each object on a new line followed by pos/ang/properties and simply read or write it. It uses a function that goes through all the entities currently existing and saves them to a file.

PS.: Don't give up, it looks too interesting laugh
Posted By: Reconnoiter

Re: Star Explorers - 12/09/15 11:00

Looks good Dooley, keep it up wink
Posted By: Dooley

Re: Star Explorers - 12/12/15 16:15

Thanks for the feedback! Here is the final hallway (for now). I'm not 100% happy with this, but it looks good enough for me to move on to the next part. I will probably have to redo the textures a bit, because the UVs seem to distort the image in some places. Also, I can't quite figure out why the normal/specular maps don't work the way I want them to. They are working, but you really have to pay attention to actually see them. It would be nice if they were more pronounced...



Epsilon: If you're talking about my problem with adding a lot of plant-life to my levels, it's not an issue of while loops. Currently, they are just models placed on the level, with no running function, and no interaction with the player. I can get up to about 10,000 objects, but above that I can't load saved levels. I was thinking of writing a function to rebuild the levels based on a saved text file, like you mentioned. I think that would be the best option and would allow future updates of the game to run older saved games, which would be nice.

I tried writing this function once, and it seemed to record the data correctly, but I could not get it to rebuild the level. I'd love to see your function, if you'd be willing to share it.

I'd really like to be able to have jungle like planets with tons of trees/grass etc... Right now everything looks like a desert.
Posted By: Reconnoiter

Re: Star Explorers - 12/12/15 17:08

I like it Dooley. It could be a bit higher reso but I personally dont mind that. Also might be a good idea to either bake your textures in e.g. Blender or add more shadows.

Quote:
Also, I can't quite figure out why the normal/specular maps don't work the way I want them to. They are working, but you really have to pay attention to actually see them. It would be nice if they were more pronounced...
, try editing the shader you are using. Or use a different normal map shader.
Posted By: EpsiloN

Re: Star Explorers - 12/12/15 21:21

Yes, you can boost the effect somewhere in the shader, where you multiply the rgb and normal together?...

The function just loops through every model available (that's part of the player's path, not speckles, dust and decoration like that) and saves the info about it line by line in a txt file.
After I click load, it just reads line by line and ent_creates with the given parameters. If you're having problems with this one, I'll show you my code and help you build yours...

And, for the vegetation, I'd suggest you don't save it at all...And to have it the same each time, create it the first time with random positions/models, but set the seed first!
Save this seed to the save file and after you try to load it, just use the seed that you saved to generate the vegetation again... This would produce the same vegetation always, and you only save a small number laugh Instead of all your vegetation...

If you're having problems with something, don't hesitate to ask laugh We're here to support each other.

PS.: Here's how it works:
Click to reveal..

I have an "object type" variable saved in a skill for each object. If its 1, for example, its a regular static platform. If its 2, its an elevator, 3 for torch (just an example)
My function goes through all the entities in a level, and if it encounters an object type different from environment effects or player or energy balls or characters... it saves it to a text file in the format:
"modelName.mdl object_type X Y Z PAN TILT ROLL 5 General parameters"
After opening a saved game, it reads line by line and ent_creates the objects based on the object_type with model name as "modelName.mdl" for example, and based on the object type assigns the general parameters to different skills for each object. For example, the general parameters for an elevator go from skill10 to skill14. For a moving platform, they go from skill8 to skill12, for a torch there are none...

Its not complicated. You just have to keep it free of semantic errors, or you can get yourself in a loop looking for an error that is so well hidden, it can take you days! Just take your time to review each object being saved correctly on its own line and with full parameters list.

And, last but not least, it can get tedious for your CPU to do all this work in half a second... The game will seem to freeze for a while or be laggy... You can counter this with a loop counter for up to 8 ,for example (or 4), objects at a time (per frame) and this will keep the game running. But, it will take a while to save, so make sure the player isn't quitting or changing the level while saving laugh or you'll get an empty level saved! Took me a while to fix this one.

I hope this gives you some ideas.
Posted By: Dooley

Re: Star Explorers - 02/20/16 03:28

I got the file saving thing to work in another smaller game I have been working on. As a proof of concept it works perfectly, and rebuilds the level exactly as it was from the saved file.

Now I will be trying to implement in in my planet and cave levels, which have a lot more variables ... it will be challenging!

As a side note, I have been making progress updating the graphics and I will be posting the new improved screenshots up in the main post.
© 2024 lite-C Forums