wonderwhy-ER's avatar

Voxel Engine Revamped

19 34 5K (1 Today)
By wonderwhy-ER   |   
Published:
© 2008 - 2020 wonderwhy-ER
************************************************************************
THIS WAS NOT MADE BY ME. IT IS ONLY MODIFICATION.
Original work belongs ot :iconkillthemouse: Go worship him cuz he is shiny golden god :D
************************************************************************
So :iconkillthemouse: made this and made it open source with no restriction to usage. So he lacked one thing in this and I tough that I can add it. It was rotation. It was added in an hour so it is not well optimized and kind of messy at the moment. And I am going to sleep. I will clean it up and add comments till the end of the week. After that I will repost it with source ;)

Well I changed how movement works. Reasons are that I don’t know how to make it work in a way it did before and figuring it out could take some time. So I went on easier and faster way cuz I had only half an hour. Well as usually I got caught up and spent more time and got it to work. Now I am sleepy and my head hurts :( But that’s nothing that’s how I am sometimes…

Controls:

Ok. Turn caps lock on and use mouse to move. Direction of moving is direction from center to mouse. Speed is length of this line.
Use Up/Down to zoom and Left/Right arrows for rotation.
Use space to return to centre of the map with no rotation.
Click on menu header at the bottom to bring it up. Use it to change map. Click on header again to hide it.

Edit: Hmm. Zoom seems to be little bit strange. Didn’t understand something in the code it seems. Will check it tomorrow.


Edit 2:
Added more changes. Movement method was kind of annoying so I made little change. Now it moves only with caps lock turned on. And also hitting space will return coordinate to centre of the map and will set rotation to 0.

And I changed initial class a little more. Not much just added function to change map on the fly. You can click on the menu in the bottom of the screen. It will fly out. Then click on header again to hide it. Use options to change how map looks.

And link to the source: [link]
Image size
500x300px 50.54 KB
Comments34
anonymous's avatar
Join the community to add your comment. Already a deviant? Log In
StephenF's avatar
Good work dude!
sashimi-chef's avatar
Why does the map disappear when you rotate it?
wonderwhy-ER's avatar
It does? Hmm it does not dissaper for me... Can you give more pecifics? Like were you on edge of map? Were you zoomed out or in and so on?
sashimi-chef's avatar
As in, when i zoom out so i can see the whole map. When i rotate enough, it disappears beyond a line and reappears when it rotates further.
wonderwhy-ER's avatar
Ouh. There are some bugs with clipping with high zoomout.
Zappan's avatar
ZappanHobbyist General Artist
You guys.. Both rock.. I'm in total admiration :D
brunoxyz's avatar
nice.. now the camera rotates ,, .
lyc's avatar
oh, some doom-style ray casting :D
wonderwhy-ER's avatar
Mmm. Not realy. Doom was made kind of differently... Not on voxels at lest but some priciples are alike.
lyc's avatar
it's basically the same 2.5d raycasting technique, except "voxel engines" use heightmaps.
wonderwhy-ER's avatar
Mmm. He haven't made any camera or any other raycasting. It just some formulas that simulate it in a way. Tough as i said it is very hard to use it for any game or other alike thing. He seem wan't to learn something about raycasting to rewrite it as it should have been done. I will find some articles for him later. Thinking on helping other guy with cool game he makes. And for now my BD and exams ;( + work.
lyc's avatar
yeah i have exams too quite soon :(
wonderwhy-ER's avatar
Where and for who you study? I mean programm orentation?
lyc's avatar
i'm studying via a correspondence university in south africa, previously (until 2006) i was at the university of cape town. studying maths and computer science (together called scientific computing).
wonderwhy-ER's avatar
Heh cool. May i ask few questions. First is recarding the disciplines yo have in you course. MAy be there is page with that? As if i was thinking to go to it and was researching what disciplines i will learn.
And second is about e-learning methods in your universety. Any systems for digital studying managment? Does something like that is used in your universety? I think some example will be needed. I study at one universty and my brother in another. In his such system as WebCT is used. Thet means that you can pass tests in the web page under your account. And you can send your homework results in it and discuss it in forum like way with teacher. Any things like that?
View all replies
cepums's avatar
aaaa
sapratu...
biju izbraucis no kartes.. :)
vispaar tiiri inchiigi.. nav ne vaines :)
wonderwhy-ER's avatar
:D pladies. bet ka es teicu es tikai pameginaju izmajnit kaut ko darba kuru killthemouse izdarija. Vel lai izdarit Flash Voxel enginu ir daudz ko citu ko vajag izdarit.
cepums's avatar
nesapratu... :(
man raada tikai sviitru kas seko pelei..
un kad spiezhu bultas - ta tikai fons mainaas.. un cipari... bet nekas nenotiek :(
awesty's avatar
That is awesome man.

But when you zoom and rotate the terrain get cropped kinda.
wonderwhy-ER's avatar
Ouh didin't understoot. There is optimisation in killthemouse algorithm. Something that supposengly does not draw too far things. I am not shore if i will try to correct it now. May be you wana try?
awesty's avatar
If you cant do it I doubt I will be able to :D
anonymous's avatar
Join the community to add your comment. Already a deviant? Log In