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.

DarkBASIC Professional Discussion / Retro pseudo 3D in 2D how was it done. Screenshot inside :)

Author
Message
AndyPandy
20
Years of Service
User Offline
Joined: 12th Oct 2004
Location:
Posted: 23rd Nov 2005 23:40
Can this be done with the 2D component of DBP?

Attachments

Login to view attachments
Avan Madisen
22
Years of Service
User Offline
Joined: 12th Sep 2002
Location: The Castle Anthrax
Posted: 23rd Nov 2005 23:46 Edited at: 23rd Nov 2005 23:48
Sure it can, it's just figuring out how!

That particular effect I belief is called 'paralax perspective'.

Don't look at me like that!
You're just jealous because the voices are talking to me!
AndyPandy
20
Years of Service
User Offline
Joined: 12th Oct 2004
Location:
Posted: 23rd Nov 2005 23:47
its prety easy to emulate using 3d commands but i want to use 2D for the challenge.
Tapewormz
22
Years of Service
User Offline
Joined: 15th Sep 2002
Location: Winnipeg, Mantoba, Canada
Posted: 23rd Nov 2005 23:54 Edited at: 23rd Nov 2005 23:57
Bi-linear parallax scrolling was used in so many great games. Outrun, Afterburner, Space Harrier, Power Drift... Very cool technique. You'll need a large tileset.

Red Ocktober
21
Years of Service
User Offline
Joined: 6th Dec 2003
Location:
Posted: 23rd Nov 2005 23:59 Edited at: 24th Nov 2005 00:00
same question is asked in the 2D forum... by the same person...
is this normal operating procedure...

just asking...

--Mike
Tapewormz
22
Years of Service
User Offline
Joined: 15th Sep 2002
Location: Winnipeg, Mantoba, Canada
Posted: 24th Nov 2005 00:01
You might be able to google bi-linear paralax scrolling and find something in a game dev forum on the technique.

spooky
22
Years of Service
User Offline
Joined: 30th Aug 2002
Location: United Kingdom
Posted: 24th Nov 2005 00:01
That game looks like Lotus Turbo Challenge 2 on the Amiga - brilliant game.

Boo!
AndyPandy
20
Years of Service
User Offline
Joined: 12th Oct 2004
Location:
Posted: 24th Nov 2005 00:01
yes sorry, i didnt seem to be getting much interest in there. Is Bi-linear parallax scrolling and easy thing to do? Can it be done in DBP? and last but not least, is there a tutorial out there?
Tapewormz
22
Years of Service
User Offline
Joined: 15th Sep 2002
Location: Winnipeg, Mantoba, Canada
Posted: 24th Nov 2005 00:25
I haven't been able to find anything. I did alot of searching, but came up dry. Sorry.

Philip
21
Years of Service
User Offline
Joined: 15th Jun 2003
Location: United Kingdom
Posted: 24th Nov 2005 00:57
Quote: "That game looks like Lotus Turbo Challenge 2 on the Amiga - brilliant game."


The screenshot IS from Lotus Turbo Challenge 2 from the Amiga.

I remember it vividly. It was one of the Magnetic Fields games published by Gremlin. I used to know some of the Gremlin crew as they were based in Sheffield, just up the road from where I grew up.

Plus, it had a very naughty subliminal message. If you unplugged one of the speaker wires, thus making the sound mono, you used to hear someone say: "Do not copy this game". I kid you not. There was quite a rumpus when this was first discovered - I remember much reasoned complaining about it in Amiga Format.

Philip

Cheer if you like bears! Cheer if you like jam sandwiches!
RiiDii: "I highly recommend Philip's vector tutorials"
P3.2ghz / 1 gig / GeForce FX 5900 128meg / WinXP home
that dude
21
Years of Service
User Offline
Joined: 1st Jan 2004
Location: USA
Posted: 24th Nov 2005 07:18 Edited at: 24th Nov 2005 07:18
looked like fun, so i made an example for you. enjoy. i know its kind of simple, but that should be the basics of what you need...

