The Daily Click ::. Forums ::. Digital Works ::. Just a preview
 

Post Reply  Post Oekaki 
 

Posted By Message

Pixelthief

Dedicated klik scientist

Registered
  02/01/2002
Points
  3419

Game of the Week WinnerWeekly Picture Me This Winner!You've Been Circy'd!VIP MemberI like Aliens!Evil klikerThe SpinsterI donated an open source project
9th September, 2008 at 06:10:34 -

not really a project of mine, just a preview of what my next big engine dealie thingy will be; I'll be tackling the old favorite RAYCASTING. So in hopefully a weeks time or so, I'll have a full raycasting engine, with variable texture mapping, clipped sprites, a good draw distance, no fishbowl effect, and most importantly, *NO SLOWDOWN* (really), fully based in MMF1.5 with gratuitous usage of the overlay object. In other words, an engine roughly comparable to wolfenstein 3d, for your programming learning, comprehension, and code pilfering. I've already got it mostly done, I'm just a bit lazy on adding in the sprites bit, and who knows, I might have a secret Epic Game planned off it for this stage of Peblo's compo. But anyone whos ever had problems trying to tackle the 3d engine-in-mmf issue will be free to take a looksy at the sourcy.

Image



 
Gridquest V2.00 is out!!
http://www.create-games.com/download.asp?id=7456

-Finn-



Registered
  28/08/2008
Points
  445
9th September, 2008 at 07:35:34 -

nice, gl sounds good

 
Image

alastair john jack

BANNED

Registered
  01/10/2004
Points
  294

GOTW WINNER CUP 1!GOTW WINNER CUP 2!GOTW WINNER CUP 3!VIP MemberMushroomI am an April Fool
9th September, 2008 at 07:44:09 -

Make an epic with it!

 
lol

Cecilectomy

noPE

Registered
  19/03/2005
Points
  305

Has Donated, Thank You!VIP MemberWeekly Picture Me This Winner!Cardboard BoxGhostbuster!Pokemon Ball!ComputerBox RedSanta HatSnowman
I am an April Fool
9th September, 2008 at 08:46:00 -

did everyone just miss werbads mmf3d demo?

http://www.create-games.com/newspage.asp?id=3010

kudos if you can accomplish it without hwa but is it really necessary?

my round 1 entry (demo) was pretty much the exact same thing without the texture mapped walls. (just trees and rain n shit.)

which ive been taking farther and farther.

Image

 
n/a

OMC

What a goofball

Registered
  21/05/2007
Points
  3516

KlikCast Musician! Guy with a HatSomewhat CrazyARGH SignLikes TDCHas Donated, Thank You!Retired Admin
9th September, 2008 at 13:42:21 -

Looks shiny, Pixelthief!

 

  		
  		

-Finn-



Registered
  28/08/2008
Points
  445
9th September, 2008 at 15:26:49 -

oh and excuse me guys, but 3D means 3 Dimentional...your engines haves only images...so still ain't 3D its damn hard to make a 3D engine.

 
Image

OMC

What a goofball

Registered
  21/05/2007
Points
  3516

KlikCast Musician! Guy with a HatSomewhat CrazyARGH SignLikes TDCHas Donated, Thank You!Retired Admin
9th September, 2008 at 15:55:05 -

Err... no. Any type of "3D" on a computer is technically not 3D. It's a 2D representation of 3D. So this is just as much 3D as anything that uses models. True 3D won't happen until holodecks. (Well, we have holograms now I guess...)

Image Edited by the Author.

 

  		
  		

Eternal Man [EE]

Pitied the FOO

Registered
  18/01/2007
Points
  2955

Game of the Week WinnerHero of TimeLOL SignI am an April Fool
9th September, 2008 at 16:08:42 -


