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.

Work in Progress / Doom/wolfenstein engine using sprites - prototype for app kit

Author
Message
Cliff Mellangard 3DEGS
Developer
18
Years of Service
User Offline
Joined: 20th Feb 2006
Location: Sweden
Posted: 12th Mar 2011 18:04 Edited at: 16th May 2011 22:38
Dark line.
Pocket fps engine.
Goals of the project! Is to do a fps engine that uses as little media as possible and runs on even the weakest systems!

Latest version!
Floor texture test.


Point sprite test.










An simple prototype for an doom wolfenstein engine that could be converted to the app kit as soon as its released.
This is only an simple prototype to check if its possible to do later with the app kit.(it dosent have 3d support)

The screens on the first three iphone generations have a resolution of 320 x 480 (HVGA) at 163 ppi, while that of iPhone 4 has a resolution of 640 x 960 at 326 ppi.

So i will probably do this engine to run on all with the lower resolution.

If i dont get tired of the project before the app kit is released

Done
working on

----------------------------------
Raycast engine for walls.
Fish eye effect.
Textured walls
Wolfenstein style movement
Free angles to walls
Sliding collision
Texture walls with multiple textures.
Multiple wall sizes (32,64,128)
Working z depth buffer

Floor and ceiling rendering.
Sprites for enemys and others.
Map editor
Handle walls as 3d objects (moving,turning etc)
Multiple floors.
Stairs.
Ramps.
Doors.
And a bunch of other stuff

----------------------------------
You want to do your own engine ?
Here is some resources that i used!
F.Permadi raycast engine tutorial.

This code explains very well how iphone wolfenstein and doom works.
Also reviews the old doom code and explains how it works.
Fabian Sanglards non_blog
Found these extremely good tutorials!( only hoped i had found them in the beginning. )
Raycast walls.
Raycast floors and ceilings.
Raycast sprites.
Funny that i found an tutorial on doing raycasting the way i do it
Advanced raycasting.

Do you want some inspiration to get started


cmando
13
Years of Service
User Offline
Joined: 7th Jan 2011
Location:
Posted: 12th Mar 2011 18:55
Screenshot?
Cliff Mellangard 3DEGS
Developer
18
Years of Service
User Offline
Joined: 20th Feb 2006
Location: Sweden
Posted: 12th Mar 2011 20:00 Edited at: 13th Mar 2011 23:48
Quote: "Screenshot? "

Sure but its still an prototype!

Attachments

Login to view attachments
Cliff Mellangard 3DEGS
Developer
18
Years of Service
User Offline
Joined: 20th Feb 2006
Location: Sweden
Posted: 14th Mar 2011 21:55
I got to the solution that this engine sucks

And found an extremely good article on doing this instead

I will put up an better engine in about 1-2 weeks!

The article i found!

http://www.permadi.com/tutorial/raycast/rayc6.html#FINDING%20WALLS
Cliff Mellangard 3DEGS
Developer
18
Years of Service
User Offline
Joined: 20th Feb 2006
Location: Sweden
Posted: 17th Mar 2011 01:06 Edited at: 17th Mar 2011 01:07
Made an new prototype
Only drawback is that it runs at 3 fps
Back to the drawing board

Attachments

Login to view attachments
Cliff Mellangard 3DEGS
Developer
18
Years of Service
User Offline
Joined: 20th Feb 2006
Location: Sweden
Posted: 22nd Mar 2011 02:16 Edited at: 22nd Mar 2011 02:26
Finally another prototype
It actually works really well
I only have to make the culling system so i can save a few fps !
If anyone is intrested so could i put upp an rough copy?
This engine lets you turn freely without restrictions just like wolfenstein.
Only drawback is that i have built the render around only 60 screen segments.
So the stuff in the distance looks like the grafix on the snes when it runs in mode 7
cheers.

Edited....
This engine also allows you to texture each segment on the walls with differrent textures!
Each side of the wall block have 64 segmets.

Attachments

