Java-Gaming.org    
Featured games (79)
games approved by the League of Dukes
Games in Showcase (477)
Games in Android Showcase (109)
games submitted by our members
Games in WIP (536)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Contest with CPU/RAM usage resrtiction?  (Read 985 times)
0 Members and 1 Guest are viewing this topic.
Offline Freeky

Senior Newbie


Medals: 1



« Posted 2013-09-18 16:27:58 »

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?
Offline SHC
« Reply #1 - Posted 2013-09-18 16:38:49 »

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

Offline Freeky

Senior Newbie


Medals: 1



« Reply #2 - Posted 2013-09-18 16:47:26 »

Oh yeah, how could I forget that...

Well, nevermind then xD
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Damocles
« Reply #3 - Posted 2013-09-18 16:54:05 »

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

like

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.

Offline sproingie

JGO Kernel


Medals: 202



« Reply #4 - Posted 2013-09-18 16:59:30 »

How would this be fun?
Offline Damocles
« Reply #5 - Posted 2013-09-18 17:01:59 »

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

Offline SHC
« Reply #6 - Posted 2013-09-18 17:07:52 »

@Damocles

What you said are not limits, they are impossibles!

Offline kappa
« League of Dukes »

JGO Kernel


Medals: 75
Projects: 15


★★★★★


« Reply #7 - Posted 2013-09-18 17:25:47 »

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

JGO Kernel


Medals: 343
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #8 - Posted 2013-09-18 18:20:45 »

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 Smiley

Offline Freeky

Senior Newbie


Medals: 1



« Reply #9 - Posted 2013-09-18 18:37:10 »

@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.
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Cero
« Reply #10 - Posted 2013-09-18 20:39:28 »

How would this be fun?
int[] memory = new int[40000];
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 :D

@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.

Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

CogWheelz (18 views)
2014-07-30 21:08:39

Riven (23 views)
2014-07-29 18:09:19

Riven (15 views)
2014-07-29 18:08:52

Dwinin (12 views)
2014-07-29 10:59:34

E.R. Fleming (33 views)
2014-07-29 03:07:13

E.R. Fleming (12 views)
2014-07-29 03:06:25

pw (43 views)
2014-07-24 01:59:36

Riven (43 views)
2014-07-23 21:16:32

Riven (30 views)
2014-07-23 21:07:15

Riven (31 views)
2014-07-23 20:56:16
List of Learning Resources
by SilverTiger
2014-07-31 18:29:50

List of Learning Resources
by SilverTiger
2014-07-31 18:26:06

List of Learning Resources
by SilverTiger
2014-07-31 13:54:12

HotSpot Options
by dleskov
2014-07-08 03:59:08

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:58:24

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:47:22

How do I start Java Game Development?
by ra4king
2014-05-17 11:13:37

HotSpot Options
by Roquen
2014-05-15 09:59:54
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!