So what does this "real" 3D consist of if not images?
It's quite narrow minded to say that something that does meet the requirements of three dimensions isn't 3D just because it doesn't use the conventional means of creating and handling mass in it's 3D space.
(From wikipedia on 3D Computer Graphics)
"3D computer graphics (in contrast to 2D computer graphics) are graphics that use a three-dimensional representation of geometric data that is stored in the computer for the purposes of performing calculations and rendering 2D images."

"Real" 3D is (From wikipedia on 3D) "A vector space or coordinate space with three dimensions". It's damn hard to tell what consists a 3D engine.

 
Eternal Entertainment's Code'n'Art Man

E_E = All Indie


...actually Ell Endie, but whatever.
Image
Image

Pixelthief

Dedicated klik scientist

Registered
  02/01/2002
Points
  3419

Game of the Week WinnerWeekly Picture Me This Winner!You've Been Circy'd!VIP MemberI like Aliens!Evil klikerThe SpinsterI donated an open source project
9th September, 2008 at 16:15:45 -

theres no good way to differentiate it. It just means that people consider raycasting "2.5d", since it doesn't allow for full vertical viewing. The only thing that keeps me from making a 'Full' MMF 3D engine, is that I don't have a way to map textures onto polygons. I can only use the overlay object to stretch rectangles into other rectangles, which isn't time consuming, but if I wanted to stretch a rectangle bitmap into an abnormal polygon, I'd have to write some script that does it at runtime, which would be so inefficient the whole thing would run at 0.0000001 FPS.


so I'll settle for popping out a nice wolkensteiner engine

 
Gridquest V2.00 is out!!
http://www.create-games.com/download.asp?id=7456

Yami



Registered
  23/12/2003
Points
  608
9th September, 2008 at 16:19:58 -

If anything, "someone" could use it to make a good racing game.

 
Image

Cecilectomy

noPE

Registered
  19/03/2005
Points
  305

Has Donated, Thank You!VIP MemberWeekly Picture Me This Winner!Cardboard BoxGhostbuster!Pokemon Ball!ComputerBox RedSanta HatSnowman
I am an April Fool
9th September, 2008 at 23:01:35 -

you can use the 3d mesh object pixeltheif. not sure if it works like an active though. multiple instances?

oh and the only way to get "real" 3d is to project onto a physical 3 dimensional space. everything else is just a 2dimensional representation of a 3dimensional space.

Image Edited by the Author.

 
n/a

Pixelthief

Dedicated klik scientist

Registered
  02/01/2002
Points
  3419

Game of the Week WinnerWeekly Picture Me This Winner!You've Been Circy'd!VIP MemberI like Aliens!Evil klikerThe SpinsterI donated an open source project
10th September, 2008 at 01:19:57 -

Image

sprites are done!

 
Gridquest V2.00 is out!!
http://www.create-games.com/download.asp?id=7456

Eternal Man [EE]

Pitied the FOO

Registered
  18/01/2007
Points
  2955

Game of the Week WinnerHero of TimeLOL SignI am an April Fool
10th September, 2008 at 01:31:23 -


I had a nightmare about you lurking after me in maze of ninja crates!

 
Eternal Entertainment's Code'n'Art Man

E_E = All Indie


...actually Ell Endie, but whatever.
Image
Image

OMC

What a goofball

Registered
  21/05/2007
Points
  3516

KlikCast Musician! Guy with a HatSomewhat CrazyARGH SignLikes TDCHas Donated, Thank You!Retired Admin
10th September, 2008 at 03:03:48 -


Originally Posted by cecil64
oh and the only way to get "real" 3d is to project onto a physical 3 dimensional space. everything else is just a 2dimensional representation of a 3dimensional space.

Image Edited by the Author.



That's what I said.

 

  		
  		

Pixelthief

Dedicated klik scientist

Registered
  02/01/2002
Points
  3419

Game of the Week WinnerWeekly Picture Me This Winner!You've Been Circy'd!VIP MemberI like Aliens!Evil klikerThe SpinsterI donated an open source project
10th September, 2008 at 03:09:14 -

