Wolf3d-style 3d engine (proof of concept)
#1
Posted 28 February 2013 - 09:35 PM
on a whim, decided to throw together a simple Wolfenstein 3D-style rendering system in cc. Two hours later, here are the results
screenshots look pretty crappy, what with the 51x19 resolution and 16-color palette, but to properly appreciate it you need to see it in action.
Demo download: pastebin get qpV90qbM wolf3d
I strongly recommended you also grab the redirect API, which will be used if you have it to reduce or eliminate any flickering when drawing. It'll still run fine without it, though. (for more info on the redirect api, see my api thread)
redirect api (optional): pastebin get fU9Kj9zr redirect
pastebin version will keep updating as I work on it. Feel free to take the code and turn it into anything you want.
#2
Posted 28 February 2013 - 10:10 PM
Can't believe how small it is too, only 176 lines!
#3
Posted 28 February 2013 - 10:23 PM
Great work this is really well done + 1
#4
Posted 28 February 2013 - 10:45 PM
#5
Posted 28 February 2013 - 10:46 PM
BigSHinyToys: no COD, lol. Adding enemies would be ... problematic. 16-color sprites at this resolution really don't scale well!
TheOriginalBit: I've toyed with making it run on monitors, but it would have to have on-screen touch controls, ipad-style, which seems like it'll be awkward. Unless there's actually a working version of ccinput around somewhere, seems every time I've tried to use ccinput, it has not wanted to work properly...
#6
Posted 01 March 2013 - 04:47 AM
Try add multiplayer support
#7
Posted 01 March 2013 - 05:26 AM
#8
Posted 01 March 2013 - 05:34 AM
#9
Posted 01 March 2013 - 07:54 AM
#10
Posted 01 March 2013 - 08:02 AM
http://pastebin.com/V5MRGVZv
#11
Posted 01 March 2013 - 11:10 AM
#12
Posted 01 March 2013 - 11:34 AM
#13
Posted 01 March 2013 - 12:00 PM
Zaggy1024, on 01 March 2013 - 08:02 AM, said:
http://pastebin.com/V5MRGVZv
I don't see how making it redraw every frame would help the flicker; I will be making it use my redirect buffer api later (not really sure why I didn't in the first place), which should significantly reduce, if not completely eliminate, the flickering. I'd also implemented automatic scaling to term.getSize() last night, but forgot to update pastebin. Regardless, tho, mod away, make what you want with it!
To everyone else, thanks for the praise, been a fun little diversion from my usual more complex and practical projects
#15
Posted 02 March 2013 - 04:08 AM
#16
Posted 02 March 2013 - 04:40 AM
#17
Posted 02 March 2013 - 04:17 PM
Also, maybe add some things like slash+dash lines on the outer edges of polygons, to give it texture.
Oh, and maybe take it a step further with walls of varying height.
#18
Posted 02 March 2013 - 07:05 PM
#19
Posted 03 March 2013 - 12:12 AM
but i would like to see a diffrent map format. like map[x][y] = object5
or like map[x][y] = player2. i also would like to see some object oriented programming. like i did above. that you draw objects
on the screen according to their position. instead of a map. if you know what i mean.
so it will be easyer to make fps( first person shooters ). that is my plan atleast
you should make an explanation on how each line of code works and what it does. i really want to make smaller objects in the world. like bullets
#20
Posted 03 March 2013 - 05:58 AM
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users