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.

Author
Message
chafari
Valued Member
17
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 23rd Mar 2020 12:44 Edited at: 23rd Mar 2020 12:53
Hi there .
Lately I've been playing with raycasting techniques .I don't want to reinvent the wheel, but after having all the power of 3D, somehow I get bored with so much perfection that exists in today's games .knowing that I will never reach such perfection , I have become more interested in the old games of the 90s .I have tried to understand carefully how fake 3D is achieved .What I mainly try ,is to use only the 2D painting commands to simulate the fake 3D .This implies knowing the painting order of each object .This can be done in any programming language that has the ability to draw like box line circle etc. At the moment I have made a small example of how we move through a 2D environment simulating a 360 world . This example does not use image or sprites ....just painting .




use a/s and cursor to move in 3D

I'm not a grumpy grandpa

Attachments

Login to view attachments
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 23rd Mar 2020 13:28
The fake 3D program works very well im impressed
but the source code showing the trees to me only ever draws the
back trees over the top of the front ones. I figure this should only
happen when I press space

Great stuff as always Chafari

fubarpk on Itch...………...https://fubarpk.itch.io/
fubarpk on googleplay..https://play.google.com/store/apps/developer?id=fubarpk
chafari
Valued Member
17
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 23rd Mar 2020 14:27
@fubarpk. Thanks for testing . Doesn't it show correctly the trees order when presing spacekey ?
I'm not a grumpy grandpa
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 23rd Mar 2020 14:40
when the trees went to the back they were drawn over the top of the front trees

fubarpk on Itch...………...https://fubarpk.itch.io/
fubarpk on googleplay..https://play.google.com/store/apps/developer?id=fubarpk
chafari
Valued Member
17
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 23rd Mar 2020 14:48 Edited at: 23rd Mar 2020 14:57
The trees should be correct when pressing spacekey...I will chek it.


Edited
This code works without pressing spacekey . I put the condition of pressing spacekey just people could see the difference . I hope it works for you.


I'm not a grumpy grandpa
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 23rd Mar 2020 20:05
That code works well

fubarpk on Itch...………...https://fubarpk.itch.io/
fubarpk on googleplay..https://play.google.com/store/apps/developer?id=fubarpk
Mesher
User Banned
Posted: 23rd Mar 2020 20:30
Really good trick too Chafari, great inspirational idea
chafari
Valued Member
17
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 23rd Mar 2020 23:20 Edited at: 23rd Mar 2020 23:24
@fubarpk Thanks for your feedback .

@Mesher Coming from you it's a great compliment .I have seen some of your codes and they are impressive .

Here a new variant code




And here a little gif showing how thist tecnic of raycasting works .

I'm not a grumpy grandpa

Attachments

Login to view attachments
Mesher
User Banned
Posted: 23rd Mar 2020 23:33 Edited at: 23rd Mar 2020 23:34
Your welcome - you will remember me in one way shape or another - i just learnt my emotions.

Keep them coming - your coding is very good and inspirational to others

Good man
Mesher
User Banned
Posted: 23rd Mar 2020 23:46 Edited at: 24th Mar 2020 00:05
I might try one of those challenges again soon to create something out of the ordinary... Gives me something to work for at home with a deadline to meet etc... We all love those dont we and the outcomes of what people here do and acheived with AppGameKit??

Showing AppGameKit true potential with the bestest of best programmers here to show the beginners how to program in AGK.

Thats why there are thought of I feel.

PS - I can still Outrun, Chase HQ, Lemmings, Donkey Kong, again... and many more...

What ever everyone flavour is, shout.. Then we can develop it..

GreekToMe
14
Years of Service
User Offline
Joined: 27th Oct 2009
Location: Colorado
Posted: 24th Mar 2020 14:42
Excellent![u]
Much food for thought!
Personally, I am "all eyes and ears", as I fall the the beginner learning category and guys like all of you above, are inspirational. I enjoy breaking down your code and figuring out your thought process.
Yes, IMHO I learn more and faster from programmers with advanced skills than everything else put together.
I have improved my knowledge and my programming skills in the past three weeks tenfold, thanks to guys like you! You rock!
@Mesher, I am still here and thanks again for your previous help.
Got a new/used laptop. Just finished making it "mine". (Alienware 17 R3). A couple of years old, but I paid exactly 19 cents to the dollar against the original sales price. I like the 17" screen.
Ok, I get it. Too much off the subject chatter. BTW, was I ever in the subject?
Cheers!
chafari
Valued Member
17
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 28th Mar 2020 12:02 Edited at: 28th Mar 2020 12:04
@Thanks GreekToMe ....
Here's Mr Potato in the fake 3D world .

I'm not a grumpy grandpa

Attachments

Login to view attachments
GreekToMe
14
Years of Service
User Offline
Joined: 27th Oct 2009
Location: Colorado
Posted: 28th Mar 2020 12:30
Nice!
Cheers!
GaborD
6
Years of Service
User Offline
Joined: 3rd Dec 2017
Location:
Posted: 28th Mar 2020 12:46
Really cool!
chafari
Valued Member
17
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 28th Mar 2020 13:47
@GreekToMe /@GaborD Thakns for your feedback....more to come
Cheers.
I'm not a grumpy grandpa
GaborD
6
Years of Service
User Offline
Joined: 3rd Dec 2017
Location:
Posted: 28th Mar 2020 14:23
Looking forward to what you come up with. I wonder how far you can push it on modern computers.
This is a really exciting project in my opinion, I loved those oldschool techniques, they were great fun even back when computers could barely handle it.
Now you can likely make something really cool and unique with the approach.

chafari
Valued Member
17
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 28th Mar 2020 15:00
@GaborD
Yeah ...I alwais was more focused in 3D... but now I want to simulate 3D using old tecnics. I have done this raycasting and mode7 even in Qbasic. We don't need last PC to make it run. Old retro games are what I like more. Let see what I will finally do at the end....at least now I lnow the tecnic.
Cheers.
I'm not a grumpy grandpa
nz0
AGK Developer
16
Years of Service
User Offline
Joined: 13th Jun 2007
Location: Cheshire,UK
Posted: 28th Mar 2020 17:41
Love it.

I'm currently mulling over a remaking a classic old 3D game using some kind of retro process - this could be interesting.

Have you thought about combining it with Vector Bobs? I thought about converting my old Vector Bob routine I made in JavaScript years ago. Maybe they would compliment one another.
chafari
Valued Member
17
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 28th Mar 2020 20:23 Edited at: 28th Mar 2020 20:27
@nz0. Thanks. In this example I have not use sprites or images only drawing ....it was more like a challenge, but of course we could use vector bobs . What I was trying to achieve was to learn the technique of raycasting and how to add objects in scene using mode7. No too much people using 2d .

Cheers.
I'm not a grumpy grandpa

Login to post a reply

Server time is: 2024-04-19 13:20:42
Your offset time is: 2024-04-19 13:20:42