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.

DLL Talk / Board DLL, a system to make easily and fast animated boards for 2D games

Author
Message
Atreides
21
Years of Service
User Offline
Joined: 11th Oct 2003
Location: Switzerland (but NOT on a mountain !)
Posted: 18th Aug 2007 16:06 Edited at: 18th Aug 2007 16:11
I don't know exactly why I did it, but I did it : a DLL to make, display and animate easily and fast 2D boards.
I think it is time for a first release and to hear what people think about it and what improvements I should make.

Here are the main features :
- very fast (speed informations at the bottom of the message)
- create large boards easily
- the boards can be far bigger than the screen (in the attached example, it is 320x240 tiles big, the tiles are 32x32 pixels images)
- save and load the boards
- the boards can have from 1 to thousands of layers (1 to 10 are better for the memory )
- each layer of each tile can be animated with almost any quantity of frames you want
- each layer of each tile can also have a flag value between 0 and 255 for your own use
- there is a "shape system" which allows you to get informations about the tiles under any object of your game (more informations in the command list)
- the 33 almost-best commands of the known universe (well... okay, their names are ugly, but they're working rather correctly - I've had no crash for at least half a dozen tests).
- the c++ source code is so terrible that I can now understand only about its half. When I try to modify something, I feel like poking a dead dog, that's amusing

First, here's an example that shows how easy using my DLL can be. It cannot be run for it is only an example : the medias do not exist and the board that is loaded either.
This example loads a saved board and then you can move a "player" on it, with, of course, collision tests. If the board contains animations, they also will be played.

As you can see, it is rather easy.

So, what commands does the DLL contains ? There are currenly 33 of them :


(I wrote them here in the same order as they are in the stringtable.)

I attached an example to this message. The example contains :
- the DLL (move it in the "compilerplugins-user" directory if you want to compile)
- a DBP project as example. It makes a board with an animated river and an ugly bridge the player can cross. All the tiles of the river have the same "animation time and speed", remove the comments of the two lines "random tile animation" to randomize the animations. The river will still be ugly, but a bit less.
- the tiles which are needed (I made them myself, that is why they are terribly ugly)
- an executable of the project, for the people who are too lazy to compile it If you want to run it, scan it for virus. I did it before uploading and found none, but one should always be careful with executables

When I run this program on my two years old laptop, the board is displayed in about 22 milliseconds without optimisations.
With the optimisation flag to 1, it is displayed in 22 milliseconds too, when the camera is moving, but in 1 to 3 milliseconds when it is not. When that second time was calculated, the animated river was displayed across the screen.

I also looked how fast is the "load board" command. The 320x240=76800 tiles, with two layers and 1200 animated tiles was loaded in 132 milliseconds.

Hmm... no screenshots, I'm ashamed of my ugly tiles and they wouldn't really show what the DLL does, they'd just show tiles

I hope it may be useful to some people. If you use this DLL in a game you make, write a link to this page in the readme file. Any comment or question will be welcome

The sleeper must awaken !

Attachments

Login to view attachments

Login to post a reply

Server time is: 2024-11-22 22:05:44
Your offset time is: 2024-11-22 22:05:44