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 / loading sprites into the game

Author
Message
sjonny
18
Years of Service
User Offline
Joined: 25th Nov 2006
Location: darkbasic classic
Posted: 18th Dec 2006 16:16
im trying to load an image into the game and position it as well. the problem is that i need it on the matrix like furniture in a home, how to do that? i got this now:

Jerok
19
Years of Service
User Offline
Joined: 7th May 2005
Location: Mars. Wait a sec I\'m on MARS. OMG
Posted: 18th Dec 2006 16:34
I'm not exactly sure what you mean. Do you mean you want a 2d sprite to look like it is at a position on a 3d matrix or do you want it to be a tile on a 2d map?
TDK
Retired Moderator
22
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 18th Dec 2006 22:21
Sounds like you are confused about the term 'sprite'.

A sprite is nothing more than a flat 2D image which has extra features which make writing a 2D game easier. A sprite looks like the picture you place on it.

In 3D, you use 3D 'objects' which you position in 3D space. You can also put pictures onto them too - but in 3D they are called 'textures'.

There is a 3D object called a 'Plain' [Sic] which is actually a 2D rectangle which you can texture with an image - in a 'sprite-like' fashion.

When you mention placing furniture though, it sounds like you are talking about 3D objects.

If so, you place objects X,Y,Z 3D co-ordinates and if you are new to programming and don't understand this, you would be better sticking with 2D until you have a better grasp of the basic principles of co-ordinates.

Check out my beginners tutorials using the link in my sig below if you need any help.

TDK_Man

sjonny
18
Years of Service
User Offline
Joined: 25th Nov 2006
Location: darkbasic classic
Posted: 19th Dec 2006 18:04
well ok i made a 3d game, but how can i place those"textures" in game? or how to create it? i need it in 3d because it is a project for school. i get the 3d coordinates, but dont know how to make furnature for example

sjonny
Code Dragon
18
Years of Service
User Offline
Joined: 21st Aug 2006
Location: Everywhere
Posted: 20th Dec 2006 02:15
Quote: "i need it in 3d because it is a project for school"


If you don't know how to do what it is you want to do in 3d, you should try doing it in 3d, does your school really require that it be in 3d?

Anyway, why not just use a textured plain?

"Did I ever tell you how I got the nickname the Dragon of the West?"
"I'm not interested in a lengthy anecdote, Uncle."
"It is more of a demonstration really."
Mr X
19
Years of Service
User Offline
Joined: 25th Sep 2005
Location: Universe, milkyway, sol-system, Earth...
Posted: 20th Dec 2006 13:31 Edited at: 20th Dec 2006 13:32
If you want to texture 3d objects, do not use sprites. You just load an image, create an object, and then use the "texture object" command to texture it. Like this:
. Just replace the
with
. Sprites are used for 2d, not 3d .
sjonny
18
Years of Service
User Offline
Joined: 25th Nov 2006
Location: darkbasic classic
Posted: 21st Dec 2006 08:23
well ok i get that but how can you position the texture? i get a syntax error when i try it.
dark donkey
18
Years of Service
User Offline
Joined: 4th May 2006
Location:
Posted: 21st Dec 2006 14:22
Quote: "well ok i get that but how can you position the texture? i get a syntax error when i try it."
i dont get you, if you whant a image to be placed in 3d space then you cant, unless you aply you image to something like


that will aply the image to a cube.

load file "worlddomination.wrl",1
sjonny
18
Years of Service
User Offline
Joined: 25th Nov 2006
Location: darkbasic classic
Posted: 21st Dec 2006 17:27
ok i get it so i should design it myself with boxes.

Login to post a reply

Server time is: 2024-11-26 05:25:09
Your offset time is: 2024-11-26 05:25:09