Advertisement

A Tile engine/map editor demo......

Started by February 05, 2000 10:14 PM
37 comments, last by Darrell 24 years, 8 months ago
Will you release the source?
BTW-Ultima 8 had an engine which looked about the same, but could be ran in 486/66 without a problem. Your code definitely needs optimization! But if I did it- 1 fph (1 frame per hour).
As for optimizations, I don''t really know what more I can do. Ultima 8 was in 256 colour, and in low resolution. (320x240 ?)

30 fps while near and outside the building was my primary concern. If I can obtain that on modest hardware I''m satisfied, and I''ll move on to creating game element stuff now. I''m in the processes of building a more detailed "town" with some NPC''s so I can deliver better test of the engine. I''ve just didn''t have much time lately so it''s moving slowly. By next week I should have something up.

As for source, I''m willing to release it, but it''ll be as is, no docs, etc. There''s some inline documentation but other than that nothin.

The structure of my maps and object storage is pretty simple. Maps are dividing into sectors, and cached in from disk when requested by the engine. So if your walking into a new section it loads it from disk, and places it into my cache. The cache size is configurable.
Same goes with objects, objects are stored into further subdivided sectors, i call sections. They too are cached.
Graphics - tiles and objects also use a similar cache system

Once I clean up the code, I''ll post it up on the web site for downloads. If anyone thinks they can optimize it better, feel free to let me know
Advertisement
140-170 fps while windowed, and about 70 while in full screen.
I found a bug, when you come in the house, and walk close to the walls, at one point a part of a wall is drawn over a character, although it should be behind the character.
Have you tried your "game" in low res? Try and tell what you got!
I''m not even thinking of supporting low res < 16bit colour.

After I release the source, if you want to add functionality for more modes go ahead
what did you use for the map editor? did you use directx or windows GDI?


_________________Gecko___

_________________Gecko___Gecko Design
Advertisement
The engine was coded first. Once it was in a semi-working order, I started on the mapeditor.
The mapeditor uses a MDI client interface, and the childwindow class uses the engine itself.

The engine was written in C++, so its all designed and layed out nice. All you need to do is pass in a hwnd to it, and it''ll display itself in that window. Of course you need to make sure your window conforms to videomodes 640x480, 800x600 etc etc, and that you tell the engine what mode you are running targeting.

I thought it would be better to have one piece of centralized code that did all the blitting, reading in maps, graphics etc. GDI would be too slow for the mapeditor, imaging trying to use those scroll bars when using the GDI, it would take forever to scroll the map.

An example of how easy it is, you could create a simple windows app through the VC++ 5.0/6.0 wizards, import all the engine classes, and with less than 10 lines of code, get the engine to display a map area. Of course lots of code is required for mouse input, map movement, collision detection etc.

I''m tidying up the code as we speak, so you''ll be able to see the code shortly.
My good 3d accelerator is my second video card, and your game doesn''t check for it. I think you should enumerate the devices. But this only applies if you are using direct3d, because it''s a 3d only card.

*** Triality ***
*** Triality ***
You did a good job. I got about 160-180 fps on my PIII 550. And by the way, could I have the source code? I would really appreciate it!

"Remember, I'm the monkey, and you're the cheese grater. So no fooling around."
-Grand Theft Auto, London
D:

This topic is closed to new replies.

Advertisement