Procedural content, anyone ?
by Damien Calloway · in Game Design and Creative Issues · 01/27/2011 (10:30 pm) · 10 replies
Welcome back, GG ! Nice to see you again !
I am asking about possibilities for procedural content in Torque - looking at T2D, mostly. T3D and iT2D are also very tempting - but I want to keep things small at first. The $99 deal, plus MineCraft and rougelikes in general have caught my attention lately.
I found some info on TorqueScript, and I wonder : does Torque support recursion ? L-systems ? Markov chains ? These things are possible in C, but I believe these techniques need pointers...
Also, is it possible to draw lines directly to the screen ? Not thinking of polygons, but procedural textures. Or even loading and displaying tiles without loading from a pre-rendered data file....
Naturally, I hoped to do all of this without messing with the source code - has anyone tried this yet ?
I am asking about possibilities for procedural content in Torque - looking at T2D, mostly. T3D and iT2D are also very tempting - but I want to keep things small at first. The $99 deal, plus MineCraft and rougelikes in general have caught my attention lately.
I found some info on TorqueScript, and I wonder : does Torque support recursion ? L-systems ? Markov chains ? These things are possible in C, but I believe these techniques need pointers...
Also, is it possible to draw lines directly to the screen ? Not thinking of polygons, but procedural textures. Or even loading and displaying tiles without loading from a pre-rendered data file....
Naturally, I hoped to do all of this without messing with the source code - has anyone tried this yet ?
#2
Well, in 2D, the first thing I would try would be procedural tiles - make the tiles ahead of time, but randomly place them on the screen. But yes, that is the general direction I'd be leaning in. Although, I'd simply build the level at random, and buffer it/save it to disk - similar to how rougelikes work. Other games in the style I am going after would be Pokemon Mystery Dungeon, Izuna, or Shiren the Wanderer.
Learning that TorqueScript is interpretive (with no real data types) is a great help. I take it that when you suggest C++, I can use any language that uses a C++ binding, no ? Even if I can prototype algorithms in Torque, then code them in something else for performance, that would be cool...
01/28/2011 (9:10 am)
"T2D is a 2D engine, not to sure what you mean by procedural textures. Textures usually apply to object not sprites. Are you wishing to create images on the fly an used them in game (Procedural content). If so then this is possible but not without source code modification and time. Personally, in 2D it seems like overkill. "Well, in 2D, the first thing I would try would be procedural tiles - make the tiles ahead of time, but randomly place them on the screen. But yes, that is the general direction I'd be leaning in. Although, I'd simply build the level at random, and buffer it/save it to disk - similar to how rougelikes work. Other games in the style I am going after would be Pokemon Mystery Dungeon, Izuna, or Shiren the Wanderer.
Learning that TorqueScript is interpretive (with no real data types) is a great help. I take it that when you suggest C++, I can use any language that uses a C++ binding, no ? Even if I can prototype algorithms in Torque, then code them in something else for performance, that would be cool...
#3
When you say "I take it that when you suggest C++, I can use any language that uses a C++ binding". The reason I suggested C++ is that T2D is written in C++.
01/28/2011 (9:32 am)
Rogue-likes are definitely doable in T2D. Placing tiles at run-time through scripts is not a problem.When you say "I take it that when you suggest C++, I can use any language that uses a C++ binding". The reason I suggested C++ is that T2D is written in C++.
#4
01/28/2011 (9:11 pm)
I see - cool ! Now I shall carefully consider T2D vs. T3D... I look forward to seeing what comes of it. Thank you for your time !
#5
02/03/2011 (6:23 pm)
Our game uses mostly procedurally generated content creating entire, complex levels based on a single seed and an ecosystem type. Most of this however is not possible to do solely through scripting. That would also be slow. But it's definitely something possible in Torque 3D.
#6
I know you're busy - hell who isn't! - but sometime I think it'd be real interesting for everyone, if you did a blog explaining the theory and factors for procedural creation that your using in Xenocell.
02/03/2011 (6:31 pm)
@KonradI know you're busy - hell who isn't! - but sometime I think it'd be real interesting for everyone, if you did a blog explaining the theory and factors for procedural creation that your using in Xenocell.
#7
I have installed the Torque T2D demo - it is not quite what I expected, but I plan to spend more time on it this weekend. I also have the Torsion demo, and am plotting how to go about my nefarious schemes.....
02/04/2011 (7:36 pm)
@ Steve - one site I find incredibly useful is The Procedural Content Generation Wiki - this site has all kinds of information on the subject, and will help a great deal. Also, any demoscene tips and tricks you can pick up is great, if for nothing but inspiration.....I have installed the Torque T2D demo - it is not quite what I expected, but I plan to spend more time on it this weekend. I also have the Torsion demo, and am plotting how to go about my nefarious schemes.....
#8
02/04/2011 (8:00 pm)
For what it's worth, the 7DRL Challenge is taking place in a few weeks. RogueBasin is a great resource for RL developers.
#9
The site Damien recommends is a very good one. Our approach is referred to as search based procedural content generation. At least a part of it is.
To plan out the map, we use a very fast approach to find the largest walkable area on the rough map we generate. To search strategic positions, we use a node grid spread out only within this area that we weigh by using an AI agent and a pathfinding algorithm - giving us primary objective positions, optimal boss and mob spawn points, resource spawns, etc..
Then this zone becomes populated - only this area and its surroundings. The system discards anything that would make it impossible for all those POIs to be reached, but only large objects with collision are tested otherwise it would be very slow.
This results in some really nice, varied levels giving the impression as if they were hand made. I often see cliffs forming a cave in above, or lakes with trees on one shore, etc... It looks believable, and that's good enough.
The whole process is not too fast though. Depending on settings it can mount up to take more than a minute even. For this reason we cache everything. Since both clients and servers share a common zone cache that we keep online, a new zone is only generated once and downloaded just when it is first needed.
It's very interesting, I really would like to write a lot about it. I hope I can do that soon. It's really cool! :)
Had 3 hardware failures on two servers this week as if things weren't bad enough already. Next time I'm creating a single player pong. But procedurally. :)
02/04/2011 (8:36 pm)
@Steve: I'd be happy to. I still need to first finish that AI thing I promised you. I haven't forgotten about that.The site Damien recommends is a very good one. Our approach is referred to as search based procedural content generation. At least a part of it is.
To plan out the map, we use a very fast approach to find the largest walkable area on the rough map we generate. To search strategic positions, we use a node grid spread out only within this area that we weigh by using an AI agent and a pathfinding algorithm - giving us primary objective positions, optimal boss and mob spawn points, resource spawns, etc..
Then this zone becomes populated - only this area and its surroundings. The system discards anything that would make it impossible for all those POIs to be reached, but only large objects with collision are tested otherwise it would be very slow.
This results in some really nice, varied levels giving the impression as if they were hand made. I often see cliffs forming a cave in above, or lakes with trees on one shore, etc... It looks believable, and that's good enough.
The whole process is not too fast though. Depending on settings it can mount up to take more than a minute even. For this reason we cache everything. Since both clients and servers share a common zone cache that we keep online, a new zone is only generated once and downloaded just when it is first needed.
It's very interesting, I really would like to write a lot about it. I hope I can do that soon. It's really cool! :)
Had 3 hardware failures on two servers this week as if things weren't bad enough already. Next time I'm creating a single player pong. But procedurally. :)
#10
02/04/2011 (8:41 pm)
wow!
Torque Owner Alain Labrie
Ware-Wolf Games
T2D is a 2D engine, not to sure what you mean by procedural textures. Textures usually apply to object not sprites. Are you wishing to create images on the fly an used them in game (Procedural content). If so then this is possible but not without source code modification and time. Personally, in 2D it seems like overkill.