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 / two simple question (DBC)

Author
Message
aticper
18
Years of Service
User Offline
Joined: 27th Jan 2006
Location:
Posted: 3rd Feb 2006 22:28
Hello again,
I have a couple of questions:

1. I have been trying to texture a matrix, and it gives me an error message saying "file not found". Oddly enough, the built in games are textured perfectly. Any ideas?

2. I was wondering if anyone knew if there was any way to make a matrix into a three dimentional shape, or to wrap it around a three dimentional shape perhaps?

Once again, any solutions will be greatly appreciated.

Thanks,
Atic per

I'm not paranoid. Stop thinking that I'm paranoid!
Flaming Ghost
19
Years of Service
User Offline
Joined: 29th Apr 2005
Location: Um...Right here
Posted: 4th Feb 2006 16:52
well with the file not found, is the file you are trying to load in the project's folder? I had that peoblem when I just started out . And to make a matrix wrap around an object, I don't Think, think is a keyword, that you can. But if you need a special object shape you can use Milkshape, it's a good cheap program.


LIGHT FRENZY (almost done!)
Best Noobish game ever.
aticper
18
Years of Service
User Offline
Joined: 27th Jan 2006
Location:
Posted: 5th Feb 2006 06:23
Thanks. I finally got it to work. Oh, and I think I fixed my matrix troubles.

thanks again,
aticper

P.S. If you want to see what I was writing(without the textures), it is below.



it is a landscape editor
enter toggles the lift variable up, shift toggles it down, control raises the landscape, and space dents it.

I'm not paranoid. Stop thinking that I'm paranoid!
Big Man
19
Years of Service
User Offline
Joined: 4th Feb 2005
Location: BEHIND YOU!!!! (but I live in England)
Posted: 5th Feb 2006 12:34
hi

how long have you been programming for.
Cause if you've only just started out dont you think that a landscape editor is a bit complex.

BM

Our aim is to keep the loo's clean, your aim can help.
aticper
18
Years of Service
User Offline
Joined: 27th Jan 2006
Location:
Posted: 7th Feb 2006 16:27
Hi.
I've been learning to program for about two months... It is not really a landscape editor i suppose, I mean, it wont save anything your doing and let you use it later (although it COULD do this with some modification) it's more just something to play with when your bored.

For soem reason the code button did not work, so here it is.


remstart

load bitmap "grass10.bmp",1
get image 1,0,0,256,256
delete bitmap 1

remend
rem make matrices
make matrix 1,1000.0,1000.0,25,25
position matrix 1,2,2,2

remstart
rem Prepare matrix with a texture cut into a 2x2 texture grid
prepare matrix texture 1,1,2,2

rem Fill matrix with first texture tile
fill matrix 1,0.0,1
for x=0 to 10
for y=0 to 10
if rnd(2)=0 then set matrix tile 1,x,y,2
set matrix tile 1,0,y,3
set matrix tile 1,10,y,3
set matrix tile 1,x,0,3
set matrix tile 1,x,10,3
set matrix tile 1,x,5,4
set matrix tile 1,x,5,4
next y
next x
update matrix 1
remend


rem make sculptor tool
sync on
make object sphere 1,10
color object 1,rgb(170,1,1)

DO


rem Position camera

cpx# = object Position X(1)
cpz# = object Position Z(1)
cpy# = get ground height(1,cpx#,cpz#) + 30

set camera to follow cpx#,cpy#,cpz#,c_angle#,190,100,1,1



Rem move within the matrix
if leftkey() = 1 then lateral# = wrapvalue(lateral# - 3.0)
if rightkey() = 1 then lateral# = wrapvalue(lateral# + 3.0)
if upkey() = 1 then move object 1,13
if downkey() = 1 then move object 1,-13
yrotate object 1,lateral#
if leftkey() = 1 then c_angle# = c_angle# - 3
if rightkey() = 1 then c_angle# = c_angle# + 3





mpx# = object position x(1)/40
mpz# = object position z(1)/40
rem sculpt tool denting

if shiftkey() = 1 then hv# = hv# - 10
if returnkey() = 1 then hv# = hv# + 10

if spacekey() = 1 then height# = height# - hv#

if upkey() = 1 or downkey() = 1 then inc h#
if h# = 3 then h# = 0
if h# = 2 then height# = 0



if spacekey() = 1 then set matrix height 1,mpx#,mpz#,height#

If controlkey() = 1 then height# = height# + hv#

if upkey() = 1 or downkey() = 1 then inc h#
if h# = 3 then h# = 0
if h# = 2 then height# = 0



if controlkey() = 1 then set matrix height 1,mpx#,mpz#,height#

update matrix 1

sync

LOOP


aticper

I'm not paranoid. Stop thinking that I'm paranoid!

Login to post a reply

Server time is: 2024-09-24 15:37:25
Your offset time is: 2024-09-24 15:37:25