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 19 years ago

Thanks for the advise!

Bryan 19 years ago

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

Gamer3D 19 years 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 19 years ago

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

Gamer3D 19 years ago

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

Bex 19 years ago

It can do 3048x3048 on myne!…

Gamer3D 19 years 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 19 years ago

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

omicron1 19 years ago

I think surfaces are limited by video memory.

Gamer3D 18 years, 12 months ago

You are correct, omicron1.