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.

Author
Message
pavel_sv_1982
13
Years of Service
User Offline
Joined: 9th Apr 2013
Location: Russia
Posted: 26th May 2014 00:00 Edited at: 26th May 2014 16:25
I wrote the code. but the code does not work as I planned.
Help me find the error. please.

SamKM
17
Years of Service
User Offline
Joined: 25th May 2009
Location:
Posted: 26th May 2014 01:46 Edited at: 26th May 2014 01:47
Quote: "I wrote the code. but the code does not work as I planned. "

Hope you don't mind me saying so, but it's normally good to include a little more detail, if you can
It just helps us to solve the problem faster... What part of it is not working as you planned?
Also, that spoiler text is a new one on me
It might work better to use code tags, though!
I did have a look at your code, I think the problem is what you're doing when placing the cubes. Each time you turn an object into a limb and add it to the root object, it gets repositioned to the centre of the object, so there's no point in using position object before you turn it into a limb. You need to do that using offset limb after you've added it
I should probably give you a warning about this project, though! Making a Minecraft-type game in DBPro might seem straightforward - place a load of cubes down to make the landscape, and the rest is just gameplay. It's not like that though, unfortunately
I spent about a year and half a while back (when I didn't know DBPro so well) working on my own Minecraft-style game. I was pretty excited about it, and thought it was going to massively take off. Unfortunately, I gave up on it in the end. I couldn't add any more landscape to the game without it lagging horribly. The reason was I was treating each block in the game as an individual cube... Not a great idea, apparently :/
You're doing it using limbs, which is probably a better idea, but is still likely to cause the FPS to drop very quickly with too many cubes.
It is possible to do it, but for that you need to look into advanced vertexdata manipulation, and that takes a while to figure out.
Either way, good luck, and happy coding

The code never bothered me anyway...
Derek Darkly
14
Years of Service
User Offline
Joined: 22nd Sep 2011
Location: Whats Our Vector, Victor?
Posted: 26th May 2014 03:01 Edited at: 26th May 2014 03:44
Using offset limb 5,tt,0,0,0 will only keep your limbs in the same position.

Try this:
offset limb 5,tt,(x1*10),(y1*10),(z1*10)



666GO†O666
Derek Darkly
14
Years of Service
User Offline
Joined: 22nd Sep 2011
Location: Whats Our Vector, Victor?
Posted: 26th May 2014 04:18 Edited at: 26th May 2014 04:19
And Sam is right... you will eventually experience a major FPS hit once too many cubes are on the screen.
I had the same happen with my early program Z-CUBES.

I'm wondering if the Dark Occlusion plugin would effectively take care of this issue. Anyone?

666GO†O666
pavel_sv_1982
13
Years of Service
User Offline
Joined: 9th Apr 2013
Location: Russia
Posted: 26th May 2014 13:10 Edited at: 26th May 2014 17:45
I thought that adding a limb automatically changes to the data vector.
if you look ...
I removed the visible object and the mesh object .....
but it did not help ....
as can be seen from the figure still fell FPS.

Derek Darkly
Quote: "
I'm wondering if the Dark Occlusion plugin would effectively take care of this issue. Anyone?
"


it works. I downloaded the demo version and check.


How to combine Sparky and Dark occlusion?



the collisions don't work
VisualProg
17
Years of Service
User Offline
Joined: 31st Mar 2009
Location: RussianFederation, Smolensk
Posted: 26th May 2014 16:55 Edited at: 28th May 2014 09:53
Quote: "I removed the visible object and the mesh object .....
but it did not help .... "

correctly. Object still participates in low-level loop. You must use the "Exclude object", but it also does not solve the problem. You need low level coding or drop all the objects into a one mesh.

Так уж повелось, что в DBP даже объекты "вне сцены" тратят ресурсы на примитивном счётчике при отрисовке под DirectX. Если убрать объект из рендера - на выходе его не будет, однако, часть ресурсов CPU уйдёт на пропуск этого объекта. Можно проверить, 1000 объектов по 6 полигонов будут рисоваться почти в несколько раз медленнее чем 1 объект на 7000 полигонов



This method very slow for your implementation. You need to combine "similar objects" in the mesh group. DBP will spend a lot of extra resources to search for all "separate" objects.

Quote: "don't work"

Do you can be more informative?

MZh[NUL] <---

pavel_sv_1982
13
Years of Service
User Offline
Joined: 9th Apr 2013
Location: Russia
Posted: 26th May 2014 17:20 Edited at: 27th May 2014 06:50
The collisions is worked.

need Dark Occlusion

Login to post a reply

Server time is: 2026-07-05 17:55:33
Your offset time is: 2026-07-05 17:55:33