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 17 years, 7 months ago

Thanks for the advise!

Bryan 17 years, 7 months ago

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

Gamer3D 17 years, 7 months 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 17 years, 7 months ago

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

Gamer3D 17 years, 7 months ago

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

Bex 17 years, 7 months ago

It can do 3048x3048 on myne!…

Gamer3D 17 years, 7 months 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 17 years, 7 months ago

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

omicron1 17 years, 6 months ago

I think surfaces are limited by video memory.

Gamer3D 17 years, 6 months ago

You are correct, omicron1.