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 / Concerning 2d on 3d backgrounds [DBC]

Author
Message
At the Gates
20
Years of Service
User Offline
Joined: 16th Dec 2003
Location: Sweden
Posted: 7th Feb 2004 04:56
Hi! My friend and I decided to make an adventure (well almost)
type game (in DBC) with 2d characters on 3d background (think
Klonoa, Tombi or Castlevania: SotN on PSX), but after some
time, we kinda got stuck... hence I decided to post some
questions...

1) Is it possible to make some kind of collision-detection with
sprites and polygons/objects? If so, could anyone explain how
to achieve this?

2) Since we didn't manage to make some stuff with sprites, we
tried to make a simple plane with a texture of the character,
but it turned out as shown below...



Now... eh... is it possible to make the black stuff around the
actual character transparent?

3) Any good techniques on making collision stuff for many objects
without using tons of code (my friend tried some stuff with a few
variables triggering each object, but that didn't work too well)?

4) Are there any tutorials on how to make these kind of games out
there? Do YOU have any tips for stupid guys like us ?

God is Dead
BearCDPOLD
20
Years of Service
User Offline
Joined: 16th Oct 2003
Location: AZ,USA
Posted: 7th Feb 2004 06:22
Hi At_The_Gates,
1: I don't really know.

2: You should be able to.

3:Yes, go to http://www.nuclearglory.com. $15 gets you their excellent collision system that makes things so much easier.

4: Nuclear Glory!

Juvenile Industries
Current Project: KillZone(FPS)
Soon to come:An rts, and a snowball fight game
At the Gates
20
Years of Service
User Offline
Joined: 16th Dec 2003
Location: Sweden
Posted: 7th Feb 2004 19:02
Thanks, CDP!

Now... two questions to go.

God is Dead
Mentor
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: United Kingdom
Posted: 7th Feb 2004 20:17
try the

set object transparency objnum,flag

command, if you have pro then sprites are plain objects, but placed right in front of the camera, so just use plains and develop your own collision systems using the 3D commands, to check for collision with 200 objects try something like this

sync on:sync rate 60
make object cube 500,1.5
position object 500,-1,0,-1
for i=1 to 200
make object cube i,1
position object i,rnd(100),0,rnd(100)
next i
point object 500,1,0,1
do
for i=1 to 200
if object collision(500,i) then text 200,20,"BUMP! OBJECT:"+str$(i)
next i
if leftkey() then turn object left 500,1
if rightkey() then turn object right 500,1
if upkey() then move object 500,0.2
position camera object position x(500)+14,18,object position z(500)+10
point camera object position x(500),0,object position z(500)
sync
loop

you use loops to check large numbers of quantitys, a loop has a start value, an end value, a name for the variable it uses to keep count and an optional increment, try these

for number=1 to 100
print number
next number

for number=700 to 800
print number
next number

for number=1 to 100 step 10
print number
next number

for number=100 to 0 step -1
print number
next number

these will count through values, you can use these values to refer to objects or locations in an array, or just to print sequenial numbers, always get the computer to do the work, if you are typeing lots of code that is all almost the same eg

if a=1 then print "a=1"
if a=2 then print "a=2"
if a=3 then print "a=3"
........
etc
up to...........
if a=9000 then print "a=9000"

then do it as

for i=1 to 9000
if a=i then print "a=",i
next i

just a bit shorter...eh?

Mentor.

System spec : Pentium 3.0Ghz, 512MB DDR, 2x160Gb HD (using icewave hd coolers ), DVD RW/CD RW (all modes), multimedia front panel, 6 way surround sound, ATI radeon 9800Pro 128mb.
At the Gates
20
Years of Service
User Offline
Joined: 16th Dec 2003
Location: Sweden
Posted: 10th Feb 2004 02:10 Edited at: 10th Feb 2004 02:11
Thanks! Ugh... now I've got some more stupid questions...

1) Can you change the size of each face in a matrix?

2) Since we're doing this castlevania-inspired game (well, let's
say it's a remake on CV2 - simon's quest), we kinda like to have
the whip... anyone who tried to make some whips in their games?
Any suggestions on how to make the character fly around the level
like spiderman (you know, throwing the whip into a tree or some-
thing, make it stick there and then hurl yourself over an enemy
or something)?

3) As you see in the pic with the red line, the character will be
only able to move to these places (since it's a 2d chara). Now I
wonder... can you tell DBC where on a matrix it would be possible
to move upwards, as in the pic?

4) Should I make the levels as a matrix (the hard way) or as a
3d object (simple way)? Which is prefferable?

[img]http://pa1201.port5.com/test graphics 01.jpg[/img]

[img]http://pa1201.port5.com/test graphics 02.jpg[/img]

Oh yeah... these pics are not from the actual game, but only how
it may look like if we actually succeed.

God is Dead
sponge008
20
Years of Service
User Offline
Joined: 8th Feb 2004
Location: MA, USA
Posted: 12th Feb 2004 22:37
For the original #2, just after the position, add a 1.
IE: paste image 1,20,30,1
BearCDPOLD
20
Years of Service
User Offline
Joined: 16th Oct 2003
Location: AZ,USA
Posted: 13th Feb 2004 04:42
1) Yes, but I forget how. Try using the MagicWorld editor, it's the easiest way to create and use matrices.

2)Unfortunately I haven't seen the whip. Some things to keep in mind though, for standard attack you can just have several different animations for web slinging. For spiderman type stuff you will need to rotate him around a point back and forth. Spend a lot of time making this a neat feature, and you can be famous in the db community.

3) If you are talking about moving upwards to move around the box, you can just have an invisible box object you can detect collision against.It will prevent the player from moving up until you want him to. If you want to jump, just write a little gravity algorithm so that when you jump he moves upupup up.... then slowly down. There's an example in the help files.

4) I prefer to use 3d objects because that is what Nuclear Glory's Collision Dlls support. I also make my maps in Total Terrain, use Milkshape's heightmap reader and away I go. If you are writing your own collision method then use matrices, so you can take advantage of teh GROUND HEIGHT command.

...just now saw screen shots. That is beautiful. You have some really nice artists on your team, the approach to levels is fantastic and has a distinctive and intriguing style. Keep up the excellent work.

Crazy Donut Productions

Juvenile Industries
Current Project: KillZone(FPS)
Soon to come:An rts, and a snowball fight game
At the Gates
20
Years of Service
User Offline
Joined: 16th Dec 2003
Location: Sweden
Posted: 13th Feb 2004 13:24
Hehe... thanks! Actually, I'm the artist, so double-thanks, I
guess . The skeleton on that pic is ripped from Castlevania5,
so if he was the reason why you thought it looked good, then I
guess you should thank Konami for that one . Our "team" consists
of two fellows, me and Uncle Bosse (he has posted some questions in
the forum as well) so you cold call it a "duo" if you like.

I take care of the music and graphics, while he codes the tricky
parts and everything else...

Thanks for the help btw...

God is Dead

Login to post a reply

Server time is: 2024-09-21 21:04:22
Your offset time is: 2024-09-21 21:04:22