Login to view attachments
C0wbox
18
Years of Service
User Offline
Joined: 6th Jun 2006
Location: 0,50,-150
Posted: 22nd Mar 2011 02:52
This kinda raises the question: "Why don't you just make a 3D engine instead of using these sprites? - Is the speed gain really that great?"

Cliff Mellangard 3DEGS
Developer
18
Years of Service
User Offline
Joined: 20th Feb 2006
Location: Sweden
Posted: 22nd Mar 2011 03:18
Quote: "This kinda raises the question: "Why don't you just make a 3D engine instead of using these sprites? - Is the speed gain really that great?""

As the thread title says !
Prototype for the appkit!
It only supports 2d and not 3d and iam thinking of using the appkit as soon as its released.
And i simply dont have the skill to write an 3d engine from scratch
But who knows later on?
I have learned alot about 3d engines and raycasting engines during this project.
And there is no speed gain more an speed drain
Brendy boy
19
Years of Service
User Offline
Joined: 17th Jul 2005
Location: Croatia
Posted: 22nd Mar 2011 03:49 Edited at: 22nd Mar 2011 03:50
Quote: "This kinda raises the question: "Why don't you just make a 3D engine instead of using these sprites? - Is the speed gain really that great?""

Quote: "This is only an simple prototype to check if its possible to do later with the app kit.(it dosent have 3d support)"


EDIT. ooops, didn't see the previuos post.

C0wbox
18
Years of Service
User Offline
Joined: 6th Jun 2006
Location: 0,50,-150
Posted: 22nd Mar 2011 13:07
Nono I don't mean use a 3D engine. I mean, save yourself the trouble of scaling all these sprites and actually recreate what DirectX and OpenGL do in 2D. (Like the original Wolfenstein engine)

Cliff Mellangard 3DEGS
Developer
18
Years of Service
User Offline
Joined: 20th Feb 2006
Location: Sweden
Posted: 22nd Mar 2011 15:08 Edited at: 22nd Mar 2011 15:20
Quote: "actually recreate what DirectX and OpenGL do in 2D. (Like the original Wolfenstein engine)"

Its kind of wath iam doing right now but converting cast ray to stuff i can do with sprites etc.
The prototype before this one whas an ray cast engine that didt work that well at all
Extremely slow as an raycast engine casts 320 rays to detect walls and 320 screen segments that draws upp the wall segments on screen.
Iam still learning this as it goes

Current engine simply detects if parts of the wall blocks is on screen and the draws them,i use an angle detection for this as fov is 30 - center +30 wich currently gives me 60 screen segments.
There will be many prototypes until the app kit gets out.
I am keeping the code simple to be easy to convert to the app kit!
current engine code is only around 160 lines of code.

Iam using the wolfenstein engine as inspiration and are looking in to ways to implement it.

I included an simple explanation if you dont know how an raycast engine works?

Attachments

Login to view attachments
Cliff Mellangard 3DEGS
Developer
18
Years of Service
User Offline
Joined: 20th Feb 2006
Location: Sweden
Posted: 22nd Mar 2011 15:18 Edited at: 22nd Mar 2011 15:18
Here is an screenie to show how it currently draws the wall block! when i disable its function to draw the wall blocks back that is closest to the player.
Iam using the same 3d coords that dbp use wich means that the front points in to 3d space!
This engine can draw any shape that the wolfenstein engine couldt do!

Attachments

Login to view attachments
C0wbox
18
Years of Service
User Offline
Joined: 6th Jun 2006
Location: 0,50,-150
Posted: 22nd Mar 2011 16:32
Ah so really, yours is like half way between Wolfenstein and Doom. - All on the same elevation but able to handle non-orthogonal walls. !

I might try doing this in some of my Java stuff now I see how you're doing it.

Cliff Mellangard 3DEGS
Developer
18
Years of Service
User Offline
Joined: 20th Feb 2006
Location: Sweden
Posted: 22nd Mar 2011 19:06
Quote: "Doom"