I wrote a fully 3d in 3d space engine in MMF, but it involved a gratuitous misuse of the CD-Drive-open/close extension

 
Gridquest V2.00 is out!!
http://www.create-games.com/download.asp?id=7456

OMC

What a goofball

Registered
  21/05/2007
Points
  3516

KlikCast Musician! Guy with a HatSomewhat CrazyARGH SignLikes TDCHas Donated, Thank You!Retired Admin
10th September, 2008 at 03:13:24 -

O_o What, did you use the CDROM laser to project holograms?

I once made a toy for my cat with that extension. Kept her busy for a few hours.

 

  		
  		

Pixelthief

Dedicated klik scientist

Registered
  02/01/2002
Points
  3419

Game of the Week WinnerWeekly Picture Me This Winner!You've Been Circy'd!VIP MemberI like Aliens!Evil klikerThe SpinsterI donated an open source project
10th September, 2008 at 03:17:11 -

I tried to make a cupholder with that extension but something bad happened when I went to shut-down.

 
Gridquest V2.00 is out!!
http://www.create-games.com/download.asp?id=7456

Cecilectomy

noPE

Registered
  19/03/2005
Points
  305

Has Donated, Thank You!VIP MemberWeekly Picture Me This Winner!Cardboard BoxGhostbuster!Pokemon Ball!ComputerBox RedSanta HatSnowman
I am an April Fool
10th September, 2008 at 03:44:08 -

ouch. what was it holding at shutdown?

 
n/a

Pixelthief

Dedicated klik scientist

Registered
  02/01/2002
Points
  3419

Game of the Week WinnerWeekly Picture Me This Winner!You've Been Circy'd!VIP MemberI like Aliens!Evil klikerThe SpinsterI donated an open source project
10th September, 2008 at 04:11:43 -

my fingers. ow :X

 
Gridquest V2.00 is out!!
http://www.create-games.com/download.asp?id=7456

-Finn-



Registered
  28/08/2008
Points
  445
10th September, 2008 at 07:38:30 -

lol well clayotn is right...3D as a 2D cuz your gfx have only width and height

 
Image

Eternal Man [EE]

Pitied the FOO

Registered
  18/01/2007
Points
  2955

Game of the Week WinnerHero of TimeLOL SignI am an April Fool
10th September, 2008 at 13:55:54 -

?
That didn't really make any sense to me.

 
Eternal Entertainment's Code'n'Art Man

E_E = All Indie


...actually Ell Endie, but whatever.
Image
Image

AndyUK

Mascot Maniac

Registered
  01/08/2002
Points
  14586

Game of the Week WinnerSecond GOTW AwardHas Donated, Thank You!VIP Member
10th September, 2008 at 16:07:02 -

So do you think you'll be able to take it to the next level and at least have some kind of Z axis?

 
.

Eternal Man [EE]

Pitied the FOO

Registered
  18/01/2007
Points
  2955

Game of the Week WinnerHero of TimeLOL SignI am an April Fool
10th September, 2008 at 16:46:43 -

It already has a z-axis doesn't it?

 
Eternal Entertainment's Code'n'Art Man

E_E = All Indie


...actually Ell Endie, but whatever.
Image
Image

Pixelthief

Dedicated klik scientist

Registered
  02/01/2002
Points
  3419

Game of the Week WinnerWeekly Picture Me This Winner!You've Been Circy'd!VIP MemberI like Aliens!Evil klikerThe SpinsterI donated an open source project
10th September, 2008 at 16:49:57 -

you can't do Z-axis in raycasting systems. You can create an illusion, like doom did, by simply displacing the graphics

 
Gridquest V2.00 is out!!
http://www.create-games.com/download.asp?id=7456

Eternal Man [EE]

Pitied the FOO

Registered
  18/01/2007
Points
  2955

Game of the Week WinnerHero of TimeLOL SignI am an April Fool
10th September, 2008 at 16:54:07 -

Yes, but having the player be able to walk forward into a room, turn right a few steps then turning 180 degrees and still see the correct image consist some sort of Z-axis?

 
Eternal Entertainment's Code'n'Art Man

