Gamestudio Links
Zorro Links
Newest Posts
Trading Journey
by howardR. 04/24/24 20:04
M1 Oversampling
by Petra. 04/24/24 10:34
Zorro FIX plugin - Experimental
by flink. 04/21/24 07:12
Data from CSV not parsed correctly
by EternallyCurious. 04/20/24 21:39
Scripts not found
by juergen_wue. 04/20/24 18:51
zorro 64bit command line support
by 7th_zorro. 04/20/24 10:06
StartWeek not working as it should
by jcl. 04/20/24 08:38
folder management functions
by VoroneTZ. 04/17/24 06:52
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (howardR, sleakz), 706 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Mega_Rod, EternallyCurious, howardR, 11honza11, ccorrea
19048 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
my sandbox game develop have some questions #461159
07/27/16 13:27
07/27/16 13:27
Joined: Feb 2003
Posts: 146
RP China
2
20BN Offline OP
Member
20BN  Offline OP
Member
2

Joined: Feb 2003
Posts: 146
RP China
hi all,
my sandbox game develop have some questions:

1.

this game need many many cube entities.(like minecraft)
i try to:
var world_xyz[3] = { 1024,1024,1024 };
...
function main()
...
max_entities = (world_xyz[0] + world_xyz[1] + world_xyz[2]) * 10 + max_entities;
...
start no error, but run game when function create random world a few min ago display error:
to many entities!

how can i fix it?

my PC:
2 XEON,48GB RAM,GTX1080

---------------------------------------------------------
2.

i set all cube entities flags:
my.emask &= ~DYNAMIC;
works fine! too many entities can't display, but game render fps is very slow

how can i fix it?



thx all.

Re: my sandbox game develop have some questions [Re: 20BN] #461160
07/27/16 14:13
07/27/16 14:13
Joined: Dec 2011
Posts: 1,823
Netherlands
Reconnoiter Offline
Serious User
Reconnoiter  Offline
Serious User

Joined: Dec 2011
Posts: 1,823
Netherlands
Hi,

max_entities = 10000; //fill in any value here

Please note though that you cant give all of them an active while() loop (only ~1000 or such). So use a global while() loop to e.g. update/change them, and the event system for e.g. push or impact events (just like normal entities).

I have tried something similar on time and its possible but not as high numbers as minecraft I think (unless you use some really complicated tricks to solve it).

Last edited by Reconnoiter; 07/27/16 14:17.
Re: my sandbox game develop have some questions [Re: Reconnoiter] #461161
07/27/16 14:40
07/27/16 14:40
Joined: Mar 2012
Posts: 927
cyberspace
W
Wjbender Offline
User
Wjbender  Offline
User
W

Joined: Mar 2012
Posts: 927
cyberspace
hi i have done similar terrain as minecraft-like and marching cubes voxel based and normal height based based projects, in unity and gamestudio , i can only stress that your approach is on the wrong track , in the case where you wish to represent a lot of models /entities as fast as possible ,each entity must be rendered and that is way to much , you must fake it by joining the meshes or creating/building up a single mesh to represent all the cubes visible faces such that it takes only one mesh to be rendered instead of thousands ..

http://forum.unity3d.com/threads/wip-john-doe-yet-to-be-named-project.393060/

you need to research why and how.


Compulsive compiler
Re: my sandbox game develop have some questions [Re: Wjbender] #461163
07/27/16 16:48
07/27/16 16:48
Joined: Mar 2011
Posts: 3,150
Budapest
sivan Offline
Expert
sivan  Offline
Expert

Joined: Mar 2011
Posts: 3,150
Budapest
similar thing can be, more exactly already made with Unreal Engine 4, by instanced static meshes and in more professional solution by procedural mesh generation. there is a tutorial how to make it, and maybe a marketplace item too... it requires really advanced optimizations.


Free world editor for 3D Gamestudio: MapBuilder Editor
Re: my sandbox game develop have some questions [Re: sivan] #461166
07/27/16 17:40
07/27/16 17:40
Joined: Dec 2011
Posts: 1,823
Netherlands
Reconnoiter Offline
Serious User
Reconnoiter  Offline
Serious User

Joined: Dec 2011
Posts: 1,823
Netherlands
Originally Posted By: sivan
similar thing can be, more exactly already made with Unreal Engine 4, by instanced static meshes and in more professional solution by procedural mesh generation. there is a tutorial how to make it, and maybe a marketplace item too... it requires really advanced optimizations.
, but where is the dirty-Acknexing in that? grin

