Procedural Content Generation (Part 1: Randomness)

本文探讨了Procedural Content Generation(PCG)在游戏如Minecraft和Spelunky中的应用,强调了如何通过机器学习、编程和设计创造出优秀的随机生成游戏。讨论了计算机生成随机数的方法,如Marsaglia's Xorshift128算法,并区分了真正的随机性和伪随机性。PCG是在随机性基础上加上约束,如在生成红色系颜色时使用HSB模型。此外,推荐了Kenney的游戏资源库用于创建随机森林等游戏场景,并提供了正态分布的Box-Muller方法示例。
摘要由CSDN通过智能技术生成

一些用了PCG game:minecraft/astroneer/the sims4(characters have personality)/spelunky/papers, please/spore/some roguelike games/Elite

how to create a good PCG game: teach machine which is good level+good programmer+good level designer

Randomness

property of sequence, is not a sequence of number

how does a computer generate a random number?

Marsaglia's Xorshift128 用这个算法来实现random

要输入一个initial number->seed 

if there is sth come up with random?

Uncertainty in Game:

true randomness(Dice is not randomness because if we know the air and everything about dice we can predict the number of dice we rolled)

fake randomness(Hidden information)

Random vs Procedural

procedural is random with constrain:

比如颜色 需要的颜色是红色系的(generative space)

PCG:constructive有时候rgb不是最好的方式要换成HSB来

RGB->HSB 

1. 随机数

Debug.Log(Random.Range(0, 10)); //[0,10] int
Debug.Log(Random.Range(0f, 10f)); //[0,10] float

2.随机颜色


    public List<Color&
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值