Omnimaga
Calculator Community => Other Calc-Related Projects and Ideas => TI Z80 => Topic started by: squidgetx on December 03, 2010, 07:16:28 am
-
*ahem* introducing a little side project I've been working on: a raycasting engine in Axe :D
Runs faster on 15Mhz models (maybe a little too fast) and a bit slower on 6mhz models (almost too slow :P)
It's very basic right now, and supports single color walls (no textures or sprites), but it does have collision testing and all the basic features of a raycasting engine :D (rotation, moving, etc.) and can be used to make a (sort of) enterntaining maze game ;) It only uses the first 80 columns of the screen (for speed, and because I'm too lazy to change it. Also I'm sure this area could be used when making a real game for a user display or something)
(http://img.removedfromgame.com/imgs/axeraycaster.gif)
use left/right to turn, up/down to go forward/backwards respectively. You can press Mode to view the map, and 2nd to quit the map. Press clear to exit the game.
Maps are currently 96x64, and the program will take the picture from OS Pic3 to be the map.
Source is in....RAYSRC, executable is in RAY (nostub) A sample map is included
Currently sits at under 1000 bytes ;D
Things I might add sometime are textures (or at least another color of wall), scaled sprites (not too sure how that will work), and fixing any bugs you guys find. The only bug I've found so far is that everything looks kind of distorted if you get too close to it :P
-
cool good job.
downloading to wabbit at my school.
-
Very nice!
-
starts with nspire raycaster, and now the axe one...
*Yeong assumes that there will be FPS games for Axe later
-
starts with nspire raycaster, and now the axe one...
*Yeong assumes that there will be FPS games for Axe later
Of course they will be here!
-
CoD games....? O_o
-
Actually worked on this quite a bit today: I've added shading according to distance and lengthened your line of sight. I've also located the bug that may cause some of the distortion but I haven't managed to fix it yet :P
-
A while ago I was toying with the idea of a raycaster in Axe, but I couldn't get the math right. Looking at your source code now, it makes so much sense.
I figured the least I could do to help was to give it a bit more kick ;) I could hardly avoid from crashing into walls it was so fast.
-
holy...... :o how did you do that?
-
That looks awesome! Nice job squidgetx! ;D
Edit: Wow, Runer, that's quick! O0
-
Hum... Axe Doom????
Very good job! Now, i have a doubt, is the map repeating a few times?
-
Well that's at 15MHz, so it runs really fast. But I did some rough testing and my modification makes it run about twice as fast at either 6MHz or 15MHz.
I figured that the slowest part of the engine was probably drawing the lines, so I decided to work on that. I did cheat a bit, though, because the speed boost was from a hand-written assembly routine. It took me a few hours, but I managed to make a special case vertical line drawing routine. For drawing vertical lines, it's on average probably 5-10x faster than the normal line drawing routine. I might submit it to Quigibo so he can add it as a built-in feature, although I don't know if it has enough circumstances in which it would be useful to warrant its addition into the standard command set. But then using it wouldn't be cheating any more. ;)
Anyways, I don't think Axioms are working right now so I had to sort of hack together a method to use it as a fake Axiom.
.X coordinate
Z-{L1}+40Asm(E5)
32/E→H
.Y1 coordinate
32-HAsm(E5)
.Y2 coordinate
H+32sub(VL)
... Later in the code, as a subroutine:
Lbl VL
Asm(D1C1EBE3C501A0FF093856E3AFCB7C2803676F3CCB7A2805B72046575FAF0EC00930033D676FEB093005B72034626A7B953003ED44EB3C012C8F545D29192929095FC13E0747A157A90F0F0F4F094204AF3F1F10FD4F43110C0079B6771910FAC9E1)
Return
EDIT: I just realized that you could draw rectangles of width 1, too. It's slower than this routine, but it's built-in, simpler to use, and still a good deal faster at drawing vertical lines than the line routine.
-
Wow, that is really neat :) Great job on it :D Keep up the good work. Can't wait to see what this leads too.
-
And I was thinking....If only there was a super-optimized vertical line command ;)
Now if I am understanding your code correctly, Runer, I put Asm(E5) after the X coordinate, put the height into H, put Asm(E5) after the first Y coordinate, then the massive Asm() block in VL after the 2nd Y coordinate, right? Thanks....I'll be sure to credit you if this ever goes anywhere.
Next, scaled sprites.....
Oh and if anyone could help me with this bug/flaw in the algorithm:
You may notice that the height of the lines drawn on the screen are based on E, or R in the updated version, which is the length of the terminated ray. However, this is inaccurate: it should be based on the straight distance of the triangle instead:
______
| /
| /
|Z /
| /
|/
player
So you'd think that I'd then multiply the E (or R) value by cos(Z)/128, but it doesn't seem to be working...is there anything wrong with my trig?
Oh and @Scout David, the map isn't repeating :P the beginning just has two parts that are the same :P
-
I noticed that bug/flaw too and tried to correct it, but it didn't work right for me.
I noticed another part of your code that could be improved upon, though. And this may actually be the cause of the above fix still not looking right. (Possibly not, though.) When you advance the ray, it doesn't always return a very accurate distance to the wall it collided with because of the relatively large, constant step system you use to advance the ray. You could reduce the step size, but then calculations would be much slower.
The method most commonly accepted as the quickest and most accurace raytracing method is to track where the ray hits cell boundaries. I'm not really sure how to explain it accurately without confusing both you and myself, so I made a picture instead.
The ideal method of tracing infinitely small steps is on the left. Your method of following a constant step size is in the middle. As you can see, the two illustrated rays will return the same length, although they clearly are not the same length. And the method that seems to be generally accepted as the best raytracing method is on the right. I've always had trouble wrapping my head around how to correctly implement that, but if you succeed, it should work quite well and speedily.
-
HOLY **** (sorry...)
Could this be used with my almost perfectly working (dumb cables) 2 player shooter game?
it runs quite fine in normal speed mode, so adding it with the full speed mode into this....
-
...will make CoD with Stimpack. ;D
-
If you could figure out how to adjust the floor height, then it'd be perfect for games.
-
WOAH This is really awesome and runs faster than I thought! Question, though: would it be possible to have it so walls are more diagonal-ish? I'm not sure how to explain it but I mean less blocky. Or would this be beyond Axe capabilities? Regardless, it would be nice to see a game using this. :)
-
WOAH This is really awesome and runs faster than I thought! Question, though: would it be possible to have it so walls are more diagonal-ish? I'm not sure how to explain it but I mean less blocky. Or would this be beyond Axe capabilities? Regardless, it would be nice to see a game using this. :)
I'd love to see a first person shooter like the already made Doom for the calculator :)
I'd like to see curved walls too!!
-
OMG!!!!! This is amazing!! I was also thinking about doing something like this, but am doing something else right now. I agree with Scout David, an FPS would be great.
-
I was also thinking about doing something like this, but am doing something else right now
Philosophic thoughts :)
OMG!!!!! This is amazing!! I was also thinking about doing something like this, but am doing something else right now. I agree with Scout David, an FPS would be great.
Adding a gun to the character sprite wouldn't be very hard, but bullets in a Raycaster would be harder, due to the 3D effect of them
-
looks great, I see yuo draw rectangles instead of blocks and stuff, which gives the raycaster a cool feel! I'll see what I would be able to make out of it, application wise.
-
3d blockdude?
-
3d blockdude?
wow, that would be epic, but a Raycaster Platformer would be insanely hard, there aren't that many for computers and consoles...
-
3d pyyrix? O.o
-
3d blockdude?
i'm already thinking about how you might do this, except make it true to block dude and move 8 pixels at a time. you know what'd be interesting? blockdude in first person. the maps would still be 2-D, and you would only be able to move back and forth.
-
3d blockdude?
i'm already thinking about how you might do this, except make it true to block dude and move 8 pixels at a time. you know what'd be interesting? blockdude in first person. the maps would still be 2-D, and you would only be able to move back and forth.
Wow, like this in FPS:
(http://img530.imageshack.us/img530/9915/blockdude25d.png)
Made by me
Would need grayscale, right? Lots of it to make depth look real
-
maybe grayscale, good idea, blocks closer in black, go further back they get lighter in color O.o
-
maybe grayscale, good idea, blocks closer in black, go further back they get lighter in color O.o
(http://img530.imageshack.us/img530/9915/blockdude25d.png)
But big maps (example Level 9 in ti-83+ series original blockdude) would be really hard
-
then maybe a map mode to see 2D as well?
-
then maybe a map mode to see 2D as well?
(http://img530.imageshack.us/img530/9915/blockdude25d.png)
Press 'Mode' like in squidgetx's Raycaster, that would be perfect! Who's gonna make it? :P
-
if i made it, i wouldn't have a map mode. that'd make the challenge lose value, personally.
-
maybe me later on. And please stop posting that picture over and over again :) j/k it's fine but irks me to see it 5 times in a row
-
maybe me later on. And please stop posting that picture over and over again :) j/k it's fine but irks me to see it 5 times in a row
That was on purpose, I knew it would annoy you :P
if i made it, i wouldn't have a map mode. that'd make the challenge lose value, personally.
Without the map 2D feature, it would be impossible, believe me. I can imagine the game without it. Of course, a zombie mode could be made without this feature :P
-
I can imagine the game without it. Of course, a zombie mode could be made without this feature :P
Playing block dude while fighting off zombies! :O
On a more serious note, this looks amazing! I didn't even think that Raycasting might be possible in Axe! I can't wait to see where this goes! ;D
-
It's very fast and would therefore be great for making games with it, because game engines on top of the fast 3D engine would still be pretty fast. Also, I really do like how walls are rectangles, gives it a cuberunner felling :3
-
maybe me later on. And please stop posting that picture over and over again :) j/k it's fine but irks me to see it 5 times in a row
That was on purpose, I knew it would annoy you :P
if i made it, i wouldn't have a map mode. that'd make the challenge lose value, personally.
Without the map 2D feature, it would be impossible, believe me. I can imagine the game without it. Of course, a zombie mode could be made without this feature :P
impossible? nah. just difficult and frustrating. the picture shows what i'd imagine. the HUD indicates whether or not you are carrying a block. a black/white block cannot be picked up, a dark/light gray block can. so this picture indicates you are standing on a block you cannot pick up, facing a block you can pick up, which is facing a block you cannot pick up. and you are holding a block.
-
/me drools.
Ima go make Splut 3d xD
-
(http://www.omnimaga.org/index.php?action=dlattach;topic=5547.0;attach=4785;image)
Yup, using several colours to display depth.
-
/me is gonna go make black ops
-
(http://www.omnimaga.org/index.php?action=dlattach;topic=5547.0;attach=4785;image)
Yup, using several colours to display depth.
mainly perspective, though.
and one more mockup i made, not as good:
-
/me is gonna go make black ops
/me 's gonna make Blender: Calculator Version.
-
(http://www.omnimaga.org/index.php?action=dlattach;topic=5547.0;attach=4788;image)
A new feature could also be added: instead of the player sprite falling down like this:
______________X
_________________
_______________
X_________________
Several frames and make it fall with some gravity
-
double post, and that is a good idea, but here's the thing:
this isn't really a vertical raycasting engine from what I can see. these are great ideas, but the engine seems a bit different.
-
double post, and that is a good idea, but here's the thing:
this isn't really a vertical raycasting engine from what I can see. these are great ideas, but the engine seems a bit different.
I was about to say, can we get back to the topic of this thread? If you want you can make a 3D blockdude thread and discuss it further in there.
-
good idea. So, is it possible for in the future for it to support things like stairs and different color walls and stuff?
-
Maybe start a new topic for Block Dude 3D? That said, I would like to see further development on raycasting. As for bullets, maybe it wouldn't be too hard, although I wonder how hard it would be to have sprite scaling...
Also Happybobjr why ddi you post a music program in this thread? ??? http://ourl.ca/8144/148999
-
double post, and that is a good idea, but here's the thing:
this isn't really a vertical raycasting engine from what I can see. these are great ideas, but the engine seems a bit different.
I was about to say, can we get back to the topic of this thread? If you want you can make a 3D blockdude thread and discuss it further in there.
I am of the belief that we were arguing potential uses of this raycaster, but yeah we abused.
good idea. So, is it possible for in the future for it to support things like stairs and different color walls and stuff?
So... Going up and down in the first person view (Stairs, jumps, elevators :D)
-
I've been busy all weekend and haven't gotten to physically work on anything yet, but I've figured out how to have the rays be more accurate in the way that you described, Runer. I'm glad to see everyone's excited about this, and I'll probably post an update tomorrow morning.
Also yes, this is a vertical raycaster, not a floorcaster :P. Different height-walls are possible, but are hard to deal with (I think not even calc84maniac was satisfied with his attempt). Apparently (for those of you who are familiar with the raycasting concept) you have to keep tracking the ray even after it hits a wall and it can get pretty messy
-
yeah, then the speed drops and there's ability to add game engines on top of the raycasting engine...
-
We could also make maze games with this. Just an idea, though.
-
Well, bullets would be a lot simpler than you think. Problem is, you're thinking of having actual bullet objects. Early FPSs never did anything like this. They used whether or not you actually aimed at the enemy, and if you did, you hit them. No headshots either, since you can't look up or down :P
Also, vertical raycasters use almost identical code to horizontal ones (regarding rendering, not movement.)
-
I've been busy all weekend and haven't gotten to physically work on anything yet, but I've figured out how to have the rays be more accurate in the way that you described, Runer. I'm glad to see everyone's excited about this, and I'll probably post an update tomorrow morning.
Also yes, this is a vertical raycaster, not a floorcaster :P. Different height-walls are possible, but are hard to deal with (I think not even calc84maniac was satisfied with his attempt). Apparently (for those of you who are familiar with the raycasting concept) you have to keep tracking the ray even after it hits a wall and it can get pretty messy
Cool, I can't wait for next screenshots. Do you think you'll be able to make it look less blocky or would it be beyond Axe capabilities? I mean like in the mockup below:
-
(http://www.omnimaga.org/index.php?action=dlattach;topic=5547.0;attach=4800;image)
This would be sweet :)
-
dj: this looks like it's using detecting in large clumps or something similar instead of a ray for every pixel-column on the screen, so doing so in the conventional manner would probably slow things down quite a bit. however, such an effect could probably be achieved by drawing rotated cubes(which can be hardcoded for speed) at the object positions instead of just scaled squares. however, this is all speculation as i am just seeing this thread for the first time.
speaking of which... this is pretty freakin sweet, squidget!
-
That would make the floors and ceiling spiked instead...not sure if that would be better or worse.
-
the worst thing would be falling upon the spikes >:D
-
dj: this looks like it's using detecting in large clumps or something similar instead of a ray for every pixel-column on the screen, so doing so in the conventional manner would probably slow things down quite a bit. however, such an effect could probably be achieved by drawing rotated cubes(which can be hardcoded for speed) at the object positions instead of just scaled squares. however, this is all speculation as i am just seeing this thread for the first time.
speaking of which... this is pretty freakin sweet, squidget!
Could it maybe draw every two line, like Nspire raycaster in low quality mode? It would look more pixelated but it would still look more 3D-ish.
-
dang I would *totally* try this out.. but alas.. all my 4 AAA batteries are gone :'(
-
Basically I'm hoping that the distortion/blockiness problems will be fixed once I finish implementing the engine change and it *does* draw 1 line with its own height per ray cast so I'm hoping it'll fix itself when I finish the "update"
-
Cool! :D
I hope you can have a decent speed. If you ever add textures, maybe an RPG could be done with this?
-
Cool! :D
I hope you can have a decent speed. If you ever add textures, maybe an RPG could be done with this?
Funny. I was thinking the same thing.
-
I thought it would be nice to maybe even have the character be shown, so it's kinda 2nd person view, even if you just see the top of the body. It could have turn-based battles too with enemies appearing in front of you, like the Tomb Raider clone for the 83+
As an RPG it would be fast enough I think.
-
ok update ;D
much smoother, plus added fake lighting. note this is 15mhz speed, but still pure Axe (I haven't yet used Runer's asm code)
-
it's lovely, squidget. i can't wait to use this for Game development
the walls nearest to the player still seem a bit wonky, though. are you clipping close walls to a maximum height?
-
Great! O.O
I agree with Shmibs, though, but otherwise it's really awesome! I also like how you have different wall shades (checkered and black). Nice job so far! ;D
-
What you guys are noticing is the 'fishbowl effect', and can be remedied by multiplying the length of a cast ray by the cosine of the angle of the ray relative to the direction you are facing. But it looks awesome and fast! How exactly are you drawing the dithered walls so fast? Is it greyscale? because it doesn't look to be alternating
-
Yeah it looks like monochrome to me. Would fixing the fishbowl effect slow things down a lot?
-
Wow, that looks wonderful! Great job squidgetx! :woot:
-
I don't think it should slow it down significantly, since its only a single multiplication for each ray, and you can prerender the cosine functions before you start the simulation.
-
Weird, I thought I had fixed that bug...>.>
Yeah, the dithered walls are monochrome, though once I move from bit-maps to nibble or byte maps to accommodate different textures/colors and sprites, I might mess around with grayscale since then the backbuffer is free to use. The dithered walls are drawn the way you'd expect them to be drawn, with a simple :For(Var,Start,End)
:If Var+(X^2)^2
:Pxl-On(X,Var)
:End
Also, remember that we're in 15 mhz mode right now, so the speed isn't quite so impressive (although it is still bearable in 6mhz mode)
-
Weird, I thought I had fixed that bug...>.>
Yeah, the dithered walls are monochrome, though once I move from bit-maps to nibble or byte maps to accommodate different textures/colors and sprites, I might mess around with grayscale since then the backbuffer is free to use. The dithered walls are drawn the way you'd expect them to be drawn, with a simple :For(Var,Start,End)
:If Var+(X^2)^2
:Pxl-On(X,Var)
:End
Also, remember that we're in 15 mhz mode right now, so the speed isn't quite so impressive (although it is still bearable in 6mhz mode)
couldn't that if statement be:
If X^2+Var^2
-
Yes. Yes it could. I'm not sure why I wrote it like that :P
-
Even better, If X+Var^2 :)
-
Nice. By the way I tried the raycaster in Wabbitemu and the paths I walked through seemed really narrow. Is that normal? O.O
-
just my opinion, but will the curved wall be possible later?(Like hills)
-
I think that might be beyond raycasting capabilities, but variable heights by blocks, not slopes, might be possible.
-
just my opinion, but will the curved wall be possible later?(Like hills)
Not without some nice dithering code for monochrome.
-
What exactly do you mean by 'curved walls' ?
Also, textures are hard x.x
-
Curved walls as in hills != raycasting as far as I understand it.
But, like DJ said, stuff like stairs. No curved tops.
-
just my opinion, but will the curved wall be possible later?(Like hills)
Nope. curves cannot be supported by a raycaster due to their nature. the z-axis is locked. all walls must form a 90 degree angle with the floor.
-
Not only must walls form a 90 degree angle with the floor, but also corners must be 90 degrees as well, so you can't have diagonal walls.
-
so, no octagon style wall shapes? Or do you mean ceiling parallel to floor?
-
so, no octagon style wall shapes? Or do you mean ceiling parallel to floor?
this would be achieved by textures. i do wonder if transparent walls would be possible though...
-
That would depend on how collision detection worked.
-
^Transparent walls would be easy, once I change the map storage from bits to nibbles or bytes: you can just have a wall that isn't detected by the raycasting part but is detected by the collision testing :P
Also, if you mean octagonal shape as in something like the US Pentagon, where it looks like a pentagon from the top but you walk around it looking at it from the side, then yes :P otherwise, not really
-
i'm assuming it's by the rays traced. in which case, the ray would trace through a transparent wall as if it weren't there. you'd need two maps. one indicating whether or not you can walk, and on indicating wether or not the ray should be cast for those pixels.
-
Transparency walls would be great.
Also I wonder if there will be a new screenshot soon? :)
-
x.x So I'm running into some rather unavoidable issues: the current method of all testing for collision (of both the rays and the player) is with pxl-test on the backbuffer. Yesterday I tried changing the map to bytes, and using basic array checking ({Y*96+X+Pointer}) so that I could then add support for different types of walls (like the transparent ones), and it runs really slow, even after adding Runer's assembly code. I can't think of any way to improve it
It's not unbearably slow, but I can tell that if I decided to add textures or scaled sprites, it probably wouldn't make it :(
Progress will continue, but at the best I think we're only going to see 4bit variation in the wall 'types' (done by or-ing two buffers over each other)
edit: Another alternative could be to reduce the screen size, like in Gemini, but I'm kind of iffy on that :P
-
too bad, I would be fine with the fast old version instead.
but great job anyways so far, I could never do most of this.
-
Yeah, I'm sure the fast old version will be good enough for anyone wanting to make something; I haven't played gemini in a while, but I know that Doom only has 1 color of wall :P
Meanwhile I'm going to work on textures x.x
-
good luck! :D
-
Couldn't you just reduce the resolution, but not the screen size? That might double the speed. However, textures aren't really necessary I think. Do you think adding sprites would be hard, btw? (If they are scaled, I would recommend that each possible zoom is pre-rendered and stored into memory prior starting a level to speed rendering up.
-
Here it is: Doom 83, French version.
However, I really suck in the emulator.
-
Wow this is ancient. O.O. There's a much up to date version called zDoom on ticalc.org. It still has some glitches, though. Cool game nonetheless. I wish it was finished. I remember reading the site regularly back in 2001 and 2002. http://doom83.free.fr/
-
Wow this is ancient. O.O. There's a much up to date version called zDoom on ticalc.org. It still has some glitches, though. Cool game nonetheless. I wish it was finished. I remember reading the site regularly back in 2001 and 2002. http://doom83.free.fr/
A website for a calculator game? Wow, that's epic :D
-
Why don't you keep doing it the way you were doing it (bits for drawing), but have another bit-based tilemap for collision detection? In effect, two tilemaps.
-
96 isn't on the auto optimization list, try doing *32*3 instead and it should be much faster :) Technically speaking, pixel testing is usually slower than byte reading, since with pixel testing you are doing bit shifts and bit testing. also, if your map was like 64x64, it would be even faster since you could then do *64 which is extremely fast :)
On a related note, check out this FPS that BenRyves Made O.O
(http://benryves.com/images/nostromo/bsp/2010.11.28/Walkthrough.gif)
-
Wow, where's a link to that? It looks great! ;D
-
Right here http://www.benryves.com/ :)
-
http://benryves.com/ (http://benryves.com/) The download link is in the blog post on the main page :)
Link to current version: http://benryves.com/images/nostromo/bsp/2010.11.28/Nostromo.zip (http://benryves.com/images/nostromo/bsp/2010.11.28/Nostromo.zip)
Edit: ninja'd
-
Holy crap.
btw, I'm going to clarify in case this wasn't clear from the beginning, this project is intended to allow other people to make 3d games with Axe, it's an engine. Of course, I might end up making something with it myself, but it is open source and anyone can use the code to make their own game as long as you credit me appropriately ;)
Couldn't you just reduce the resolution, but not the screen size? That might double the speed. However, textures aren't really necessary I think. Do you think adding sprites would be hard, btw? (If they are scaled, I would recommend that each possible zoom is pre-rendered and stored into memory prior starting a level to speed rendering up.
That's an interesting idea, and wouldn't be hard to implement. Sprites I think wouldn't be too hard as long as they are prerendered to a specific set of sizes. I think it should support a couple sizes: probably two sizes, large and small. (as in a small object like the barrels in Doom and the big enemies along with their respective zoom levels) What do you guys think?
Also I will try that optimization, and probably will change the map to 64x64. I was surprised that the byte checking was so much slower as well. However all these changes will mean that I'm going to have to create a map editor/sprite editor, which might take a little while. :P
EDIT: However, first I want to tighten up the raycasting process as described on the 1st page by Runer112, and get rid of the fishbowl effect. Also I think I get how to do textures now, but I have to do the above stuff first :P
-
Hooray! That's actually similar to what I was thinking for my CT battle engine.
-
(http://benryves.com/images/nostromo/bsp/2010.11.28/Walkthrough.gif)
This looks really good!
-
That's an asm engine that was written by benryves that appears to be a true 3d one, (at least a bit more 3d :P) since you can look up and down.
-
(http://benryves.com/images/nostromo/bsp/2010.11.28/Walkthrough.gif)
This looks really good!
Indeed O.O I really need to post a news about this soon.
Ben was working on this years ago but stopped, and now he appears to have resumed it.
@Squidgetx Two sizes sounds good for objects, although I wonder if it would look weird with large enemies.
-
what the...I saw 55 fps at one point.
-
That's an asm engine that was written by benryves that appears to be a true 3d one, (at least a bit more 3d :P) since you can look up and down.
Where is that available!
-
what the...I saw 55 fps at one point.
Like with computer FPSes, when you're closer to walls there is less stuff to render and check, I think, which is why framerate increases. Notice how in many computer games, speed gets smoother when you approach a wall.
That's an asm engine that was written by benryves that appears to be a true 3d one, (at least a bit more 3d :P) since you can look up and down.
Where is that available!
http://benryves.com/images/nostromo/bsp/2010.11.28/Nostromo.zip
-
I very much want this ;D
-
That .gif file almost crashed my browser. (It doesn't handle huge .gifs well, and at 1678 frames, well, it's kinda huge) Otherwise, though, I think that's one of the best 3d engines I've ever seen. I can never seem to do 3d from a first person view. Only looking at a model or something.
-
What browser do you use Graph? I think I remember IE for Mac playing animated GIFs slowly and some sites crashing when too many images had to be displayed.
-
That .gif file almost crashed my browser. (It doesn't handle huge .gifs well, and at 1678 frames, well, it's kinda huge) Otherwise, though, I think that's one of the best 3d engines I've ever seen. I can never seem to do 3d from a first person view. Only looking at a model or something.
What browser do you use Graph? I think I remember IE for Mac playing animated GIFs slowly and some sites crashing when too many images had to be displayed.
May I bet on IE??
-
Okay, figured out generally what's wrong with the engine. It involves the necessity of scaling all my numbers by 128*8 rather than 128, so I think the engine will need to be (almost) completely rewritten. It shouldn't be too difficult though :P
-
Ouch, I hope it's not too hectic X.x. Good luck!
-
It's getting a *little* hectic. It took me a while to figure out how to accurately compensate for the lack of a tan and cot function :P, and that's only the tip of the iceberg :P
I'm going to do some minor improvements and add sprites just for functionality testing, and call it an alpha. Then I'll work on rewiring the engine for less distortion, more accuracy, textures, and a world editor (sprites and map) which will probably be more of an on/off project depending on how things with my other projects are going.
Regarding sprites, do we think it would be better for the user to to have to make like 10 sizes of the same sprite, or only two or three and have the engine scale them by 2x and 4x? It's a question of detail versus less hassle on the user end :P
-
how many levels can axe scale through? If you submitted one 64x64, you could squash 10 sizes out of that. Axe can do that now, can't it?
-
It's getting a *little* hectic. It took me a while to figure out how to accurately compensate for the lack of a tan and cot function :P, and that's only the tip of the iceberg :P
tan x = sin x / cos x and cot x = cos x / sin x if you didn't already know this. ;)
Sounds great! I can't wait for more progress. ;D
Regarding sprites, do we think it would be better for the user to to have to make like 10 sizes of the same sprite, or only two or three and have the engine scale them by 2x and 4x? It's a question of detail versus less hassle on the user end :P
I think the user should have to make multiple copies. This would be quicker and easier for your code, and also more precise than a general algorithm. :D
-
Same as what Ztrumpet said. I hope you don't run into any major bugs halting development considerably too. A raycaster or anything involving 3D really seem hectic to code. X.x
-
@ztrumpet: That's a problem though, since sinx / cosx and cosx / sinx actually comes out to either 0 or 1. So you actually have to inflate the first term by 128 (or some other factor) and then don't forget about the signed division :P Additionally, my problem was that not only did I have to scale by 128, I had to scale by 128 or -128 depending on which direction you were facing
@ztrumpet/DJ. I guess that would be good
@willrandship: How do you mean? Is there a scaling command?
-
I think so.....hang on.
Hmm, guess not. I'd thought someone had mentioned scaling in an old thread.
Oh XD it was a thread about asm, not axe. :P sorry.
-
Scaling in Axe? (http://ourl.ca/6016/93670)
-
Yeah, that might have been part of what confused me :P but that one only talks about enlarging sprites, not shrinking them.
-
Hm, looks interesting. I think I'll go with making the user draw all the different zoom levels though, or possibly have the auto scale be an option
-
@ztrumpet: That's a problem though, since sinx / cosx and cosx / sinx actually comes out to either 0 or 1. So you actually have to inflate the first term by 128 (or some other factor) and then don't forget about the signed division :P Additionally, my problem was that not only did I have to scale by 128, I had to scale by 128 or -128 depending on which direction you were facing
Ah, I see. That's quite difficult. Nice job on that. ;D
-
Scaling really has to be pre-rendered. Rendering a sprite takes 0.1 second, meaning if there are 10 sprites on the screen, your game run a bit under 1 FPS.
-
I take it you mean scaling a sprite takes .1 seconds? That's really horrible for realtime rendering, but I suppose you could prescale them as it starts if you're super desperate for space.
-
Yeah 0.1 second, as shown in my screenshot in the linked topic. This is why they need to be pre-rendered. When entering a room with new sprites they should probably be pre-rendered there.