Would i only be half there to an real doom engine
But iam still not even close
But its fun as you learn something new everytime i rewrite the engine
cheers
Quel
15
Years of Service
User Offline
Joined: 13th Mar 2009
Location:
Posted: 22nd Mar 2011 22:56
Awesome but why does the FPS equal a maraca screwed onto a golfball?
Quel
15
Years of Service
User Offline
Joined: 13th Mar 2009
Location:
Posted: 22nd Mar 2011 23:02
Hey, i just looked at the stuff you are developing and a optimisation idea popped up suddenly:

- Why don't you determine the angle of a wall, compared to the camera, and make the wall elements thicker or thinner accordingly? Would require less raycasting when facing a wall at 90 degrees, and when you look at one nearly sideways, they wouldn't get so blocky.

A tricky one to accomplish, but i guess would greatly improve it.
C0wbox
18
Years of Service
User Offline
Joined: 6th Jun 2006
Location: 0,50,-150
Posted: 23rd Mar 2011 00:14
Quote: "Awesome but why does the FPS equal a maraca screwed onto a golfball?"

xD! I lold when I scrolled up to see what you were on about.

_Pauli_
AGK Developer
15
Years of Service
User Offline
Joined: 13th Aug 2009
Location: Germany
Posted: 23rd Mar 2011 00:40
Quote: "Awesome but why does the FPS equal a maraca screwed onto a golfball?"


I didn't get it at first, too. Scrolled up and had a good laugh

If I were about to accomplished 3D with 2D commands, I think I read up more on true traditional 3D rendering and go that way. Polygons and that stuff...
But anyway keep up the good work!

Cliff Mellangard 3DEGS
Developer
18
Years of Service
User Offline
Joined: 20th Feb 2006
Location: Sweden
Posted: 23rd Mar 2011 01:23 Edited at: 23rd Mar 2011 01:24
Quote: " but why does the FPS equal a maraca screwed onto a golfball? "

lmao.
It whas an good position for my player dummy to get an good angle.
Quote: " Why don't you determine the angle of a wall, compared to the camera, and make the wall elements thicker or thinner accordingly? Would require less raycasting when facing a wall at 90 degrees, and when you look at one nearly sideways, they wouldn't get so blocky.

A tricky one to accomplish, but i guess would greatly improve it. "

Already tryed that and it made it look worse and added 300 lines of code to make it look ok.
But thanks for the input
Quote: "If I were about to accomplished 3D with 2D commands, I think I read up more on true traditional 3D rendering and go that way. Polygons and that stuff...
But anyway keep up the good work!"

The problem is that i dont know much about the commands in the appkit ?
When i know so could i look in to it some more !
But for now so is this an great learning experience

Added an better screenie of todays work that also shows the fps
But i have alot more to optimize!

I doubled the screen segments to 120 today after alot of work

Attachments

Login to view attachments
_Pauli_
AGK Developer
15
Years of Service
User Offline
Joined: 13th Aug 2009
Location: Germany
Posted: 23rd Mar 2011 01:32
Quote: "The problem is that i dont know much about the commands in the appkit"


I didn't mean built in 3D funtionality, I thought more of drawing 3D shapes with 2D lines, dots, etc. which the new AppGameKit should be capable of...

But regarding your new screenshot you're doing great progress with your approach so just keep going
If you add scaled sprites (scale according to their depth from perspective) into these scenes it will give a good sense of a 3D space.

C0wbox
18
Years of Service
User Offline
Joined: 6th Jun 2006
Location: 0,50,-150
Posted: 23rd Mar 2011 01:41
Quote: "I didn't mean built in 3D funtionality, I thought more of drawing 3D shapes with 2D lines, dots, etc. which the new AppGameKit should be capable of..."

Yeah that's what I was trying to suggest further up with this:
Quote: "save yourself the trouble of scaling all these sprites and actually recreate what DirectX and OpenGL do in 2D."


_Pauli_
AGK Developer
15
Years of Service
User Offline
Joined: 13th Aug 2009
Location: Germany
Posted: 23rd Mar 2011 02:01
Here is a tutorial how to do 3D in the good old QBasic:

3D Tutorial for Qbasic

It used to give me headaches back in the days, but a nice read still (unfortunatly not formatted text).

But as I already said, this project is still on a good path.
The 3D on the SNES was also nice back then...

Cliff Mellangard 3DEGS
Developer
18
Years of Service
User Offline
Joined: 20th Feb 2006
Location: Sweden
Posted: 23rd Mar 2011 19:50 Edited at: 23rd Mar 2011 19:52
Quote: "I didn't mean built in 3D funtionality, I thought more of drawing 3D shapes with 2D lines, dots, etc. which the new AppGameKit should be capable of..."

Its commands like that i dont know about?
Iam not sure yet but i have got some small info on some cool commands ,where you can move around the corners of an sprite like an modelling program ?
If its true so will i write an brand new engine with these commands.

But this is still an great learning experince so that i have some know how later on

I can already do this with the 2d commands but i cant texture its shapes so its nothing fun with it .

But still a pain to get the shapes to texture correctly in the current one
Quote: "Here is a tutorial how to do 3D in the good old QBasic:"

really good article

Quote: "But as I already said, this project is still on a good path.
The 3D on the SNES was also nice back then..."

Thanks.
Iam making the engine for an crazy idea of an fps with 8 bit grafix.
You know like megaman on the master system

We will see how it ends upp ?
Cliff Mellangard 3DEGS
Developer
18
Years of Service
User Offline
Joined: 20th Feb 2006
Location: Sweden
Posted: 24th Mar 2011 00:23 Edited at: 24th Mar 2011 00:27
Todays work is an increase in screen segments to 160 from 120!
Thought it would be better to at least have the half amount of an real raycaster engine
Made an impact to the fps
Also added an identifier to the screen segments so they know wath block they draw on screen
That why its so colorfull now
Will help alot when iam now working on the texture engine.
Its extremely hard and will have to see how i can solve it ?
I nead to make an loop that counts how many screen segments the block uses .and where it starts if only half the block is visible?
And it also changes depending on how close iam to the block!
Will have to use the sprite coords command for this later when i have solved how to move the uv and vv data correctly
If anyone have any good code to scroll an sprite texture in segments sideways ?
Would help alot
Cheers

Attachments

Login to view attachments
C0wbox
18
Years of Service
User Offline
Joined: 6th Jun 2006
Location: 0,50,-150
Posted: 24th Mar 2011 00:40 Edited at: 24th Mar 2011 00:47
! I actually love this thread now. - It's really retro and horrible but I'm thinking of trying this sorta thing in Java when I get a chance so I'm definitely interested in the progress and how you're doing it.

Say, can we get a new version? - I wanna see how well it's running and analyse visually what's going on. ?

_Pauli_
AGK Developer
15
Years of Service
User Offline
Joined: 13th Aug 2009
Location: Germany
Posted: 24th Mar 2011 01:24 Edited at: 24th Mar 2011 01:26
Quote: "If anyone have any good code to scroll an sprite texture in segments sideways ?"


You can scroll a sprite by changing the UV texture coordinates of each corner (sprites in DBPro are just 3D quad primitives).
You could do it something like this:
(sorry for the DarkGDK code, but the commands are almost the same in DBPro, have a look at the help docs)



pictionaryjr
15
Years of Service
User Offline
Joined: 12th Mar 2009
Location:
Posted: 24th Mar 2011 05:56
I don't understand whats going on in each pic?

kamac
13
Years of Service
User Offline
Joined: 30th Nov 2010
Location: Poland
Posted: 24th Mar 2011 11:26


Nice effort here. It's also good idea, since every new engine, is needed engine . I hope you'll finish this .

Cliff Mellangard 3DEGS
Developer
18
Years of Service
User Offline
Joined: 20th Feb 2006
Location: Sweden
Posted: 24th Mar 2011 18:39 Edited at: 25th Mar 2011 00:03
Quote: "horrible"

NOOO ! iam sad now
Hopefully will it improve later on ?
Quote: "so I'm definitely interested in the progress and how you're doing it."