http://www.nuclearglory.com/?u=fearik = sweet as hell collision system. easy on that leather thing in your back pocket too.
the left side of my head isn't bigger, the right side is just smaller

Attachments

Login to view attachments
Kangaroo2 BETA2
21
Years of Service
User Offline
Joined: 23rd Aug 2003
Location: Somerset / UK
Posted: 24th Nov 2005 11:55
@That dude - hey thats a good start Nice example

that dude
21
Years of Service
User Offline
Joined: 1st Jan 2004
Location: USA
Posted: 24th Nov 2005 12:10
glad to help

http://www.nuclearglory.com/?u=fearik = sweet as hell collision system. easy on that leather thing in your back pocket too.
the left side of my head isn't bigger, the right side is just smaller
BatVink
Moderator
22
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 24th Nov 2005 12:26 Edited at: 24th Nov 2005 12:27
Subliminal Messaging is illegal. There have been a few cases in years gone by of Coca Cola and others flashing split-second images of their product in films, and increasing sales exponentially. You are basically bypassing the rational, decision-making part of the brain, and planting "desires" directly into the subconcious.

that dude
21
Years of Service
User Offline
Joined: 1st Jan 2004
Location: USA
Posted: 24th Nov 2005 12:31
Think of it as a car salesmen using jedi-mindtricks.

http://www.nuclearglory.com/?u=fearik = sweet as hell collision system. easy on that leather thing in your back pocket too.
the left side of my head isn't bigger, the right side is just smaller
AndyPandy
20
Years of Service
User Offline
Joined: 12th Oct 2004
Location:
Posted: 24th Nov 2005 21:03
@that dude, good stuff but how do they make the road bend and give the impression of hills? Im not expecting another example, just the principal i can apply to code. I really want to make a retro racer! By the way, did anyone notice the size of the exe?
adr
22
Years of Service
User Offline
Joined: 21st May 2003
Location: Job Centre
Posted: 24th Nov 2005 21:15
Sorry to hijack, but I just wanted to comment on Magnetic Fields games for the amiga. It didn't get much better than Supercars 1 and 2. I remember buying the white sports car and kicking some serious ass. What I'd love to know is how they fitted fun car physics into a 16Mhz cycle. I can't do it convincingly with 100 times that CPU power.

GIVE ME TEH CODES!

New 'n' Improved sig details how little I accomplish
that dude
21
Years of Service
User Offline
Joined: 1st Jan 2004
Location: USA
Posted: 24th Nov 2005 21:18
for hills, you calculate the y of the hill and move the trees and stuff acordingly. turns, you calculate the angle that you are to the tree and squash their x.