E_E = All Indie


...actually Ell Endie, but whatever.
Image
Image

OMC

What a goofball

Registered
  21/05/2007
Points
  3516

KlikCast Musician! Guy with a HatSomewhat CrazyARGH SignLikes TDCHas Donated, Thank You!Retired Admin
10th September, 2008 at 18:01:28 -

You would think, wouldn't you? O_o Sounds like it to me...

 

  		
  		

Cecilectomy

noPE

Registered
  19/03/2005
Points
  305

Has Donated, Thank You!VIP MemberWeekly Picture Me This Winner!Cardboard BoxGhostbuster!Pokemon Ball!ComputerBox RedSanta HatSnowman
I am an April Fool
10th September, 2008 at 20:35:16 -

7 axis movement is possible. it is just impossible to do true z axis rotations in raycasting. so you can jump up and down and go up stairs n what not, but you cant "look" up and down.

 
n/a

Eternal Man [EE]

Pitied the FOO

Registered
  18/01/2007
Points
  2955

Game of the Week WinnerHero of TimeLOL SignI am an April Fool
10th September, 2008 at 23:15:07 -

So, a basic Z-axis is there, but not a combined z/y rotation/scaling thingie.

 
Eternal Entertainment's Code'n'Art Man

E_E = All Indie


...actually Ell Endie, but whatever.
Image
Image

Pixelthief

Dedicated klik scientist

Registered
  02/01/2002
Points
  3419

Game of the Week WinnerWeekly Picture Me This Winner!You've Been Circy'd!VIP MemberI like Aliens!Evil klikerThe SpinsterI donated an open source project
11th September, 2008 at 06:07:03 -

Well look at a screeny like this:
Image


If I simply moved the Y coordinate where each line of the wall is drawn by a percentage, it will give the illusion of moving upward, and the inverse for downward. And just move the sprites up/down accordingly. This can give the illusion of jumping/crouching, but in reality no new information is being displayed; you can't view surfaces you couldn't before, etc. And the further I skew up and down, the more obviously fake it is. After a handful of pixels, it looks like I'm just shifting the display up and down.

Sadly my FPS has taken a hit since I modified it to load textures from files, so I'm going to need to rewrite a bit so that it can have a variable rsolution; the 3 pixel-per-column for 200 total columns is a bit taxing on MMF. I think most peoples computers would run it, but it gets to be ~30 FPS if you get into a big open area with lots of different textures.

 
Gridquest V2.00 is out!!
http://www.create-games.com/download.asp?id=7456

jpSoul



Registered
  25/10/2003
Points
  1714
11th September, 2008 at 06:25:35 -

these horrible monsters afraid me

 
n/a

Cecilectomy

noPE

Registered
  19/03/2005
Points
  305

Has Donated, Thank You!VIP MemberWeekly Picture Me This Winner!Cardboard BoxGhostbuster!Pokemon Ball!ComputerBox RedSanta HatSnowman
I am an April Fool
11th September, 2008 at 08:19:26 -

well i guess since the engine im using doesnt use raycasting but simple maths related to all objects to display said objects properly scaled and positioned you CAN see new surfaces by adding and subtracting from the y values.

in werbads open sourced engine there is a few events commented out by "never" statements.

take out those never statements to enable "jumping" and youll see it in action.

 
n/a

alastair john jack

BANNED

Registered
  01/10/2004
Points
  294

GOTW WINNER CUP 1!GOTW WINNER CUP 2!GOTW WINNER CUP 3!VIP MemberMushroomI am an April Fool
11th September, 2008 at 09:46:57 -

Will you do anything for the ground? Use mode7 or something?

 
lol

Eternal Man [EE]

Pitied the FOO

Registered
  18/01/2007
Points
  2955

Game of the Week WinnerHero of TimeLOL SignI am an April Fool
11th September, 2008 at 13:09:35 -