I will put upp an better explanation when i have improved it some more .
Its extremely rough right now as i have cut alot of the code in pieces! when iam trying to improve it.
But its extremely simple really!
Cast rays towards the segment nodes and the run an check loop to se witch screen segment is closest and then draw it on screen.
I use an closest angle towards the rays angle to do this!
Then adjust the size of them according to its distance towards the player.
You also have to adjust the edges of the raycasting as you will get an wierd wall if not.


Quote: "You can scroll a sprite by changing the UV texture coordinates of each corner (sprites in DBPro are just 3D quad primitives).
You could do it something like this:
(sorry for the DarkGDK code, but the commands are almost the same in DBPro, have a look at the help docs)"

I have hands on dark basic 1-2 books and will cheek them out some more on this command .
iam not sure yet how i will do the texture mapping ?
iam going to experiment some more this weekend.
But one idea is to have the same amount of nodes on the object as its size.
And then cut an image in the same amount as the nodes.
And then if the ray hits node 3 so does the engine know that it should use image 3 from the ones i cut from the first image.
but still abit confused over how i should fix some issues when i get really close to an wall?
Quote: "Say, can we get a new version? - I wanna see how well it's running and analyse visually what's going on."

I will try to put upp the latest version this sunday if its ok?
depends on how much i mess things upp untill then
But dont have to much hope on it more then to see two walls to walk around
Quote: "I don't understand whats going on in each pic?"

Iam simply fooling around with converting 2d space to an fake 3d space where you can walk around in 3d when its actually 2d.
You know about the first wolfensten game or first doom game ?
And iam probably to happy to post images that actually dont make sense to more people then my self on the improvements
But i will try to get better with that

Ps...
thanks kamac

Edited.................
Ok!
Iam ready to be marked as a fool as i have never done anything like this before
But i have included an simple version to show that you can walk around and turn.
But keep in mind that i only have the front side activated on the wall blocks and this code is slow and unoptimized.
And thats why you only see flat walls.
and the view is a bit strange when you move close to a wall and move along it?
And also gets distorted when you get to close.
I will probably rewrite everything later on when i have learned some more
Its to slow in its current version !

Arrow keys to move and turn!

Edited .............
new with improved fps.

Attachments

Login to view attachments
Cliff Mellangard 3DEGS
Developer
18
Years of Service
User Offline
Joined: 20th Feb 2006
Location: Sweden
Posted: 26th Mar 2011 12:51 Edited at: 26th Mar 2011 12:59
Quote: "- Why don't you determine the angle of a wall, compared to the camera, and make the wall elements thicker or thinner accordingly? Would require less raycasting when facing a wall at 90 degrees, and when you look at one nearly sideways, they wouldn't get so blocky."

Quote: " If you add scaled sprites (scale according to their depth from perspective) into these scenes it will give a good sense of a 3D space."


Today did i get an brilliant idea to implement this with an combination of the current engine
And if its right would it also increase the fps alot!

I have an idea to only detect the wall corners and then simply detect the distance betwen them!
wich then gives me the width size of the segments.
Simply so do i drop the screen segments to be wall segments instead .
I will keep the screen segments hidden only as points to know where to start drawing the walls on screen !

Will do some experiments and rewrite the engine again
C0wbox
18
Years of Service
User Offline
Joined: 6th Jun 2006
Location: 0,50,-150
Posted: 29th Mar 2011 00:50 Edited at: 29th Mar 2011 00:51
!!!

