Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Code Snippets / [DBP] A simple wolfenstein like editor and engine.

Author
Message
Cliff Mellangard 3DEGS
Developer
15
Years of Service
User Offline
Joined: 20th Feb 2006
Location: Sweden
Posted: 25th Jul 2008 19:46 Edited at: 28th Jul 2008 00:42
an simple wolfenstein like editor and engine in only 218 lines.
good for someone new to dbp .
hail the dbp newbies to the comunity
original thread with exe and screenie.
http://forum.thegamecreators.com/?m=forum_view&t=133938&b=8



editor mode is key 1
game mode is key 2
in editor mode choose texture with tab key
left mb to place block and right one deletes
to place doors press d
and to save map press s
z places the start point and x exit point.
dont forget to only have one each of start and exit on the map.
in game mode move with w,a,s,d and look around with the mouse.
space key opens doors if you collide with them.
iam using gil galvantis images from the tome engine as i didt care about doing gfx during this moment of boredome

Attachments

Login to view attachments
Cliff Mellangard 3DEGS
Developer
15
Years of Service
User Offline
Joined: 20th Feb 2006
Location: Sweden
Posted: 27th Jul 2008 00:23
did any one think this is usefull so that i know its any idea to release any more basic code ?
Phaelax
DBPro Master
17
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 27th Jul 2008 21:17
aww i thought it was all in 2D but you used planes!


zapakitul
14
Years of Service
User Offline
Joined: 1st Mar 2007
Location: In my world
Posted: 27th Jul 2008 22:42 Edited at: 27th Jul 2008 22:49
Hey its a very nice engine, but do you mind if i modify it to use as base engine for a project i am working on? It would really save me from allot of work.. also i never really did a 2D Level Editor before(did 2 3D editors...) so i could probably learn allot more from this!
Cliff Mellangard 3DEGS
Developer
15
Years of Service
User Offline
Joined: 20th Feb 2006
Location: Sweden
Posted: 28th Jul 2008 00:38 Edited at: 28th Jul 2008 00:39
nope phalex its all 2d the editor the only 3d is the main game engine and its all cubes.
if you look closely so do i paste sprites as blocks in the editor.
zapakitul use it and modifie as you please.
cheers
Phaelax
DBPro Master
17
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 28th Jul 2008 20:55
The editor yea, but wolfenstein was 2D. I tried to make a raycasting engine once, but the display was a bit buggy. Might have another go at it now.


Cliff Mellangard 3DEGS
Developer
15
Years of Service
User Offline
Joined: 20th Feb 2006
Location: Sweden
Posted: 28th Jul 2008 22:39
sorry my wrong phaelax.
thought you meant this code.
cheers
Ninjazz
13
Years of Service
User Offline
Joined: 21st Dec 2007
Location:
Posted: 3rd Sep 2008 14:29
Can I, being a noob enough, ask a noobish question? About the code, I don't quite get this:


Why do you have the while keystate() and endwhile commands in there, if there's nothing in them? Is there a purpose to this?
revenant chaos
Valued Member
13
Years of Service
User Offline
Joined: 21st Mar 2007
Location: Robbinsdale, MN
Posted: 3rd Sep 2008 16:22
That is so the program will wait for the user to release the key so it wont try to save the file more than once.
Cliff Mellangard 3DEGS
Developer
15
Years of Service
User Offline
Joined: 20th Feb 2006
Location: Sweden
Posted: 3rd Sep 2008 23:58

its an lazy mans wait key command
Pricey
18
Years of Service
User Offline
Joined: 22nd Feb 2003
Location:
Posted: 4th Sep 2008 17:58
Not really... its waiting for the key to be released, not pressed.

Cliff Mellangard 3DEGS
Developer
15
Years of Service
User Offline
Joined: 20th Feb 2006
Location: Sweden
Posted: 4th Sep 2008 20:48
yes i know pricey i wrote the code

Login to post a reply

Server time is: 2021-03-05 10:34:58
Your offset time is: 2021-03-05 10:34:58