I'm very much looking forward to both of your projects Pixelthief and Cecil!

 
Eternal Entertainment's Code'n'Art Man

E_E = All Indie


...actually Ell Endie, but whatever.
Image
Image

Cyber Smurf



Registered
  22/08/2008
Points
  33
11th September, 2008 at 13:20:51 -

Hmmm... this is mabey just the right thing for me to use, when I am going to re-make Eye of the Beholder...

Don't know, but sure looks great. Good work Pixelthief!

 
n/a

Eternal Man [EE]

Pitied the FOO

Registered
  18/01/2007
Points
  2955

Game of the Week WinnerHero of TimeLOL SignI am an April Fool
11th September, 2008 at 13:52:39 -

If you are going to do an "eyeofthebeholder-esque" game you could always use a dungeon crawler engine, there are a few nice open source ones here on tdc, the programming is far easier with those. You can check these out:

http://www.create-games.com/download.asp?id=6358
http://www.create-games.com/download.asp?id=6642
http://www.create-games.com/download.asp?id=7143

I've been working on and off with my own dungeon crawler engine including halfsteps and a very simple rotation effect so you don't lose your orientation in dark and murky dungeons...

 
Eternal Entertainment's Code'n'Art Man

E_E = All Indie


...actually Ell Endie, but whatever.
Image
Image

Cyber Smurf



Registered
  22/08/2008
Points
  33
11th September, 2008 at 15:24:54 -

Interesting Eternal Entertainment. I have downloaded them, so I am going to check them out soon. Thanks!

 
n/a

Pixelthief

Dedicated klik scientist

Registered
  02/01/2002
Points
  3419

Game of the Week WinnerWeekly Picture Me This Winner!You've Been Circy'd!VIP MemberI like Aliens!Evil klikerThe SpinsterI donated an open source project
11th September, 2008 at 15:39:18 -


Originally Posted by alspal
Will you do anything for the ground? Use mode7 or something?



I know the math of how to use a further raycasting effect to display ground & ceilings in the overlay just like the walls with http://www.permadi.com/tutorial/raycast/rayc12.html but that might be a little excessive. Likewise with Mode7; I'm having troubles layering it too, although I think if I used an active overlay it would work. But the main concern is that it would kill the games speed, I mean I already had to implement a multi-resolution system because good ones slow down on some computers. Rendering floors too might kill it.

 
Gridquest V2.00 is out!!
http://www.create-games.com/download.asp?id=7456

AndyUK

Mascot Maniac

Registered
  01/08/2002
Points
  14586

Game of the Week WinnerSecond GOTW AwardHas Donated, Thank You!VIP Member
11th September, 2008 at 17:36:10 -


Originally Posted by Pixelthief
you can't do Z-axis in raycasting systems. You can create an illusion, like doom did, by simply displacing the graphics



Thats what i meant, but now i think about it the extra impact it would have on the processor would probably be ridiculous even if possible.

 
.

Pixelthief

Dedicated klik scientist

Registered
  02/01/2002
Points
  3419

Game of the Week WinnerWeekly Picture Me This Winner!You've Been Circy'd!VIP MemberI like Aliens!Evil klikerThe SpinsterI donated an open source project
11th September, 2008 at 18:16:29 -

well its just not possible in MMF, the system dies under the kind of slowdown full 3d engines create. Doing nothing but drawing flat sprites to the screen in rectangles is enough to pull it to 30 FPS on my computer, imagine trying to map that to polygons in wire meshes. No the overhead in MMF is just too inefficient. It can easily be done in languages like C, and has of course been done to death.

 
Gridquest V2.00 is out!!
http://www.create-games.com/download.asp?id=7456

Cecilectomy

noPE

Registered
  19/03/2005
Points
  305

Has Donated, Thank You!VIP MemberWeekly Picture Me This Winner!Cardboard BoxGhostbuster!Pokemon Ball!ComputerBox RedSanta HatSnowman
I am an April Fool
11th September, 2008 at 18:50:04 -