I'm just now at the part on my own engine where I'm going to try raycasting. - Let's hope I know enough maths to do it properly. (I've had to make a bigger array to act as a BSP for raycasting for the moment until I get the engine straight.) (Any previous attempt at this sort of engine was purely orthogonal, you could only face 4 directions and all "ray" casting was done exactly forwards from the player's position. xD)

Cliff Mellangard 3DEGS
Developer
18
Years of Service
User Offline
Joined: 20th Feb 2006
Location: Sweden
Posted: 29th Mar 2011 00:57 Edited at: 29th Mar 2011 01:30
Quote: "I'm just now at the part on my own engine where I'm going to try raycasting. - Let's hope I know enough maths to do it properly. (I've had to make a bigger array to act as a BSP for raycasting for the moment until I get the engine straight.) (Any previous attempt at this sort of engine was purely orthogonal, you could only face 4 directions and all "ray" casting was done exactly forwards from the player's position. xD)"

Good luck and let me know how it works out
My self are working hard on the texture engine
It aint going to well at all !
Iam completely stuck right now as i cant get the walls to line upp to each other correctly
Some segments gets drawn on the wall to its side at some angles?
will have to try this tomorrow again
C0wbox
18
Years of Service
User Offline
Joined: 6th Jun 2006
Location: 0,50,-150
Posted: 29th Mar 2011 01:51 Edited at: 29th Mar 2011 04:39
It's not often I scare myself but I think I may have just peed my pants.

This started off looking like a worse version of yours but quickly turned into something that actually resembles Wolfenstein. :S

Here are 3 pictures showing the development process from breakthrough to where I started to scare myself:


And I've attached the whole thing just in case you're interested. - It's about 250 lines in Java. (Make sure you extract the files before trying to run the .jar - it won't run unless it's outside the .zip in most cases.)

Attachments

Login to view attachments
Cliff Mellangard 3DEGS
Developer
18
Years of Service
User Offline
Joined: 20th Feb 2006
Location: Sweden
Posted: 29th Mar 2011 20:15
Quote: "This started off looking like a worse version of yours but quickly turned into something that actually resembles Wolfenstein. :S"

The last image looks really great
Just wondering ? wath fps do you get on the last build ?
Could you do the same code in dbp ?
My experience with true raycasting is that it uses to much performance?
But iam only an average coder

Have you solved the issues i have with textures?

And iam a noob with java and understand that you included an java file?
That i nead an program to run ?
C0wbox
18
Years of Service
User Offline
Joined: 6th Jun 2006
Location: 0,50,-150
Posted: 29th Mar 2011 20:44


Well the FPS is limited to 66 in all my games just to ensure the movement speed is the same on everyones computer but I removed the cap and tested it up to 250 and 500 FPS and it still runs fine.

I could definitely do the same thing in DBP - I might later when I get a moment.

I would have thought this would be really performance hungry but I must have coded the raycasting like a ninja or something because it's doing 300 raycasts per frame in my current version. (Available on this thread)

I haven't solved texturing or sprite issues but having collision ontop of what I've done is amazing for me. xD

You should be able to extract the contents of the .zip and run the .jar file. - If not, you may need to update your version of Java. (Or wait for me to code it into DBP and release it again xD)

Cliff Mellangard 3DEGS
Developer
18
Years of Service
User Offline
Joined: 20th Feb 2006
Location: Sweden
Posted: 29th Mar 2011 21:40
Quote: "I would have thought this would be really performance hungry but I must have coded the raycasting like a ninja or something because it's doing 300 raycasts per frame in my current version."

I found that many of the short cuts i take with sprites eats fps
But i stepped back to my low res version to restart the work to solve the textures

Quote: "I haven't solved texturing or sprite issues but having collision ontop of what I've done is amazing for me. xD"

Pretty simple really if you dont want to complicate things like me
You only have to check that the player dont get inside the square the wall block uses.

Quote: "(Or wait for me to code it into DBP and release it again xD)"

iam waiting
C0wbox
18
Years of Service
User Offline
Joined: 6th Jun 2006
Location: 0,50,-150
Posted: 29th Mar 2011 21:44
Quote: "You only have to check that the player dont get inside the square the wall block uses."

Yeah, that may be a slowdown on your part - your engine will be checking for the player's position to be within some bounds. - Mine checks if the player's position will be on a square in the BSP array that is filled.
So mine uses more memory (memory I'm already using for the raycasts) but works more efficiently and means I can technically have much more detailed levels than a simple grid layout.

Quote: "iam waiting"

I'll get on that right away. >

Cliff Mellangard 3DEGS
Developer
18
Years of Service
User Offline
Joined: 20th Feb 2006
Location: Sweden
Posted: 29th Mar 2011 22:05 Edited at: 29th Mar 2011 22:09
Quote: "Mine checks if the player's position will be on a square in the BSP array that is filled."

Thats what i mean
But my english sucks

Check this thread that learned me how it works!!!!!

[href]http://www.permadi.com/tutorial/raycast/rayc6.html#FINDING%20WALLS [/href]

Hope it helps!
Cliff Mellangard 3DEGS
Developer
18
Years of Service
User Offline
Joined: 20th Feb 2006
Location: Sweden
Posted: 30th Mar 2011 00:33
Just found ians cool line intersection functions

Will try them tomorrow to se if they can speed my code upp?

I must learn first how they work but i belive its start 1,end 1,start 2 and end 2 ?

C0wbox
18
Years of Service
User Offline
Joined: 6th Jun 2006
Location: 0,50,-150
Posted: 30th Mar 2011 00:36
Check the other thread, I've converted it into DBP code - you'll be surprised by the results (it's over 10 times slower)

Cliff Mellangard 3DEGS
Developer
18
Years of Service
User Offline
Joined: 20th Feb 2006
Location: Sweden
Posted: 30th Mar 2011 18:25 Edited at: 4th Apr 2011 00:00
Quote: "you'll be surprised by the results (it's over 10 times slower)"

I think its the sprite commands that slow your code down a bit ?
It does for me
But great progress on your version

Attachments

Login to view attachments
C0wbox
18
Years of Service
User Offline
Joined: 6th Jun 2006
Location: 0,50,-150
Posted: 30th Mar 2011 18:38
Yeah it's been suggested to me that the DBP sprites are slow. (Even though I remember it saying on the box that it had "Super-fast sprites" )

It was also suggested I use advanced sprites, but I'm not going to continue the development of the DBP version of mine - I only converted it for the benefit of people who can't see what the Java code is doing. (And to prove I could do it in DBP )

Cliff Mellangard 3DEGS
Developer
18
Years of Service
User Offline
Joined: 20th Feb 2006
Location: Sweden
Posted: 30th Mar 2011 20:18 Edited at: 30th Mar 2011 21:42
iam rewriting the engine to use linecast instead to test it!
I have an crazy idea that its better?
You can do more fun wall shapes with only lines!
And i belive its easier to detect right cube segments with it?
But also harder to do the sliding collision later



Quote: " (And to prove I could do it in DBP )"

Only an fool would doubt that
Iam an mediocer programmer and i could do an simple version in dbp
Yours look better in java

Edited.............
COWBOX!!!
I have just started fooling around with the programming guru ian ms linecast code!
Suddenly so do i have 515 fps instead of 108
But i have alot of things still disabled that i have to get working! but its promising
And iam getting this framerate when i use an sprite as dummy to get the linecasts end.

Attachments

Login to view attachments
C0wbox
18
Years of Service
User Offline
Joined: 6th Jun 2006
Location: 0,50,-150
Posted: 30th Mar 2011 22:29
! I don't really know how that new engine's gonna work for you but good luck. - I'll probably keep mine the same, I'm not actually trying to recreate Direct3D here. xD

Cliff Mellangard 3DEGS
Developer
18
Years of Service
User Offline
Joined: 20th Feb 2006
Location: Sweden
Posted: 30th Mar 2011 22:38 Edited at: 30th Mar 2011 23:15
Quote: "I don't really know how that new engine's gonna work for you but good luck."

Probably to the scrapyard
But i cant stop as its extremely fun to only fool around with dbp
I have never managed to do anything like this before.
As you have mentioned before so did i think it whas extremely hard ?
But suddenly with linecast so is it so much more fun again
And all thanks to an code snippet that ian m our dear moderator posted in 2004 ?
The codebase is an gold mine for a fool like me !
Quote: " I'll probably keep mine the same, I'm not actually trying to recreate Direct3D here."

No my friend! we are doing direct 2.5

And please let me know how your game workes out for you

Edited..........
Iam suprised
It whas as easy as i thought to texture the walls with linecast
Just have to clean up the mess in the code i created when i whas testing this
Thats why i have the extremely low fps right now
And nead to make it more high res as it is to obvius right now.
Now do i only have to make an simple editor where you draw your walls like you want them.
as you should be able to draw them just like an paint program?

Edited....
Why the hell do i use so many smileys when i write?

Attachments

Login to view attachments
kaedroho
17
Years of Service
User Offline
Joined: 21st Aug 2007
Location: Oxford,UK
Posted: 30th Mar 2011 23:51 Edited at: 30th Mar 2011 23:51
Great work!

Isn't it more efficient to calculate where each point is on the screen then draw your walls in afterwards instead of doing a raycast?

I know thats the way the old wolfenstein engine worked and it will also solve the jittering when you turn.

Your signature has been erased by a mod please reduce it to no larger than 600 x 120.
C0wbox
18
Years of Service
User Offline
Joined: 6th Jun 2006
Location: 0,50,-150
Posted: 30th Mar 2011 23:59 Edited at: 31st Mar 2011 00:04
Quote: "Isn't it more efficient to calculate where each point is on the screen then draw your walls in afterwards instead of doing a raycast?"

Yeah that's what we're trying to avoid doing because we're lazy and aren't good enough at maths to do the proper 3D calculations required. (Well, that's why I'm doing raycasts in my engine anyway... )

Cliff Mellangard 3DEGS
Developer
18
Years of Service
User Offline
Joined: 20th Feb 2006
Location: Sweden
Posted: 31st Mar 2011 01:15 Edited at: 4th Apr 2011 00:00
Quote: "I know thats the way the old wolfenstein engine worked and it will also solve the jittering when you turn."

Wath i understand so is both doom and wolfenstein raycast engines?
doom is only partial raycast for some type of walls as the engine combines various rendering effects.
The tutorial i read when i started to get intrested wrote that anyway
The jittering when you turn on my early version is because of the low amount of screen segments on them.
Makes some of the segments pop in and give an jittering feel.
And i also have an problem with that i convert 2d movements straight on to the linecast rendering.
And as soon as my player dummy sprite aint moving straight forward,backwards,left or right so do it move jittering wich displays on to the rendering
Iam going to look for an better and smother sprite movement tomorrow as iam using the move sprite command and only change its angles when you turn.

Quote: "Isn't it more efficient to calculate where each point is on the screen then draw your walls in afterwards instead of doing a raycast?"

probably ?
But also alot more complicated as current code is under 200 lines with all the junk code included

Ps...
i will release a new playable beta this sunday and will try to implement enemys to !
But iam lazy and have an time shortage so who knows
But i will try!

Attachments

Login to view attachments
_Pauli_
AGK Developer
15
Years of Service
User Offline
Joined: 13th Aug 2009
Location: Germany
Posted: 31st Mar 2011 16:49
Hey Cliff,
I just wanted to give you a quick motivation for your journey to selfmade 2,5D
Check out this nice video clip:



Good luck!

Cliff Mellangard 3DEGS
Developer
18
Years of Service
User Offline
Joined: 20th Feb 2006
Location: Sweden
Posted: 31st Mar 2011 17:52 Edited at: 1st Apr 2011 00:35
Quote: "Hey Cliff,
I just wanted to give you a quick motivation for your journey to selfmade 2,5D
Check out this nice video clip:"

I love motivation
I have watched alot of movies like this on youtube
Iam even buying some of the golden oldies for the ps one to se how they do it.(doom,dark forces and even the good old wolfenstein on playstation store.)
I even ordered the old quake 2 for ps one today for some inspiration,but that one is an true 3d engine even if its old.

How do you get your links to work ?
when i use the forums link button so dosent they work at all?

Attachments

Login to view attachments

Login to post a reply

Server time is: 2024-11-16 13:58:23
Your offset time is: 2024-11-16 13:58:23