http://www.nuclearglory.com/?u=fearik = sweet as hell collision system. easy on that leather thing in your back pocket too.
the left side of my head isn't bigger, the right side is just smaller
AndyPandy
20
Years of Service
User Offline
Joined: 12th Oct 2004
Location:
Posted: 24th Nov 2005 21:22 Edited at: 24th Nov 2005 21:23
ok, but the background is a picture that includes the road. How would i bend the road in that picture or are we talking some kind of line draw that needs to be malipulated? im totaly lost The road foillage is fine i can cope with that lol
Me!
19
Years of Service
User Offline
Joined: 26th Jul 2005
Location:
Posted: 24th Nov 2005 21:40 Edited at: 24th Nov 2005 21:44
you draw the top near the horizon with an increasing/decreasing x, so the top curves around/moves across, then you scroll everything down one row and draw the next bit, the car stays put, if it runs off the "road" (onto the grass etc) it stops, the trick is to "steer" the car so that it stays on the track (oh realy! ), but actualy the "steering" biases the position the next horizon row of road is drawn, so when you "steer" left the road is drawn at its calculated position plus your input in the x plane, then scrolled down and the next horizon row drawn, rinse and repeat, if you didn`t "steer" then the section of grass in front of you would be scrolled down to the cars position and you would stop, all you actualy "draw" is a list of data that gives the next "across" for the horizon road position, plus data for the roadside items like billboards, trees, tunnel segments etc, then the main loop moves everything down one row and rescales it as it gets nearer, not very tricky, you could do it at reasonable framerates on a Spectrum or C64 in basic (reasonable being 7 to 15 fps for basic back then)



Do parachute manufacturers have a refunds policy?
AndyPandy
20
Years of Service
User Offline
Joined: 12th Oct 2004
Location:
Posted: 24th Nov 2005 21:56
i get the whole steering bit and the car stays put but i cant get it into my thick head how the road is going to curve. I even get the perspectave. Am i going to draw the road manually with lines that curve when a bend comes along?
Grog Grueslayer
Valued Member
20
Years of Service
User Offline
Joined: 30th May 2005
Playing: Green Hell
Posted: 24th Nov 2005 22:18
Quote: "Subliminal Messaging is illegal. There have been a few cases in years gone by of Coca Cola and others flashing split-second images of their product in films, and increasing sales exponentially. You are basically bypassing the rational, decision-making part of the brain, and planting "desires" directly into the subconcious."


They did that in theaters too... flashing a picture of a box of popcorn increased popcorn sales 200%.
Me!
19
Years of Service
User Offline
Joined: 26th Jul 2005
Location:
Posted: 24th Nov 2005 22:19 Edited at: 24th Nov 2005 22:41
it doesn`t realy lend it`self to a quick snippet (I was tempted), the road is drawn in scaled segments, the more left or right from the middle the more the edge of the segment is curved, or you could draw the rows pixel by pixel, one pixel per row in the foreground and where you would draw several in the distance at the same row then just keep an index of the last row drawn to make sure you only draw each row once (for speed) the basic code I wrote before used edges that went distinctly blocky on the curves because it was all done with block characters, if doing that you just need to infill the edges of the rectangle with a fillet the correct size, eg-ish



if you do the whole thing with the largest row in the foreground at just a pixel deep then you obviously don`t need to smooth the edge of the track out like that since the largest error will just be one pixel, but you need to draw many more lines per loop, that might be better done by locking pixels or writing to memory direct since its just simple rows being drawn and the trees etc are just sprites added afterwards.

[edit] rough example (no nice sine curves)




Do parachute manufacturers have a refunds policy?
zircher
22
Years of Service
User Offline
Joined: 27th Dec 2002
Location: Oklahoma
Posted: 25th Nov 2005 05:56
Just to cover the bases, AndyPandy. Have you thought about taking the RoadTerrain demo that comes with DBP and just replacing the motorcycle models with a car sprite?
--
TAZ

"Do you think it is wise to provoke him?" "It's what I do." -- Stargate SG-1
dark coder
22
Years of Service
User Offline
Joined: 6th Oct 2002
Location: Japan
Posted: 25th Nov 2005 06:19
but thats all 3d which defeats the purpose of him trying to make a 2d game like that, as said above you can just shift various lines of text or you could make a big picture of a road and split it up into like 30 peices then paste them to the screen then increment the sprite numbers depending on how fast your car is traveling then it will look like you are driving down the road, and youll want to change the sprite sizes so they get narrower the further up they are and offset them when you go round corners, easy stuff really just getting it to look right maybe a lil rpoblem.


Mr Pointless
20
Years of Service
User Offline
Joined: 17th Oct 2004
Location: Stuck in the UK
Posted: 25th Nov 2005 22:55
Quote: "Quote: "Plus, it had a very naughty subliminal message. If you unplugged one of the speaker wires, thus making the sound mono, you used to hear someone say: "Do not copy this game". I kid you not. There was quite a rumpus when this was first discovered - I remember much reasoned complaining about it in Amiga Format.

Philip"
What's so 'naughty' about that? Unless it's that famous UK wit that I just wouldn't understand."


Just be grateful it was just "Do not copy this game". I heard the original plan was to have it say "Kill mommy and daddy" as a joke. Then common sense kicked in. Ish.

Amiga: INSERT DISK 7
User: "There isn't a disk bloody 7 in the box!"

Login to post a reply

Server time is: 2025-06-03 17:54:06
Your offset time is: 2025-06-03 17:54:06