Contest with CPU/RAM usage resrtiction?

Hey all,

I don’t know a lot about hardware, nor do I have any idea what’s going on inside my computer when it’s running a game/program, but I thought of something and I was wondering of this would be possible.
The idea is to have a game contest with a maximum amount of memory you can use at any time while running the game. I don’t mean file size, but more like RAM or CPU usage, so your have to be carefull with your calculations and release eny memory immediately when you don’t need it anymore and stuff like that. Only I’m not sure if this is measurable and if the results are reliable, or if this is also dependent on wich hardware the game is running and maybe some other factors.

So, what do you think? Would this be possible? And just as important: Would this be fun?

You should then use native languages. Java’s memory is only released by the gc and you cant force the gc.

Oh yeah, how could I forget that…

Well, nevermind then xD

You could force to only use a single predefined array for all “memory” based calculations.


int[] memory = new int[40000];

any statically defined variable has to take up one “slot”,

any other datastore construct like an Image has to be inserted and recovered from this memory-array before
beeing rendered, or so.

no recursions.

Would make very odd looking code though.
But theoretically it could impose a strict limit to verify agains.

How would this be fun?

working within limits is arbitrary anyhow, but getting something done within these limits can be fun.


What you said are not limits, they are impossibles!

another option to limit ram usage is by capping the maximum memory available to the Java VM (via VM parameters).

I still think the best format for limitation is time and unknown theme a la LD48. Use whatever tricks you can! Use whatever art and sound effects you can find! You’ve got 48 hours. But be aware your final rating will be attenuated by how closely your game adheres to the theme according to the judges.

Cas :slight_smile:

@Damocles Yes, although I would find this quiet interesting to do, this would indeed result in very odd looking code and would be very hard to judge. Judges would have to look through the source code of every game to make sure they don’t store anything in another variable. Also, I don’t think there would be very many participants for a competition like that. And I don’t even wanna think about what a pain it would be to be unable to use a String, but instead be forced to save the ASCII code of every character in an array of intergers. xD

@kappa Yes, I guess that would be the best way indeed, unfortunately, like SHC stated, you have little to no control over the garbage collector and thus it would be very hard to write a game of wich you can be the memory usage stays just under the maximum.

I was just trying to think of a new way of limitation, came up with this idea and thought I’d throw it here and see other peoples opinions. However, I think I am convinced now that this is not going to work at all.

Oh yeah loads of fun. Let’s have a String you want to save, you first get all the chars, then iterate over them, casting each to int and saving them to the array. And the same if you want to get it back plus StringBuilder. By the end you don’t even know what String you had to begin with, lets take a look, ah yes it was “fuck you damocles”, how odd, maybe I messed up the order :smiley:

@RAM limitation:
Well this isnt C/C++, its nearly impossible to micro manage on such a small scale in java and definitely annoying as all hell.
@VM Ram cap limit: Well you still have the problem that all textures have to go through system RAM before getting into VRAM, and if the cap is too low you would have to split a texture up and shit.
@CPU usage limit: doesnt work, everybody has different processors, and with java and the jvm there too much overhead going on from preventing sudden spikes or whatever

@timed (and themed) contest: Yeah I guess that works as LD48 shows. More accessible and everything.
Still there is like a fixed point in time where you have to have free time, cant to it later; Then you have to record it to prove it and stuff… insert more of my whining here…

It’s hard to think of reasonable limitations for a game competition besides amount of game size and dev time. But yeah, most important thing is that a developer can focus on the game and gameplay and not on technology.