? Virtual Parallax Barrier Tutorial (+Microphone/Playback Tutorial) ● SmileBASIC Source

Sign In

Register
*Usernames are case-sensitive
Forgot my password

Virtual Parallax Barrier Tutorial (+Microphone/Playback Tutorial)

Submitted
Updated
Author
amihart
Public Key
QREXZ3Y3
Min. Compat.
All
Rating
4 votes
Description As seen in SatoshiMcCloud's game "PLANE2SOLID", it is possible to create a 3D effect on the graphics screen using a virtual parallax barrier. This tutorial explains how to create the virtual parallax barrier using the SMILE tool, how to draw it to the screen, a simple way how to control what each individual eye sees, and even explains how to create 3D effects. Sorry the screenshots are kinda lame. The examples I provide in the tutorial actually require you to be looking at them through a 3D screen. There's not much I can actually show in the way of screenshots. It's mainly just text and a few examples. Edit: Updated with a section explaining how to make your own VPB with the SMILE tool, rather than just using one provided to you. Instructions Just run the program ".RUNME". It explains itself. I merged the files from the Microphone/Audio playback tutorial with this tutorial. You can view that tutorial by running the ".RUNME2".
Categories
Keywords
15 Comment(s) Shelly Shelly Really nice. I'm impressed! SpaceKadeta SpaceKadeta Im pleaased that you are here doing this. I couldnt figure out 3dplanetosolid program over a solid trying of a week. thanks to you... it is too easy champ RaichuBender RaichuBender Avatar Taboo I didn't change my avatar for 180 days Website Avatar Embargo I didn't change my avatar for 90 days Website Avatar Block I didn't change my avatar for 30 days. Website Wow, this sounds really cool! I'll check it out! MZ952 MZ952 Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength Drawing I like to draw! Hobbies Reading I like to read books! Hobbies This needed to exist. Thanks for making a tutorial! Minxrod Minxrod Summer 2016 Contest Participant I participated in the SmileBASIC Source Summer 2016 Contest! Programming Contest Expert Programmer Programming no longer gives me any trouble. Come to me for help, if you like! Programming Strength Pokemon Is Awesome! I love Pokemon! Express Yourself Wow, this was helpful! Thank you for making this! :) That Red-Blue screen is really uncomfortable though.... amihart amihart Haha, yeah. I just thought that would be a really straight-forward example. I'm glad you found this helpful, though! C: Minxrod Minxrod Summer 2016 Contest Participant I participated in the SmileBASIC Source Summer 2016 Contest! Programming Contest Expert Programmer Programming no longer gives me any trouble. Come to me for help, if you like! Programming Strength Pokemon Is Awesome! I love Pokemon! Express Yourself It's a good example , just painful ;) Do you think there is a way to do this with console characters instead? amihart amihart Not to my knowledge. If you just want the characters to be above the graphics screen, you can use the LOCATE command. If you want different characters to have different depths, you could do it, but you'd have to write your own library. Minxrod Minxrod Summer 2016 Contest Participant I participated in the SmileBASIC Source Summer 2016 Contest! Programming Contest Expert Programmer Programming no longer gives me any trouble. Come to me for help, if you like! Programming Strength Pokemon Is Awesome! I love Pokemon! Express Yourself I mean instead of using BG as the parallax barrier use a |||| character type thing instead? I might try this later. amihart amihart I don't think so. The "|" character doesn't actually appear as a straight line, and you can't draw them with separation of only 1 pixel. Perska Perska Summer 2016 Contest Winner I won the SmileBASICSource Summer 2016 Contest! Programming Contest Expert Programmer Programming no longer gives me any trouble. Come to me for help, if you like! Programming Strength RNG Hidden Easter Eggs FONTDEF amihart amihart Ah, okay. Would there be any benefit to using FONTDEF over BGFILL? snail_ snail_ Helper Received for being very helpful around SmileBASIC Source Achievements First Day Joined on the very first day of SmileBASIC Source Website Night Person I like the quiet night and sleep late. Express Yourself
If you want different characters to have different depths, you could do it, but you'd have to write your own library.
The z-coordinate for LOCATE isn't the offset of the entire screen, it's the offset taken by that particular character cell. Try this to see what I mean LOCATE 0,0,1024 PRINT "TEST" LOCATE ,,-256 PRINT "TEST AGAIN" If you knew that already and you meant something else, sorry, my mistake.
amihart amihart Ah, okay, my mistake. I'm used to using the graphics screen, I only use the console screen for basic debugging and I've never touched the sprite screen before or the background screen except for drawing the VPB. :P amihart amihart Minxrod, I tried your idea and it works! You can use the console screen for this. I might add this to the tutorial since it's a method that doesn't require an external file. You can literally draw the VPB with a single command: FONTDEF 0,"00010000"*32 That sets null character to a character with a bunch of lines, and if the console is cleared, that's the entire screen.