Game Making Tip #1

Posted by Gamer3D on Sept. 25, 2006, 4:31 p.m.

To increase game speed, pre-draw backgrounds to a bitmap (called a surface in GameMaker). Then it can be drawn once instead of the backgrounds (and tiles) being drawn many times. As bitmaps / surfaces are memory hogs, include them as an option only.

Pros:

Saves render time of unnecessary objects/tiles.

Cons:

Takes a lot of video memory.

Comments

Bex 18 years, 1 month ago

Thanks for the advise!

Bryan 18 years, 1 month ago

That eats alot of video memory. But it does speed up the game. I'd say, draw your background manually.

Gamer3D 18 years, 1 month ago

An excellent point about memory usage, bryan. Problem #2 (as I am not afraid to point out) is that a surface cannot be bigger than 2048x2048.

Bex 18 years, 1 month ago

True…and not,it can not be bigger than 3048x3048,close thuogh.

Gamer3D 18 years, 1 month ago

I have tested it. On my computer at least, the maximum is 2048x2048

Bex 18 years, 1 month ago

It can do 3048x3048 on myne!…

Gamer3D 18 years, 1 month ago

Interesting… I suggest, however, that any surfaces be limitied to the lowest size limit found. That way, the game will be compatible with more computers.

Alert Games 18 years, 1 month ago

Nice small tip, but a little more explanation and usage would be nice in the blog. ;)

omicron1 18 years, 1 month ago

I think surfaces are limited by video memory.

Gamer3D 18 years ago

You are correct, omicron1.