Java-Gaming.org Java4K winners: [ by our judges | by the community ]         
Featured games (67)
games approved by the League of Dukes
Games in Showcase (∞)
games submitted by our members



News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  Print  
  Procedurally Generated Graphics  (Read 2463 times)
0 Members and 2 Guests are viewing this topic.
Offline Son Of Cain

Jr. Member
**

Posts: 72



« on: 2006-10-13 10:22:24 »

I never did that before... Have no clue on how even the theoretical concept works...
So, can anyone point out some good papers explaining the trick?

Also, if any of you did that for 4K, can you kindly point out some directions? Of course, I'm not asking for you to give away your secrets, but rather, help this hopeless newbie a bit  Grin
Offline fletchergames

JGO Ninja
***

Posts: 553



« Reply #1 on: 2006-10-13 11:19:10 »

I've used the Java 2D methods for drawing lines, arcs, etc. to generate some art before.  I only made things like diamonds and so forth though.  Generating complex art with a computer program is a hard thing to do.

I've always wanted to generate art with a genetic algorithm, but there's no obvious way to get it to work.

This is a hard topic, so I don't think you'll find much useful information.  It is something people are interested in though.
Offline Son Of Cain

Jr. Member
**

Posts: 72



« Reply #2 on: 2006-10-13 12:15:33 »

I imagine how complex it must be... That's the very reason why I need a basis to start reading, before jumping into code that needs to be optmized the most for size restrainments. I already have played well with GeneralPath and some other helper classes, but I believe this type of algorithm may have some kind of pattern or basic concepts that saves us trouble and give better results. I bet there are some papers out there that deal with the issue, but most of them to generate procedural textures using techniques like perlin noise...

Perlin noise, since I mentioned it, seems to be doable (to some extent, of couse) in a 4K game... I need procedural art to generate characters in different stances... Perlin noise might help me update the position of the points that compose the lines from which my chracters are made. Seems like a good way to come up with "living" characters in 4k, using perlin noise to interpolate their "joints". Am I too mad for considering it?
Games published by our own members! Go get 'em!
Offline CaptainJester

JGO Neuromancer
****

Posts: 1138
Medals: 8


Make it work; make it better.


« Reply #3 on: 2006-10-13 14:00:02 »

I was working on a fighting game last year, but didn't finish.  I can send you the code if you want.  I got as far as having 2 characters on the screen and having 1 walk, punch and kick.

Offline Son Of Cain

Jr. Member
**

Posts: 72



« Reply #4 on: 2006-10-13 14:16:56 »

Thanks Capn', I'd appreciate that..

But I'm cool with that, no problem doing it.. I am interested in some ways of improving the looks using cheap (in terms of size) tricks  Tongue

Look how Ryu from Street Fighter stands... both his knees and shoulders go up and down in a fixed manner.. Perlin Noise, for example, can be used to control interpolation from two points, without producing "fixed" values on every loop.. this is already used to improve joint-based animation for models, to make them feel more "alive", with a certain degree of entropy injected on their movement.

Since in Java 2D (and everywhere else =) we use points to limit straight lines, some of these points can be used to simulate "joints". I can use Perlin Noise to generate the values of their positions across a series of stances, in a separate program, and use it as input to animate characters on the 4K game side.

This is an idea I just had.. can't really imagine if it's worth the work to build it up... but I'm inclined to try. Do you guys see any pitfalls ahead of me?
Offline woogley

JGO Neuromancer
****

Posts: 1098
Medals: 5



« Reply #5 on: 2006-10-13 14:17:18 »

Chopper4K might give you some inspiration. it's all done in Java2D shapes
Offline nva225

Sr. Member
**

Posts: 298



« Reply #6 on: 2006-10-13 19:31:10 »

Perhaps a bit out of the scope of this thread and java 4k but I'd thought I'd post a link to about the most amazing use of procedural graphics I've ever seen (sadly not in java).

http://212.202.219.162/kkrieger

Yes, they have 24 times as much space as 4k games do but you gotta admit it's impressive.

Note you'll need a reasonably powerful machine to play it (6600gt and up would be good).
Offline DonaldEKnuth

Full Member
**

Posts: 127



« Reply #7 on: 2006-10-13 20:43:42 »

The colorization of the tiles and the animated "sun balls" in my Sokoban4k game were all created using calculations. I just messed around until I thought it looked good enough. The code is very hackish but perhaps it could give you some idea of your own.

Using perlin noise for interpolations could be a good thing. It could also look no different from having a normal random value added to the interpolation. It will take up more space than to use a normal random value, so you'll have to look at the tradeoff.

Contextfreeart (check out the gallery) is an excellent example of procedural graphics. It shouldn't take up too much space to implement some variant on the theme in a game which could fit into 4k. It could for example be used to create different enemies in a game, or different landscape pictues, or ...

My 4k 2006 Entry: Sokoban4k
Offline Son Of Cain

Jr. Member
**

Posts: 72



« Reply #8 on: 2006-10-13 21:14:06 »

(...) It could for example be used to create different enemies in a game, or different landscape pictues, or ...

That's also a reason why I'm considering that... It gives an unique result each time you play... Or, a somewhat unpredictable one. And I find that most cool  Tongue

Thanks guys for the suggestions and comments. I'll see what I can do, and hopefully post back to describe how it went.

Rodrigo
Pages: [1]
  Print  
 
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.09 seconds with 21 queries.