Re: my sandbox game develop have some questions [Re: Reconnoiter] #461169
07/27/16 18:35
07/27/16 18:35
Joined: Mar 2011
Posts: 3,150
Budapest
sivan Offline
Expert
sivan  Offline
Expert

Joined: Mar 2011
Posts: 3,150
Budapest
I don't think it can be effectively made with 3dgs, it is better to choose the right engine for your game than to be tight by an engine's limitations. the strengths of 3dgs are located in other areas...


Free world editor for 3D Gamestudio: MapBuilder Editor
Re: my sandbox game develop have some questions [Re: sivan] #461172
07/27/16 22:37
07/27/16 22:37
Joined: Feb 2012
Posts: 371
Dico Offline
Senior Member
Dico  Offline
Senior Member

Joined: Feb 2012
Posts: 371
This is an old exemple like minecraft created by acknex 8 : https://www.youtube.com/watch?v=6vCf_g1cWGc

Re: my sandbox game develop have some questions [Re: Dico] #461183
07/28/16 09:46
07/28/16 09:46
Joined: Jul 2010
Posts: 283
Germany
J
jenGs Offline
Member
jenGs  Offline
Member
J

Joined: Jul 2010
Posts: 283
Germany
I created something like that a while ago. But not with a blocky world. I used marching octats (or something like that, I can't remember) to proceduraly generate the "natural" looking world.

I created chunks of terrain. Every Terrain hat three lod steps. But the big problem was that the realtime modification needed to be done on the cpu, because directx9 doesn't support this nice geometry features in shaders.

For blocky worlds it should not be so heavy on the fps to recreate the terrainchunk. But my guess is, that it will never be so fluent like minecraft or other sandbox games.

Another approach would be using a shader. You create a terrain-chunk with all possible faces and hide those which are not visible. But collision will be a nightmare then. And the polygons are still rendered even if they are not visible.

Use another engine with nice advanced shader capability.

Re: my sandbox game develop have some questions [Re: Dico] #461185
07/28/16 11:11
07/28/16 11:11
Joined: Dec 2011
Posts: 1,823
Netherlands
Reconnoiter Offline
Serious User
Reconnoiter  Offline
Serious User

Joined: Dec 2011
Posts: 1,823
Netherlands
Originally Posted By: Dico
This is an old exemple like minecraft created by acknex 8 : https://www.youtube.com/watch?v=6vCf_g1cWGc
, going a bit offtopic here, but what is that Alphabox you are developing? Looks interesting.

Re: my sandbox game develop have some questions [Re: Reconnoiter] #461186
07/28/16 11:32
07/28/16 11:32

M
Malice
Unregistered
Malice
Unregistered
M



^-- He's been working on port platform to android for sometime. In fact HE posted about a early version that could convert any pure 2d 3gds game to android long ago. I'd say this is a next step and full evolution to 3d .. But just guessing.

Last edited by Malice; 07/28/16 11:32.
Re: my sandbox game develop have some questions [Re: ] #461188
07/28/16 11:42
07/28/16 11:42
Joined: Dec 2011
Posts: 1,823
Netherlands
Reconnoiter Offline
Serious User
Reconnoiter  Offline
Serious User

Joined: Dec 2011
Posts: 1,823
Netherlands
Originally Posted By: Malice
^-- He's been working on port platform to android for sometime. In fact HE posted about a early version that could convert any pure 2d 3gds game to android long ago. I'd say this is a next step and full evolution to 3d .. But just guessing.
, oh that is pretty cool

Re: my sandbox game develop have some questions [Re: ] #461191
07/28/16 12:00
07/28/16 12:00
Joined: Feb 2012
Posts: 371
Dico Offline
Senior Member
Dico  Offline
Senior Member

Joined: Feb 2012
Posts: 371
Originally Posted By: Reconnoiter
Originally Posted By: Dico
This is an old exemple like minecraft created by acknex 8 : https://www.youtube.com/watch?v=6vCf_g1cWGc
, going a bit offtopic here, but what is that Alphabox you are developing? Looks interesting.


Originally Posted By: Malice
^-- He's been working on port platform to android for sometime. In fact HE posted about a early version that could convert any pure 2d 3gds game to android long ago. I'd say this is a next step and full evolution to 3d .. But just guessing.


Yes But now it support 3d games laugh
I will add the new version this week so it can fix some bugs found in last version

Re: my sandbox game develop have some questions [Re: Dico] #461211
07/28/16 21:13
07/28/16 21:13
Joined: Mar 2012
Posts: 927
cyberspace
W
Wjbender Offline
User
Wjbender  Offline
User
W

Joined: Mar 2012
Posts: 927
cyberspace
https://github.com/krispykrem/Infiniminer

good to start learning with , dont copy and paste though , just learn the method.


Compulsive compiler
Re: my sandbox game develop have some questions [Re: 20BN] #463487
12/07/16 13:37
12/07/16 13:37
Joined: Feb 2003
Posts: 146
RP China
2
20BN Offline OP
Member
20BN  Offline OP
Member
2

Joined: Feb 2003
Posts: 146
RP China
THANKS ALL!

I used dynamic model and group loading to solve this problem.
but i have some problems:
1. how to run dynamic strings script etc: _chr("error("/OK!"/);") ?
2. shader-c evo can't support 2nd UV Lightmap, give me some advice please?
3. shader-c evo can't support terrain shader and water shader, give me some advice please?
4. shader-c evo can't support alpha or TRANSLUCENT, give me some advice please?

thanks again.

Re: my sandbox game develop have some questions [Re: 20BN] #463503
12/08/16 16:08
12/08/16 16:08
Joined: Dec 2011
Posts: 1,823
Netherlands
Reconnoiter Offline
Serious User
Reconnoiter  Offline
Serious User

Joined: Dec 2011
Posts: 1,823
Netherlands
Hi 20BN,

3) terrain and shade-c EVO (/the newest version) is complicated, easiest way is to just use normal models as terrain (otherwise your mostly likely going to have to sacrifice some other features)
4) yes it does support them, but you mostly likely use the wrong .fx file. Open the .fx file you use and uncomment #define ALPHA. Than use .png or 32 bit .tga with alpha channel for transparent texture.

