Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / object grouping conversion and replacement

Author
Message
smerf
19
Years of Service
User Offline
Joined: 24th Feb 2005
Location: nm usa
Posted: 12th Dec 2012 00:05 Edited at: 12th Dec 2012 01:30
using dbpro.

I had an interest in writing a game similar to Minecraft.
gotten far into it already.

The idea is to minimize the amount of objects in the program,turning 1000 obj's into 1. If I store the the information in an array, I can recall it whenever I want and replace the fake/stand in object with blocks.

The question I have is how do I turn multiple objects or my chunk, like a 10x10x10 grid of cubes into a single object with the same shape and textures the orignial obj had

A child's dream never dies.
MrValentine
AGK Backer
13
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 12th Dec 2012 00:27
Perhaps an Array?

I am intrigued to see an answer to this, I might learn a thing or few

Brendy boy
18
Years of Service
User Offline
Joined: 17th Jul 2005
Location: Croatia
Posted: 12th Dec 2012 04:48
Quote: "like a 10x10x10 grid of cubes into a single object with the same shape and textures the orignial obj had"

you can't.

You can only "group" all objects that have the same texture.

If you would want them to combine into 1 object you would have to pick one of them and then add the others as it's limbs. After that you would make a mesh out of that object and that operation would combine all the limbs into 1. After that you would make a new object out of that mesh.

smerf
19
Years of Service
User Offline
Joined: 24th Feb 2005
Location: nm usa
Posted: 12th Dec 2012 16:46
bummer, definitely gonna make things a bit harder trying to manage objects. ty brendy. wasnt sure if it was possible to group multiples with different textures, guess not.

A child's dream never dies.
TheComet
16
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
smerf
19
Years of Service
User Offline
Joined: 24th Feb 2005
Location: nm usa
Posted: 13th Dec 2012 00:19
Very nice the comet, Your code is beyond me. Kind of a semi casual programmer myself, just do it whenever i get a some time off and bored or feel creative.Usually do my projects in stages over a period of time. Thank you though

A child's dream never dies.
Chris Tate
DBPro Master
15
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 14th Dec 2012 02:21
If you find it quite difficult to read the code recommended, a good way to learn someone elses code (without documentation) is to first look at the functions and routine names. Study the procedures, comment the uncommented parts. Play with the settings, see what they change.

In agreement with Brandons point about limb methods.

Your goals are pretty complicated if you are just starting out. But I can see how your task can be accomplished.

It is possible for one object to use about 8 textures, and each texture can contain as many sub-textures your graphics card can pack into one. These using a sub-texture atlas images, a grid of images can then be applied to your different blocks in the same object.

Because of that, it would be wise to define your world as a few objects with lots of limbs; rather than just a series of objects in the first place.

Each limb would then use UV coordinates to pick the texture you need from one of the 8 packs, in the first place. Thus, the blocks are limbs; rather than objects.

Furthermore what the player sees is the same object everywhere, you just layout their current view of nearby land using the object and exclude excess limbs (Frustum culling).

Anyway, you'd need alot of time and dedication to get that working; but it's not the end result, it's the journey, it's the enjoyment of the challenge

Login to post a reply

Server time is: 2024-03-28 22:25:23
Your offset time is: 2024-03-28 22:25:23