Rise的自留地

记录生活中的点滴,分享编程技术和游戏开发经验。

0%

1.什么是游戏功能
游戏功能即game feature,一个游戏的各个子系统。如法术系统,状态系统,天赋系统,包裹系统,P2P交易系统,修理系统,附魔系统等等。
游戏功能由策划进行设计,然后交给美术和程序执行。
2.什么是审核

审核是一个功能设计的过滤器,这种过滤针对设计的可执行性,而非功能本身。
3.为什么要审核
策划们不明白每个功能的执行优先级。程度:有时候。危害:功能做出来了,但是暂时成为了摆设。
策划们的设计文档是不够详细,不够完整,甚至有些细节还没有想清楚或者在自己的部门内达成一直认识的。程度:经常。危害:这种设计就是反复被变更和修改的那种设计,程序也会因此越改越烂,并且功能要拖拖拉拉好几个里程碑。
国内的公司都不怎么大,公司的法人会出来用独裁手段让大家执行某个功能。程度:偶尔。危害:说不准。
程序是食物链上的最后一环,如果前面没有把好关,那么后面就要拉肚子生病。
审核能过滤掉目标和受众不明确的功能。
审核能过滤掉设计不完整的功能。
审核能判断出功能的执行优先级。
4.审核的基本原则
因为我是一个程序,我也信任自己的策划同事,所以最基本的原则是,不对功能在设计上做任何评论和质疑。
审核只关心功能的目标,设计的信息完整性,和由此引申出来的可执行性。
审核没有通过并不会一棒子打死功能和设计,只要功能和设计能通过审核,就能被执行。
5.怎样审核
   5.1规则集合
规则集合是一组标准,只有一个功能的设计完全通过这组标准的时候,才能加入执行队列。
这组规则不是一个人建立的,而是所有有责任心的同事提出的意见中提炼出来了。
我先大概提出这么一些:
*功能必须为玩家的一个以上的生命期提供主要服务(新手期,兴奋期,参与沉迷期)
*功能必须针对一种类型以上的玩家(探索型,成就型,杀手型,社交型)
*功能支持零个以上的其他功能。
*功能依赖的其他功能必须已经实现。
*功能设计可以通过程序正常表现。
*功能设计中必须提供详细的美术需求。
*功能设计中的基本面必须完整。
*功能设计中必须拟定需要用到的数据表格。
   5.2审核小组
审核小组从同事中找5个人左右,各个部门都必须占有1个以上的席位。每个组员仅负责其中的几条规则,各个组员所负责的规则之间不能有交集。
每个组员用自己负责的规则对功能和设计做出通过和不通过的判断,并对不通过的的判断给出具体理由。
每个不通过的判断都必须得到组内3人以上(含3人)的认可。
   5.3审核过程
策划完成功能设计之后,必须提供一份针对审核规则的设计说明文档,以便于审核小组能迅速的判断出功能的设计是否能执行。
审核小组全员通过功能设计后,通过审核规则中的算法规则(我没有提供,因为这要考虑很多方面)计算功能的执行优先级,加入功能队列,由PM进行工作分配。
没能通过的功能设计,将包含一份详细的犯规细节清单还给策划。然后策划进行工作避开这些犯规后,可以再次提交审核。

  最近互联网真是硝烟四起啊!趁着360与腾讯斗得你死我活的时候,卡巴斯基借机推出了“全民脱险”活动,免费向所有人赠送卡巴斯基安全部队2011正版一年激活码。鹬蚌相争,渔翁得利,估计卡巴是想将360流失的用户收拢了吧。不管怎样,对用户来说,能免费使用原本售价近200多元的杀毒软件,还是好事一件!