Also check this thread incase you already haven't -> http://www.opserver.de/ubb7/ubbthreads.php?ubb=showflat&Number=460457#Post460457

Last edited by Reconnoiter; 12/08/16 16:11.
Re: my sandbox game develop have some questions [Re: Reconnoiter] #463511
12/09/16 15:16
12/09/16 15:16
Joined: Dec 2011
Posts: 1,823
Netherlands
Reconnoiter Offline
Serious User
Reconnoiter  Offline
Serious User

Joined: Dec 2011
Posts: 1,823
Netherlands
I have been messing with transparency to in Shade-C and it seems you have 2 options and maybe this will be of help to you:

1) One is when you either fully hide or show a part of the texture (bit like the OVERLAY flag in gs3d).

2) and the other is normal transparency.

For both you have to set the TRANSLUCENT flag for the entity, than in the shade-c .fx file you use in your material only uncomment '#define ALPHA' to get result 1 (OVERLAY like) or uncomment both '#define ALPHA' and '#define TRANSPARENT' for result 2. And your entity's texture needs to have transparent layer or an alpha channel (so use a .png or 32 bit .tga texture) otherwise it will be invisible.
What is pretty cool that stuff like shadows and emissive masks still seem to work correctly for transparent parts too, only gloss maps doesn't seem to work I think.

Here is an example of a .fx file for transparent material:

Code:
//------------------------------------------------------------------------------
//----- USER INPUT -------------------------------------------------------------
//------------------------------------------------------------------------------

//assign skins
#define SKIN_ALBEDO (skin1.xyz) //diffusemap
#define SKIN_ALPHA (skin1.w) //alphamap
#define SKIN_NORMAL (skin2.xyz) //normalmap
#define SKIN_GLOSS (skin2.w) //glossmap
#define SKIN_EMISSIVEMASK (skin3.y) //emissive mask
#define SKIN_COLOR (skin3.w) //(team)color mask

#define NORMALMAPPING //do normalmapping?

#define GLOSSMAP //entity has glossmap?
//#define GLOSSSTRENGTH 0.2 //glossmap channel will be set to this value if GLOSSMAP is not defined

#define ALPHA //entity has alphamap?
#define TRANSPARENT //entity alpha should be interpreted as transparent/translucent?

#define EMISSIVEMASK //use emissive mask? (formula: emissive_color = SKIN_EMISSIVEMASK * SKIN_ALBEDO)


//------------------------------------------------------------------------------
// ! END OF USER INPUT !
//------------------------------------------------------------------------------

#include <scHeaderObject>

//custom code goes here

#include <scObject>


Page 1 of 2 1 2

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1