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 / Best practise for 2d Scroller

Author
Message
Venatusio
12
Years of Service
User Offline
Joined: 6th Mar 2012
Location:
Posted: 21st Mar 2012 04:53 Edited at: 21st Mar 2012 07:04
So I have had a few stabs at a 2D scroller mainly following the tutorials in Dark Basic Pro Game Programming book, which are based on arrays and tiles and ahhh yes scrolling.

Take 1 - Load whole map in and scroll around.
Take 2 - Load part of map into scroll buffer and just reload parts as player moves.

But now I have read a few posts talking about using 2D planes with a 3D camera (not sure I get what that is yet, but that aside) is that the best approach for making a 2D scroller.

Ultimately should I be using 3D and cameras (an area I haven't looked at yet) for a 2D scroller?

Just want to know if that is the commonly accepted best practise?
zeroSlave
15
Years of Service
User Offline
Joined: 13th Jun 2009
Location: Springfield
Posted: 21st Mar 2012 06:58 Edited at: 21st Mar 2012 07:39
I've found that using 3D is the best approach. Makes it easier to rotate the "sprites", scroll them, etc. I'm pretty sure that sprites are really just 3d plains. At least that's how it's approached in OpenGL. I'm not sure how DBP does it.

Pincho Paxton
21
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 21st Mar 2012 15:31
There are many advantages with 3D looking down on a surface. You can have realtime shadows, you can rotate the screen in a circle, you can have perspective. You have the choice to use 2D flat drawings, or 3D models. You have real parallax scrolling. You have real perspective. You can overlay a transparent HUD easier. And much more.

Venatusio
12
Years of Service
User Offline
Joined: 6th Mar 2012
Location:
Posted: 21st Mar 2012 23:58
Thanks guys,

I wanted to do a scramble clone:

http://www.1980-games.com/us/old-games/java-games/scramble.php

And although it is only going to be 2D it sounds like using 3D/Cameras has plenty of advantages to warrant going that path.

So I guess its time to read the 3D chapters in my book.

Thanks again.
TheComet
17
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 26th Mar 2012 11:13 Edited at: 26th Mar 2012 11:14
A cool pro tip: When you use 3D plains to simulate images, use set object filter <obj> , 0

Get's rid of the blurriness and makes it look a lot sharper.

TheComet

Login to post a reply

Server time is: 2024-11-22 04:28:33
Your offset time is: 2024-11-22 04:28:33