狗咬狗,害了用户,但两个软件都有方便之处,所以共享的方法如下:
XP系统,在C:\Documents and Settings\你的用户名\Application Data\Tencent\QQ下,把SafeBase这个文件夹的权限设置为完全拒绝。
Vista\WIN7系统,在C:\Users\你的用户名\AppData\Roaming\Tencent\QQ下,把SafeBase这个文件夹的权限设置为完全拒绝。
TM版的,只是把文件夹QQ改为TM下的文件夹SafeBase权限为禁止。
这个safebase文件夹中显示的所有用户组,全部设为拒绝即可。
xp中,如果文件的选项卡中没安全选项,则,打开我的电脑,工具栏,文件夹选项,查看,在查看中把“使用简单文件共享(推荐)”勾去掉,就可以看到文件夹属性的“安全”选项卡。
-------------
此方法已测试。可行。
-------------
运行了五个小时之后的截图。二者均更新到最新版。
Open in new window
新增一张图:刚才刚则截的。
Open in new window

据国外媒体报道,来自国外媒体Neowin网站的消息称,目前,微软已经官方对外发布Windows 7 SP1的RC版本,版本号为windows6.1-KB976932。近段时间,Windows 7 SP1 RC版本的builds不断被泄露到网络中,可能就是由于这个原因微软才不得已提前对外Windows 7 SP1 RC版。

微软今天宣布了 Windows Live Essentials Wave 4 的 Beta Refresh 版,也就是上次预告的 Beta 2。感谢 Damaster,新版 Essentials 安装包已经可以在下面的地址下载。

Windows Live Essentials Wave 4 Beta 2 更新包括:新增 Facebook Chat 的支持、Windows Live 照片库、Writer 和影音制作的一些改进和增强。我会在新文章中介绍,先下载安装吧。

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
#include <windows.h>
#include <tchar.h>
#include <stdio.h>

//
// Thread pool wait callback function template
//
VOID
    CALLBACK
    MyWaitCallback(
    PTP_CALLBACK_INSTANCE Instance,
    PVOID                 Parameter,
    PTP_WAIT              Wait,
    TP_WAIT_RESULT        WaitResult
)
{
    //
    // Do something when the wait is over.
    //
    _tprintf(_T("MyWaitCallback: wait is over.\n"));
}

//
// Thread pool timer callback function template
//
VOID
    CALLBACK
    MyTimerCallback(
    PTP_CALLBACK_INSTANCE Instance,
    PVOID                 Parameter,
    PTP_TIMER             Timer
    )
{
    //
    // Do something when the timer fires.
    //
    _tprintf(_T("MyTimerCallback: timer has fired.\n"));
}

