Posted: 13th Jun 2007 17:40
I was looking at ordering the Hands on Dark Basic Pro Book series and I was wondering how drastically is X10 going to change the coding? I know Lee was saying the way objects and such are handled different. I'm just trying to get an understanding of how much that will all change.
I may have to listen to that video again about that.
SoulMan
Posted: 13th Jun 2007 17:50
Probably won't change much more than just dumping some old and tired commands, but the addition of object instancing is the major one.

This means that you might load in 1 enemy object, then instance it several times, change each ones texture and proportions so they look unique, and it'll run much faster than with the current DBPro, because of the DX10 features. Rendering an instanced object is much much faster than if the object was unique - great news for people making FPS games or games with lots of similar enemies.
Posted: 13th Jun 2007 18:00
I would imagine that the tools such as Dark Shader would be upgraded to handle the new stuff from DX10, correct?
SoulMan
Posted: 13th Jun 2007 21:26
Instancing was introduced in SM 3.0 and as far as I know does not require DirectX 10.
Posted: 13th Jun 2007 21:27
What does the INSTANCE OBJECT command do, then? (In our current, perfectly adequate DBPRO)
Posted: 13th Jun 2007 22:08
Instanced objects currently have to share the same texture. You have to clone the object if you want different textures.

For example- run this code once then change the "instance object" to "clone object" and see the difference when you run it again.


+ Code Snippet
sync on
sync rate 0
randomize timer()
hide mouse
autocam off
make memblock 1,140
write memblock dword 1,0,1
write memblock dword 1,4,1
write memblock dword 1,8,32
write memblock dword 1,12,rgb(255,0,0)
make image from memblock 1,1
write memblock dword 1,12,rgb(0,255,0)
make image from memblock 2,1
write memblock dword 1,12,rgb(0,0,255)
make image from memblock 3,1
make object cube 1,100
texture object 1,rnd(2)+1
for i=2 to 20
	`clone object i,1
	instance object i,1
	scale object i,rnd(200)+1,rnd(200)+1,rnd(200)+1
	position object i,rnd(1000)-500,rnd(1000)-500,rnd(1000)-500
	texture object i,rnd(2)+1
	rotate object i,rnd(360),rnd(360),rnd(360)
next i
do
sync
move camera upkey()-downkey()
rotate camera camera angle x()+mousemovey()/2.0,camera angle y()+mousemovex()/2.0,camera angle z()
loop