Omnimaga: The Coders Of Tomorrow
Welcome, Guest. Please login or register.
 
Omnimaga: The Coders Of Tomorrow
19 May, 2013, 04:24:01 *
Welcome, Guest. Please login or register.

Login with username, password and session length
 
   home   news downloads projects tutorials misc forums rules new posts irc about Login Register  
+-OmnomIRC

You must Register, be logged in and have at least 40 posts to use this shout-box! If it still doesn't show up afterward, it might be that OmnomIRC is disabled for your group or under maintenance.

Note: You can also use an IRC client like mIRC, X-Chat or Mibbit to connect to an EFnet server and #omnimaga.

Pages: [1] 2 3 ... 32   Go Down
  Print  
Author Topic: Nspire Raycaster -  (Read 27111 times) Bookmark and Share
0 Members and 1 Guest are viewing this topic.
bwang
LV7 Elite (Next: 700)
*******
Offline Offline

Last Login: 11 August, 2012, 12:59:06
Date Registered: 20 June, 2009, 01:42:58
Posts: 632

Topic starter
Total Post Ratings: +19

View Profile
« on: 23 March, 2010, 07:23:20 »
+2

I finally got around to writing some code for my Nspire raycaster project. Right now it is shamefully featureless, as it basically draws untextured walls from a scene defined by a hard-coded array in the source:

The big problem I'm having right now is getting the animation not to flicker (the above screenshot was not animated). Does anyone here (maybe calc84maniac?) know how to do flickerless animation on the Nspire?
Once I get the animation working, I'll add other things, like texture mapping and sprites. Also, does anyine know how to pause execution for a specified amount of time (so I can limit the frame rate)? Right now, from my preliminary flickery code, it seems like I have plenty of speed to work with.
Logged
DJ Omnimaga
Retired Omnimaga founder (Site issues must be PM'ed to Netham45, Eeems, Shmibs, Deep Thought and AngelFish, not me.)
Editor
LV15 Omnimagician (Next: --)
*
Offline Offline

Gender: Male
Last Login: Yesterday at 18:13:08
Date Registered: 25 August, 2008, 07:00:21
Location: Québec (Canada)
Posts: 50196


Total Post Ratings: +2611

View Profile WWW
« Reply #1 on: 23 March, 2010, 07:28:45 »
0

wow awesome, I hope to see more work on this Smiley

I wonder if you could eventually combine both raycasting and Mode 7? Calc84 did Mode 7 and raycasting, altough on z80, but he could maybe help for the Mode 7

Logged

Retired 83+ coder, Omnimaga/TIMGUL founder. Now doing power metal music (formerly did electronica)

Follow me on Bandcamp|Facebook|Reverbnation|Youtube|Twitter|Myspace
Builderboy
Physics Guru
LV13 Extreme Addict (Next: 9001)
*************
Offline Offline

Gender: Male
Last Login: Today at 03:28:01
Date Registered: 20 April, 2009, 00:28:53
Location: Ravenholm
Posts: 5642


Total Post Ratings: +589

View Profile
« Reply #2 on: 23 March, 2010, 08:30:46 »
0

Nice, glad to see you got this working.  Did you end up using the small step or the vertical/horizontile method?  Judging from the side shading on the walls I'm guessig it's the latter?  Looks good Smiley
Logged

bwang
LV7 Elite (Next: 700)
*******
Offline Offline

Last Login: 11 August, 2012, 12:59:06
Date Registered: 20 June, 2009, 01:42:58
Posts: 632

Topic starter
Total Post Ratings: +19

View Profile
« Reply #3 on: 23 March, 2010, 08:56:26 »
0

The horizontal/vertical method.
Logged
Builderboy
Physics Guru
LV13 Extreme Addict (Next: 9001)
*************
Offline Offline

Gender: Male
Last Login: Today at 03:28:01
Date Registered: 20 April, 2009, 00:28:53
Location: Ravenholm
Posts: 5642


Total Post Ratings: +589

View Profile
« Reply #4 on: 23 March, 2010, 08:58:51 »
0

Seems you might have a case value for the column directly in front of the camera Tongue maybe offset all of the columns by .5 degrees?
Logged

DJ Omnimaga
Retired Omnimaga founder (Site issues must be PM'ed to Netham45, Eeems, Shmibs, Deep Thought and AngelFish, not me.)
Editor
LV15 Omnimagician (Next: --)
*
Offline Offline

Gender: Male
Last Login: Yesterday at 18:13:08
Date Registered: 25 August, 2008, 07:00:21
Location: Québec (Canada)
Posts: 50196


Total Post Ratings: +2611

View Profile WWW
« Reply #5 on: 23 March, 2010, 09:38:14 »
0

I wonder... in the future, will you implement variable wall height? Calc84maniac had a raycaster using these in the works for a while for the 83+:

(Must view in Firefox or Opera, since other browsers won't support 30 fps gifs)





Logged

Retired 83+ coder, Omnimaga/TIMGUL founder. Now doing power metal music (formerly did electronica)

Follow me on Bandcamp|Facebook|Reverbnation|Youtube|Twitter|Myspace
mapar007
LV7 Elite (Next: 700)
*******
Offline Offline

Gender: Male
Last Login: 17 May, 2013, 19:30:00
Date Registered: 09 October, 2008, 17:38:37
Location: Mechelen, Flanders, Belgium
Posts: 553


Total Post Ratings: +23

View Profile
« Reply #6 on: 23 March, 2010, 18:37:41 »
0

Great!

I've got one little additional remark: most of the screen is left unused. I've never written raycasting/raytracing code, but is there a reason?

As for flickering, calc84 should know, he wrote the GBC emulator and such.
Logged

JoeyBelgier
LV7 Elite (Next: 700)
*******
Offline Offline

Gender: Male
Last Login: 11 May, 2013, 17:56:49
Date Registered: 21 June, 2009, 14:51:20
Location: Flanders - Belgium
Posts: 523


Total Post Ratings: +4

View Profile
« Reply #7 on: 23 March, 2010, 19:12:51 »
0

The raycasters on the 84+ with textures  (Wolfenstein83 and Gemini) don't use a large part of the screen either.
This because making it wider (so having to check more lines) uses a lot of recources.

Even at the 68k's a big part of the screen is not used for the raycasting.
The raycaster Cal84 made runs full screen but note not a lot of textures are added, no enemies so no AI having to run , no objects.. (:

I love those damn screenies
Logged

Formerly known as NecroF-_-ckk
Yeah, it has been a while.
DJ Omnimaga
Retired Omnimaga founder (Site issues must be PM'ed to Netham45, Eeems, Shmibs, Deep Thought and AngelFish, not me.)
Editor
LV15 Omnimagician (Next: --)
*
Offline Offline

Gender: Male
Last Login: Yesterday at 18:13:08
Date Registered: 25 August, 2008, 07:00:21
Location: Québec (Canada)
Posts: 50196


Total Post Ratings: +2611

View Profile WWW
« Reply #8 on: 23 March, 2010, 19:37:03 »
0

Keep in mind, though, that the Nspire is 90 MHz (or more?) while the 83+ is 6 MHz.
Logged

Retired 83+ coder, Omnimaga/TIMGUL founder. Now doing power metal music (formerly did electronica)

Follow me on Bandcamp|Facebook|Reverbnation|Youtube|Twitter|Myspace
Raylin
Godslayer
LV10 31337 u53r (Next: 2000)
**********
Offline Offline

Gender: Male
Last Login: 25 February, 2013, 17:03:58
Date Registered: 01 July, 2009, 22:55:16
Location: In the City of Labyrinth
Posts: 1405


Total Post Ratings: +53

View Profile WWW
« Reply #9 on: 23 March, 2010, 19:49:34 »
0

I'm seeing some Halo in the future. Cheesy Cheesy
Logged

Bug me about my book.

Sarah: TI-83 Plus Silver Edition [OS 1.19]
Cassie: TI-86 [OS 1.XX]
Elizabeth: TI-81 [OS 1.XX]
Jehuty: TI-83 Plus Silver Edition [OS 1.19]
Tesla: CASIO Prizm








Phantom Sanctuary: Sins of the Savior [==........] 20%
bwang
LV7 Elite (Next: 700)
*******
Offline Offline

Last Login: 11 August, 2012, 12:59:06
Date Registered: 20 June, 2009, 01:42:58
Posts: 632

Topic starter
Total Post Ratings: +19

View Profile
« Reply #10 on: 23 March, 2010, 22:07:13 »
0

I think I can implement variable wall heights. The emptyness of the screen is because my walls are not very high, which is easily fixed. Right now, my biggest priority is figuring out how to get smooth motion.

From what I have right now, I think I have plenty of speed left, especially since I haven't started optimizing yet.
Logged
DJ Omnimaga
Retired Omnimaga founder (Site issues must be PM'ed to Netham45, Eeems, Shmibs, Deep Thought and AngelFish, not me.)
Editor
LV15 Omnimagician (Next: --)
*
Offline Offline

Gender: Male
Last Login: Yesterday at 18:13:08
Date Registered: 25 August, 2008, 07:00:21
Location: Québec (Canada)
Posts: 50196


Total Post Ratings: +2611

View Profile WWW
« Reply #11 on: 23 March, 2010, 22:16:04 »
0

What will be the maximum amount of shades of gray supported? (knowing the Nspire can do 16)
Logged

Retired 83+ coder, Omnimaga/TIMGUL founder. Now doing power metal music (formerly did electronica)

Follow me on Bandcamp|Facebook|Reverbnation|Youtube|Twitter|Myspace
bwang
LV7 Elite (Next: 700)
*******
Offline Offline

Last Login: 11 August, 2012, 12:59:06
Date Registered: 20 June, 2009, 01:42:58
Posts: 632

Topic starter
Total Post Ratings: +19

View Profile
« Reply #12 on: 24 March, 2010, 00:18:51 »
0

Once I get texture mapping done, it will support 16 shades. Right now, there are only two shades.

A question: in src/arm/headers/common.h in the Ndless package, there are several keycodes. Does anyone know where I can find more of these codes? Also, are the direction keys also considered keys, or is it some sort of analog device with infinitely many directions?
« Last Edit: 24 March, 2010, 00:25:52 by bwang » Logged
DJ Omnimaga
Retired Omnimaga founder (Site issues must be PM'ed to Netham45, Eeems, Shmibs, Deep Thought and AngelFish, not me.)
Editor
LV15 Omnimagician (Next: --)
*
Offline Offline

Gender: Male
Last Login: Yesterday at 18:13:08
Date Registered: 25 August, 2008, 07:00:21
Location: Québec (Canada)
Posts: 50196


Total Post Ratings: +2611

View Profile WWW
« Reply #13 on: 24 March, 2010, 00:25:28 »
0

aaah ok, I was unsure. 4 levels of gray would be ok, though. Even monochrome, altough it wouldn't be pushing the Nspire to its limits as much Big smile. But we have to start small when coding anyway, IMHO. It's good to be ambitious, sometimes, but we have to make sure to not be way too ambitious either. ^^

Some people who are totally new at something will sometimes go with the largest possible RPG project, then realize it was too much for them x.x. I usually start with something small, see if I can do it, then expand.
« Last Edit: 24 March, 2010, 00:31:21 by DJ Omnimaga » Logged

Retired 83+ coder, Omnimaga/TIMGUL founder. Now doing power metal music (formerly did electronica)

Follow me on Bandcamp|Facebook|Reverbnation|Youtube|Twitter|Myspace
bwang
LV7 Elite (Next: 700)
*******
Offline Offline

Last Login: 11 August, 2012, 12:59:06
Date Registered: 20 June, 2009, 01:42:58
Posts: 632

Topic starter
Total Post Ratings: +19

View Profile
« Reply #14 on: 24 March, 2010, 00:36:56 »
0

aaah ok, I was unsure. 4 levels of gray would be ok, though. Even monochrome, altough it wouldn't be pushing the Nspire to its limits as much Big smile. But we have to start small when coding anyway, IMHO. It's good to be ambitious, sometimes, but we have to make sure to not be way too ambitious either. ^^

Some people who are totally new at something will sometimes go with the largest possible RPG project, then realize it was too much for them x.x. I usually start with something small, see if I can do it, then expand.

16-level gray is pretty easy to do, considering the Nspire has hardware grayscale support.
I don't feel this project is terribly ambitious yet. Notice I have absolutely nothing planned for gameplay--right now, I'm just experimenting with raycasting.
Logged
Pages: [1] 2 3 ... 32   Go Up
  Print  
 
Jump to:  

Powered by EzPortal
Powered by MySQL Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Powered by PHP
Page created in 0.296 seconds with 31 queries.
Skin by DJ Omnimaga edited from SMF default theme with the help of tr1p1ea.
All programs, games and songs avaliable on this website are property of their respective owners.
Best viewed in Opera, Firefox, Chrome and Safari with a resolution of 1024x768 or above.