//
// This is the thread pool work callback function.
// The callback demonstrates correct behavior when changing the
// state of the thread inside the callback function.
//
// Any changes to the thread state must be restored to original
// before exiting the callback routine.
//
VOID
    CALLBACK
    MyWorkCallback(
    PTP_CALLBACK_INSTANCE Instance,
    PVOID                 Parameter,
    PTP_WORK              Work
    )
{
    BOOL bRet = FALSE;
    DWORD dwPriorityOriginal = 0;
    //
    // Record the original thread priority.
    //
    dwPriorityOriginal = GetThreadPriority(GetCurrentThread());
    if (THREAD_PRIORITY_ERROR_RETURN == dwPriorityOriginal) {
        _tprintf(_T("GetThreadPriority failed.  LastError: %u\n"),
            GetLastError());
        return;
    }
    //
    // Increase the priority of the thread pool thread.
    //
    bRet = SetThreadPriority(GetCurrentThread(),
        THREAD_PRIORITY_ABOVE_NORMAL);
    if (FALSE == bRet) {
        _tprintf(_T("SetThreadPriority failed.  LastError: %u\n"),
            GetLastError());
        return;
    }
    _tprintf(_T("MyWorkCallback: thread priority increased.\n"));

    //
    // Perform tasks at increased priority.
    //
    {
        _tprintf(_T("MyWorkCallback: task performed at increased priority.\n"));
    }
    //
    // Restore thread state by resetting the original priority.
    //
    bRet = SetThreadPriority(GetCurrentThread(),
        dwPriorityOriginal);
    //
    // If restore fails, maybe retry or throw an exception.  Otherwise,
    // the thread will continue to execute other work items at increased
    // priority.
    //
    if (FALSE == bRet) {
        _tprintf(_T("Fatal Error! SetThreadPriority failed. LastError: %u\n"),
            GetLastError());
        return;
    }
    _tprintf(_T("MyWorkCallback: thread priority restored.\n"));
    return;
}
VOID
    DemoCleanupPersistentWorkTimer()
{
    BOOL bRet = FALSE;
    PTP_WORK work = NULL;
    PTP_TIMER timer = NULL;
    PTP_POOL pool = NULL;
    PTP_WORK_CALLBACK workcallback = MyWorkCallback;
    PTP_TIMER_CALLBACK timercallback = MyTimerCallback;
    TP_CALLBACK_ENVIRON CallBackEnviron;
    PTP_CLEANUP_GROUP cleanupgroup = NULL;
    FILETIME FileDueTime;
    ULARGE_INTEGER ulDueTime;
    UINT rollback = 0;
    InitializeThreadpoolEnvironment(&amp;CallBackEnviron);
    //
    // Create a custom, dedicated thread pool.
    //
    pool = CreateThreadpool(NULL);
    if (NULL == pool) {
        _tprintf(_T("CreateThreadpool failed. LastError: %u\n"),
            GetLastError());
        goto main_cleanup;
    }
    rollback = 1; // pool creation succeeded
    //
    // The thread pool is made persistent simply by setting
    // both the minimum and maximum threads to 1.
    //
    SetThreadpoolThreadMaximum(pool, 1);
    bRet = SetThreadpoolThreadMinimum(pool, 1);
    if (FALSE == bRet) {
        _tprintf(_T("SetThreadpoolThreadMinimum failed. LastError: %u\n"),
            GetLastError());
        goto main_cleanup;
    }
    //
    // Create a cleanup group for this thread pool.
    //
    cleanupgroup = CreateThreadpoolCleanupGroup();
    if (NULL == cleanupgroup) {
        _tprintf(_T("CreateThreadpoolCleanupGroup failed. LastError: %u\n"),
            GetLastError());
        goto main_cleanup;
    }
    rollback = 2;  // Cleanup group creation succeeded
    //
    // Associate the callback environment with our thread pool.
    //
    SetThreadpoolCallbackPool(&amp;CallBackEnviron, pool);
    //
    // Associate the cleanup group with our thread pool.
    // Objects created with the same callback environment
    // as the cleanup group become members of the cleanup group.
    //
    SetThreadpoolCallbackCleanupGroup(&amp;CallBackEnviron,
        cleanupgroup,
        NULL);
    //
    // Create work with the callback environment.
    //
    work = CreateThreadpoolWork(workcallback,
        NULL,
        &amp;CallBackEnviron);
    if (NULL == work) {
        _tprintf(_T("CreateThreadpoolWork failed. LastError: %u\n"),
            GetLastError());
        goto main_cleanup;
    }
    rollback = 3;  // Creation of work succeeded
    //
    // Submit the work to the pool. Because this was a pre-allocated
    // work item (using CreateThreadpoolWork), it is guaranteed to execute.
    //
    SubmitThreadpoolWork(work);

    //
    // Create a timer with the same callback environment.
    //
    timer = CreateThreadpoolTimer(timercallback,
        NULL,
        &amp;CallBackEnviron);

    if (NULL == timer) {
        _tprintf(_T("CreateThreadpoolTimer failed. LastError: %u\n"),
            GetLastError());
        goto main_cleanup;
    }
    rollback = 4;  // Timer creation succeeded
    //
    // Set the timer to fire in one second.
    //
    ulDueTime.QuadPart = (LONGLONG) -(1 * 10 * 1000 * 1000);
    FileDueTime.dwHighDateTime = ulDueTime.HighPart;
    FileDueTime.dwLowDateTime  = ulDueTime.LowPart;
    SetThreadpoolTimer(timer,
        &amp;FileDueTime,
        0,
        0);
    //
    // Delay for the timer to be fired
    //
    Sleep(1500);
    //
    // Wait for all callbacks to finish.
    // CloseThreadpoolCleanupGroupMembers also releases objects
    // that are members of the cleanup group, so it is not necessary
    // to call close functions on individual objects
    // after calling CloseThreadpoolCleanupGroupMembers.
    //
    CloseThreadpoolCleanupGroupMembers(cleanupgroup,
        FALSE,
        NULL);
    //
    // Already cleaned up the work item with the
    // CloseThreadpoolCleanupGroupMembers, so set rollback to 2.
    //
    rollback = 2;
    goto main_cleanup;
main_cleanup:
    //
    // Clean up any individual pieces manually
    // Notice the fall-through structure of the switch.
    // Clean up in reverse order.
    //
    switch (rollback) {
    case 4:
    case 3:
        // Clean up the cleanup group members.
        CloseThreadpoolCleanupGroupMembers(cleanupgroup,
            FALSE, NULL);
    case 2:
        // Clean up the cleanup group.
        CloseThreadpoolCleanupGroup(cleanupgroup);
    case 1:
        // Clean up the pool.
        CloseThreadpool(pool);
    default:
        break;
    }
    return;
}
VOID
    DemoNewRegisterWait()
{
    PTP_WAIT Wait = NULL;
    PTP_WAIT_CALLBACK waitcallback = MyWaitCallback;
    HANDLE hEvent = NULL;
    UINT i = 0;
    UINT rollback = 0;
    //
    // Create an auto-reset event.
    //
    hEvent = CreateEvent(NULL, FALSE, FALSE, NULL);
    if (NULL == hEvent) {
        // Error Handling
        return;
    }
    rollback = 1; // CreateEvent succeeded
    Wait = CreateThreadpoolWait(waitcallback,
        NULL,
        NULL);
    if(NULL == Wait) {
        _tprintf(_T("CreateThreadpoolWait failed. LastError: %u\n"),
            GetLastError());
        goto new_wait_cleanup;
    }
    rollback = 2; // CreateThreadpoolWait succeeded
    //
    // Need to re-register the event with the wait object
    // each time before signaling the event to trigger the wait callback.
    //
    for (i = 0; i < 5; i ++) {
        SetThreadpoolWait(Wait,
            hEvent,
            NULL);
        SetEvent(hEvent);
        //
        // Delay for the waiter thread to act if necessary.
        //
        Sleep(500);
        //
        // Block here until the callback function is done executing.
        //
        WaitForThreadpoolWaitCallbacks(Wait, FALSE);
    }
new_wait_cleanup:
    switch (rollback) {
    case 2:
        // Unregister the wait by setting the event to NULL.
        SetThreadpoolWait(Wait, NULL, NULL);
        // Close the wait.
        CloseThreadpoolWait(Wait);
    case 1:
        // Close the event.
        CloseHandle(hEvent);
    default:
        break;
    }
    return;
}
int _tmain(int argc, _TCHAR* argv[])
{
    DemoNewRegisterWait();
    DemoCleanupPersistentWorkTimer();
    return 0;
}

最后觉得项目中的控制台不大好用,就添加了一些小功能,比如清屏;当然最简单的方法是调用系统自带的函数system(“cls”);,这里提供一个方法一样可以清屏(测试要比cls快一些):

下载地址:http://explore.live.com/windows-live-essentials-beta

默认是完全安装版,可以在右边选择可定制版

image

可定制版中文版:http://g.live.com/1rebeta4_webc/zh-cn/wlsetup-webc.exe

Windows Live Essentials Wave 4 Beta 组件包括:照片库、Mail、影音制作、Messenger、Writer、家庭安全设置、Bing 工具栏、Messenger Companion、Sync,以及 Silverlight 和 Office Outlook Connector

预编译头文件的最大好处在于如果只改动一小处代码,不用把相关有依赖的代码全部编译一次,这样可以很大的节约编译时间。

对于没有添加预编译头文件的项目,在添加时有个认识误区,就是认识只要在工程里设置使用预编译头文件就可以了,最近在项目里设置发现有问题,比如找不到导出符号,或符号重定义之类错误。