Omnimaga: The Coders Of Tomorrow
Welcome, Guest. Please login or register.
 
Omnimaga: The Coders Of Tomorrow
20 June, 2013, 13:39:22 *
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 ... 3 4 [5] 6 7 ... 32   Go Down
  Print  
Author Topic: Nspire Raycaster -  (Read 27380 times) Bookmark and Share
0 Members and 1 Guest are viewing this topic.
Builderboy
Physics Guru
LV13 Extreme Addict (Next: 9001)
*************
Offline Offline

Gender: Male
Last Login: Today at 07:46:38
Date Registered: 20 April, 2009, 00:28:53
Location: Ravenholm
Posts: 5645


Total Post Ratings: +589

View Profile
« Reply #60 on: 27 March, 2010, 01:33:37 »
0


puǝ
puǝ
(ɐ)sןǝxıdʍɐɹp
(ʇuǝɯbǝs ɟo ʇɥbıǝɥ)ɹoɟ
ɐ>-ɹoןoɔɔןɐɔ
(13 oʇ 0)ɹoɟ

:buıʞuıɥʇ ɯ,ı ʇɐɥʍ ɹoɟ ǝpoɔopns ǝɯos ǝʞıן

o˙o sןǝxıd ǝɹoɯ oʇ buıʍɐɹp ǝɹɐ noʎ ǝsnɐɔǝq ʎןǝɹǝɯ ssoן pǝǝds ǝɥʇ sı ɹo   ¿ǝɹnʇxǝʇ ǝɥʇ ɟo uoıʇɔǝs ɥɔɐǝ ɹoɟ ǝuo  ¿sǝɯıʇ 23 ʎןuo uɯnןoɔ ɥɔɐǝ ɹoɟ ǝɹnʇxǝʇ ǝɥʇ pǝʇɐןnɔןɐɔ noʎ ɟı dןǝɥ ʇı pןnoʍ
« Last Edit: 01 April, 2010, 06:43:29 by Builderboy » 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 #61 on: 27 March, 2010, 01:56:06 »
+1

The speed loss is because of extra calculations needed when the column is taller. Builderboy: how would you find the height of each segment? That seems to require quite a bit of math.

Bricks!


I'm contemplating rewriting everything to use only integer arithmetic. Do you guys think the resulting speed gain will be worth the trouble?

I attached a new demo. Why doesn't the forum support .tns attachments?

* ncaster.tns.zip (5.79 KB - downloaded 31 times.)
« Last Edit: 27 March, 2010, 02:05:20 by bwang » Logged
Builderboy
Physics Guru
LV13 Extreme Addict (Next: 9001)
*************
Offline Offline

Gender: Male
Last Login: Today at 07:46:38
Date Registered: 20 April, 2009, 00:28:53
Location: Ravenholm
Posts: 5645


Total Post Ratings: +589

View Profile
« Reply #62 on: 27 March, 2010, 02:00:20 »
0

Mmm could you multiply the height of the section by .03125?  Would that be faster than dividing by 32?  This way there wouldnt be any extra calculations for taller columns, only the overhead of drawing the pixels.
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: Today at 11:01:25
Date Registered: 25 August, 2008, 07:00:21
Location: Québec (Canada)
Posts: 50675


Total Post Ratings: +2640

View Profile WWW
« Reply #63 on: 27 March, 2010, 02:38:20 »
0

I will add tns attachment support asap, sorry I kinda forgot since it was not a commonly-used file on the forums until Ndless came out Tongue

Also looks nice so far ^^.
Logged

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

Follow me on Bandcamp|Facebook|Reverbnation|Youtube|Twitter|Myspace
AaroneusTheGreat
Anti-Riot Squad
LV6 Super Member (Next: 500)
*
Offline Offline

Last Login: 01 June, 2013, 08:43:57
Date Registered: 30 August, 2008, 16:17:37
Posts: 309

Total Post Ratings: +23

View Profile
« Reply #64 on: 27 March, 2010, 03:54:47 »
0

Wow the new 32x32 bit textures look great. I would highly suggest studying the code from the FAT engine, it was able to render 64x64 bit textures on a 10mhz calc (although it was only rendering to a 96x96 pixel screen), you've got a lot more processor speed to work with, despite the fact that your engine uses the whole screen, I think you could use some of the optimization concepts from that engine in your code.

Also do you  have a maximum distance for rendering coded in yet? if not you could glean a few FPS's of speed from not even bothering with tiles that are outside of that distance. You probably have, but that's just a thought. At a certain distance and beyond, the walls would all render as a single pixel in each column, so there's no real need to calculate anything at that distance and beyond. It would make more sense to just render a pixel.

Also after a certain distance, you could just abandon textures, and just render the wall as a solid color, like black would be good, because it would appear that you just couldn't see that texture, and it would probably speed things up a bit.

Just a couple of thoughts. I tried writing a raycasting engine for the HP50g once, and only managed to make a really fish-eyed representation of the walls, and only in one color, so I think your expertise in these matters severely outweighs mine Grin

Good work! Keep it up! It won't be long and I might be working on a Wolfenstein port for the nSpire.

« Last Edit: 27 March, 2010, 03:56:23 by AaroneusTheGreat » 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: Today at 11:01:25
Date Registered: 25 August, 2008, 07:00:21
Location: Québec (Canada)
Posts: 50675