the mode7ex object i have found is only effective at super low resolutions like 320x200 otherwise it takes a toll on speed as pixeltheif said. for an old school wolfenstein engine, different colored floors and ceilings will do fine.

 
n/a

Pixelthief

Dedicated klik scientist

Registered
  02/01/2002
Points
  3419

Game of the Week WinnerWeekly Picture Me This Winner!You've Been Circy'd!VIP MemberI like Aliens!Evil klikerThe SpinsterI donated an open source project
11th September, 2008 at 21:18:45 -

yeah MMF is just plain slow. Theres really two limiting factors; the amount of draw calls to the overlay object per frame, and the amount of raycast checks run. For example, if you simply create a program where all it does is draw a single pixel in the overlay object, 640 * 480 times per frame, you'll get maybe 1 frame per second. Likewise, if you check 100 times per ray, and cast 600 rays, for 60000 ray-checks per frame, your game will devour the cpu and die. In a language like C this would run fine on my computer, but MMF needs a lot of overhead per action, so more complicated things run much slower than they should. The result is that I need to limit the games resolution, drawing only vertical columns, and make each one 4-5 pixels wide, for a total of ~150 draws per frame, and then both limit the sight range of the player, and only check for collisions along intersections with the grid. I could program a better engine, but not in MMF.

 
Gridquest V2.00 is out!!
http://www.create-games.com/download.asp?id=7456

Cecilectomy

noPE

Registered
  19/03/2005
Points
  305

Has Donated, Thank You!VIP MemberWeekly Picture Me This Winner!Cardboard BoxGhostbuster!Pokemon Ball!ComputerBox RedSanta HatSnowman
I am an April Fool
11th September, 2008 at 22:16:35 -

if youre using actual raycasting and vertical column drawing, you can probably increase performance by allowing reduction in quality (wider columns being drawn, meaning less rays being cast at wider angles) and reducing the draw depth.

 
n/a

Pixelthief

Dedicated klik scientist

Registered
  02/01/2002
Points
  3419

Game of the Week WinnerWeekly Picture Me This Winner!You've Been Circy'd!VIP MemberI like Aliens!Evil klikerThe SpinsterI donated an open source project
11th September, 2008 at 22:49:58 -

yah thats what I meant by lowering resolution. Column width is just a gameplay constant, but the difference between 3 & 15 is this:
Image
Image

4 or 5 pixels seems to be a happy inbetween.

 
Gridquest V2.00 is out!!
http://www.create-games.com/download.asp?id=7456

alastair john jack

BANNED

Registered
  01/10/2004
Points
  294

GOTW WINNER CUP 1!GOTW WINNER CUP 2!GOTW WINNER CUP 3!VIP MemberMushroomI am an April Fool
12th September, 2008 at 07:44:39 -

I am glad you allow for people who do actually have a fast computer to run it well!
Looks incredibly fantastic!

 
lol

Marko

I like you You like you

Registered
  08/05/2008
Points
  2804

Has Donated, Thank You!Game of the Week WinnerVIP Member360 OwnerDos Rules!Happy FellahCrazy EvilI am an April FoolGingerbread House
12th September, 2008 at 20:44:44 -

Man i cannot wait to see this running!!

 
Image

Subliminal Dreams. . ., daily gaming news and the home of Mooneyman Studios!
www.mooneyman-studios.webs.com

Cecilectomy

noPE

Registered
  19/03/2005
Points
  305

Has Donated, Thank You!VIP MemberWeekly Picture Me This Winner!Cardboard BoxGhostbuster!Pokemon Ball!ComputerBox RedSanta HatSnowman
I am an April Fool
12th September, 2008 at 21:50:40 -

lets just say with some proper textures, its beautiful.

 
n/a

alastair john jack

BANNED

Registered
  01/10/2004
Points
  294

GOTW WINNER CUP 1!GOTW WINNER CUP 2!GOTW WINNER CUP 3!VIP MemberMushroomI am an April Fool
13th September, 2008 at 01:05:57 -

