Will too many interactions slow my game?

Started by Oddysseus, Sun 11/11/2007 03:37:09

Previous topic - Next topic

Oddysseus

I have a rather over-ambitious goal for my game, and I'm wondering if it's even possible: there are a total of 70 items the character can have over the course of the game, and I want to write a unique response for every possible 'use item on another item' interaction.  Quick math will tell you that that would be 70 x 70 = 4900 responses.  Now, writing them is a challenge in itself, but I'm more worried that it will slow down the game if the program has to skip over all that code every cycle.

So, will my game slow down to a crawl- and if so, should I use a room as a make-shift inventory, with objects for items, or what?

Khris

Why would the game be concerned with the inv items every cycle?
Basically, huge amounts of data don't slow down code automatically. In most cases not at all.
You even said so yourself: "skip over all that code". That's usually exactly what happens.

Radiant

No. At least, not noticeably so.

What will slow down your game is having an excessive amount of objects/characters/overlays/GUIs on-screen at the same time, especially if they're big and partially translucent. Or doing too much with the RawDraw commands.

SMF spam blocked by CleanTalk