Total Post Ratings: +2640

View Profile WWW
« Reply #65 on: 27 March, 2010, 04:11:46 »
0

is it very hard to detect if some stuff is located farther?
« Last Edit: 27 March, 2010, 04:13:06 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 #66 on: 27 March, 2010, 04:37:18 »
0

Good idea, I'll add the maximum distance code.
calc84: how do you change the CPU clock speed in C?
Logged
calc84maniac
Epic z80 roflpwner
Coder Of Tomorrow
LV11 Super Veteran (Next: 3000)
*
Offline Offline

Gender: Male
Last Login: Today at 06:30:47
Date Registered: 28 August, 2008, 05:09:05
Location: Right behind you.
Posts: 2738


Total Post Ratings: +376

View Profile
« Reply #67 on: 27 March, 2010, 21:37:11 »
0

Good idea, I'll add the maximum distance code.
calc84: how do you change the CPU clock speed in C?
To set 150MHz, do this:

1
2
*(unsigned*)0x900B0000 = 0x00000002;
*(unsigned*)0x900B000C = 4;

To set 90MHz, do this:

1
2
*(unsigned*)0x900B0000 = 0x00141002;
*(unsigned*)0x900B000C = 4;
Logged

"Most people ask, 'What does a thing do?' Hackers ask, 'What can I make it do?'" - Pablos Holman
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 #68 on: 28 March, 2010, 09:33:48 »
0

Just out of curiosity, what do the bits in 0x00000002 and 0x00141002 do?
« Last Edit: 28 March, 2010, 20:34:20 by bwang » Logged
tifreak
LV11 Super Veteran (Next: 3000)
***********
Offline Offline

Gender: Male
Last Login: Yesterday at 19:42:19
Date Registered: 16 September, 2008, 05:51:59
Location: Federation Starship Enterprise
Posts: 2850


Total Post Ratings: +73

View Profile WWW
« Reply #69 on: 28 March, 2010, 15:35:02 »
0

Very very impressive project thus far.

Question I have is will it support being able to look up and down? A user on my forums (SuperKoolKid) was going to make an engine for the 68k that allowed that, but he has seemingly stopped the project due to not having the time or motivation to work on it.

If you did, we could have some really epic games made. Big smile
Logged

Projects: AOD Series: 75% | FFME: 80% | Pokemon: 18% | RPGSK: 60% | Star Trek: 70% | Star Trek 83+: 40% | TI-City: 5%
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: Today at 11:01:25
Date Registered: 25 August, 2008, 07:00:21
Location: Québec (Canada)
Posts: 50675


Total Post Ratings: +2640

View Profile WWW
« Reply #70 on: 28 March, 2010, 18:27:17 »
0

(on a offtopic note I wonder where SuperKoolkid went..., his engine would have been amazing. Only Calc84maniac did that besides SKK and he didn't release a demo yet, not to mention it's dormant
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 #71 on: 28 March, 2010, 20:37:04 »
0

Quote
Question I have is will it support being able to look up and down?
That depends on how computationally intensive looking up and down is, how much speed I have left after adding sprites, and how much I can optimize the code.

calc84: The clock speed changing code you posted doesn't seem to do anything. Is there a special way I have to use it, or can I just stick it anywhere in my code?
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: Today at 11:01:25
Date Registered: 25 August, 2008, 07:00:21
Location: Québec (Canada)
Posts: 50675


Total Post Ratings: +2640

View Profile WWW
« Reply #72 on: 28 March, 2010, 20:42:19 »
0

Is it a calc-only feature or will it work on emulator too?
Logged

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

Follow me on Bandcamp|Facebook|Reverbnation|Youtube|Twitter|Myspace
calc84maniac
Epic z80 roflpwner
Coder Of Tomorrow
LV11 Super Veteran (Next: 3000)
*
Offline Offline

Gender: Male
Last Login: Today at 06:30:47
Date Registered: 28 August, 2008, 05:09:05
Location: Right behind you.
Posts: 2738


Total Post Ratings: +376

View Profile
« Reply #73 on: 28 March, 2010, 20:55:50 »
0

I don't think it works on the emulator. Also, check http://hackspire.unsads.com/wiki/index.php/Memory-mapped_I/O_ports#900B0000_-_Power_management for information on what the bits do.
Logged

"Most people ask, 'What does a thing do?' Hackers ask, 'What can I make it do?'" - Pablos Holman
meishe91
Super Ninja
Members
LV11 Super Veteran (Next: 3000)
***********
Offline Offline

Gender: Male
Last Login: 10 June, 2013, 04:31:49
Date Registered: 05 March, 2010, 05:39:48
Posts: 2965


Total Post Ratings: +102

View Profile WWW
« Reply #74 on: 29 March, 2010, 00:21:42 »
0

Very very impressive project thus far.

Question I have is will it support being able to look up and down? A user on my forums (SuperKoolKid) was going to make an engine for the 68k that allowed that, but he has seemingly stopped the project due to not having the time or motivation to work on it.

If you did, we could have some really epic games made. Big smile

I fairly sure no matter what epic games are in the near future Grin
Logged





For the 51st time, that is not my card! (Magic Joke)
Pages: 1 ... 3 4 [5] 6 7 ... 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.303 seconds with 30 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.