Looks like you could make a game like this
http://db.tigsource.com/games/8bit-killer


 
lol

Eternal Man [EE]

Pitied the FOO

Registered
  18/01/2007
Points
  2955

Game of the Week WinnerHero of TimeLOL SignI am an April Fool
13th September, 2008 at 01:06:46 -

I love that game!
And, yeah, couldn't you?

 
Eternal Entertainment's Code'n'Art Man

E_E = All Indie


...actually Ell Endie, but whatever.
Image
Image

Hayo

Stone Goose

Registered
  15/08/2002
Points
  6949

Game of the Week WinnerHas Donated, Thank You!VIP MemberGOTM 3RD PLACE! - APRIL 2009Weekly Picture Me This Round 27 Winner!Weekly Picture Me This Round 41 Winner!Weekly Picture Me This Round 45 Winner!
13th September, 2008 at 02:03:33 -

This is looking very promising.

 
www.hayovanreek.nl

Pixelthief

Dedicated klik scientist

Registered
  02/01/2002
Points
  3419

Game of the Week WinnerWeekly Picture Me This Winner!You've Been Circy'd!VIP MemberI like Aliens!Evil klikerThe SpinsterI donated an open source project
14th September, 2008 at 22:05:52 -


Originally Posted by alspal
Looks like you could make a game like this
http://db.tigsource.com/games/8bit-killer


it really depends on if I can find a way to optimize the raycasting algorithm. I used caching so that sprite loading/drawing has no impact on FPS, but the simple math behind raycasting, seems to be too much. I think if I find some changes to optimize it I could potentially have graphics just as crisp as that, running at 50 FPS. That games has a resolution of 1 pixel/ray, which requires 512 rays to be cast, each one checking maybe 20-40 collisions in a worst case (empty field of view) scenario. One reason that game might run particularly fine is because it appears the collision grid for walls is HUGE; it looks like your vision range is never more than 6 or 7 squares total. I'm intending to write my code for doom or at least wolfenstein level graphics. Push the boundaries of MMF

 
Gridquest V2.00 is out!!
http://www.create-games.com/download.asp?id=7456

Pixelthief

Dedicated klik scientist

Registered
  02/01/2002
Points
  3419

Game of the Week WinnerWeekly Picture Me This Winner!You've Been Circy'd!VIP MemberI like Aliens!Evil klikerThe SpinsterI donated an open source project
14th September, 2008 at 22:15:48 -

The real difficulty of Klik is that nobody really knows what the limiting factors in any engine will be. If it were in C++, I could google my issues and find 100 articles about optimization. But in MMF, you have to experiment and do trial/error studies to discover why something is running slowly. For example, with my text based one, I initially found that as soon as I made it strings instead of textures, the game collapsed. This as it turned out, is because strings are immutable in MMF, and thus when you append them, you are making and requiring memory for a 3rd string, instead of altering the existing one. So appending 1560 characters at runtime took out memory for Σ1560 strings. Youch. Next I found that the overlay objects "Load image from file" turned out to be a limiting factor; running this inside of a loop will significantly lower the frame rate. Answer? Create extra overlay objects to serve as buffers, as pasting from an overlay to overlay takes no time at all compared to loading from a file.

Now my issue is with raycasting itself. Drawing the sprites & walls on screen is taking no processing time, instead the actual raycasting algorithm, which follows this: http://www.permadi.com/tutorial/raycast/rayc1.html very closely, is an issue. Projecting 600 rays per frame, each of which checks 40 array-collisions, seems to be too much for MMF. Now its back to the blocks of experimenting, and finding out what piece of code is the limiting factor. Is it the "Find distance to object" on the advanced math object? Is it the "Check array @ XY"? is it the very act of running 600 * 50 loops? Who the heck knows.


moral is, I'll probably post the darned thing open source later today.

 
Gridquest V2.00 is out!!
http://www.create-games.com/download.asp?id=7456
   

Post Reply



 



Advertisement

Worth A Click