โดยปกติแล้ว เล่น HL2 ต้นฉบับได้ลื่นมาก CS:Source ก็ OK ครับ แต่ว่า พอมาเจอกับ TF2 หรือ แม้แต่ Portal กลับช้าเต่า ?? ซึ่งเกมอย่าง Portal นั้นทำให้เศร้ามาก ภาพแค่นี้ก็กระตุก มันอะไรกันเนี่ย

ในการทดสอบนี้ผมใช้ Notebook Asus M9j ที่

CPU : Core Duo T2400 , 1.83 Ghz

RAM : 2 . 5 GB ครับ (เยอะสุดๆ)

VGA : geforce 7300 GT (ตัวนี้ Clock 350 แต่ผม OC เป็น 400 ครับ มี 4ท่อ)

    ลองหาข้อมูลดูแล้วครับ โชคดีจริง ๆ ที่ Source Engine ไม่ธรรมดามั่ก ๆ Option ปรับแต่งเยอะมาก ลองมาดูตัวที่น่าจะปรับกันดีกว่าครับ

 

โดยจะมีที่ปรับ 2 ที่ ได้แก่

1. ปรับตอน Launch เกม

2. ปรับในเกม ด้วย Console

1.ปรับตอน Launch : ถ้าใช้แผ่นแท้ก็ เปิด Steam ขึ้นมา แล้ว เพิ่มลงใน Launch Option ตรงนี้นะครับ

พิมพ์ Launch Option ลงในนี้นะครับ

แผ่นก้อปก็แก้ตรง Short cut ในช่อง Target ครับ

คำสั่งใน Launch Option

-dxlevel คำสั่งที่มีผลต่อประสิทธิภาพมาก ๆ มากที่สุด เลยก็คือ -dxlevel ครับ เป็นการกำหนดว่า จะให้เกมใช้พลังฮาร์ดแวร์ขนาดไหน ถึงแม้การ์ดของเราจะสนับสนุน DX 9.0 แต่ไม่ได้แปลว่ามันจะดีพอที่จะเล่นได้โดยไม่กระตุกครับ เพราะเกมใหม่ ๆ จะใช้ Shader จำนวนมาก ซึ่งการ์ดรุ่นเล็กมักจะมี Shader ไม่พอแรงครับ

-dxlevel 80

การใช้คำสั่งให้เกมทำงานด้วย DX 8.0 จะช่วยเพิ่มประสิทธิภาพมาก มากอย่างไม่น่าเชื่อจริง ๆ (ผมงงโคตร ๆ เลยครับ) เฟรมเรตจาก 15 เป็น 40 กว่าเลยครับ ทั้ง TF2 และ Portal ทั้งนี้ขึ้นอยู่กับการ์ดจอครับ (ถ้าแรงอยู่แล้วก็ไม่รู้จะปรับลงทำไมน้อ) คุณภาพของภาพที่ได้นั้น ยอมรับได้ครับ โดยเฉพาะเกมที่ต้องใช้ Framerate เข้าแลกอย่าง TF2

 

-width -height พอปรับ dxlevel แล้ว เกมจะเริ่มที่ความละเอียด 800*600 โดยไม่จำค่าเก่าไว้เลย ทำให้เราหมดอารมณ์ได้ง่าย ๆ เพื่อไม่ให้เสียอารมณ์ เราควรเพิ่ม resolution ลงใน Launch Option แบบนี้ครับ (อันนี้คือ 1024 x 768 , ส่วนตัวแล้วชอบปรับตามจอครับ)

-width 1024 -height 768

 

-heapsize กำหนดขนาดหน่วยความจำของเกม ตัวนี้ยังไม่ค่อยเข้าใจและไม่ค่อยเห็นผลครับ แต่รู้สึกว่าโหลดเร็วขึ้นนิดหน่อยในเกม Portal

โดย Default จะเป็น 262144 ครับหน่วย KB หากเครื่องของเรามีแรมเยอะ การปรับ Heap เพิ่ม อาจจะช่วยให้ประสิทธิภาพดีขึ้นได้ โดยหลักการแล้ว ไม่ควรปรับจนหมดเครื่องนะครับ ตัวอย่างนะครับ สมมุติว่ามีแรม 1.5 กิ้ก, วินโดวส์โหลด 512MB, เกมอีก 512MB ..ขนาด Heap 512MB น่าจะเหมาะครับ โดยประมาณนะ

-heapsize 524288

อื่น ๆ ใน Launch Option นะครับ

-console อนุญาติให้ใช้ command console ของเกมได้ จำเป็นสำหรับ step 2 ครับ

-novid ไ่ม่แสดง video เริ่มต้น แก้เซ็งได้ดีครับ

-

 

2.ปรับตอน Console

*ต้องมี Option -console อยู่ในตอน Launch นะครับ ถ้าทำุถูกต้อง เวลาเริ่มเกมมาจะเป็นแบบนี้

ที่ผมชอบใช้ก็ ~

-cl_showfps 2 แสดงค่า Framerate ตรงมุมบนครับ

-mat_softwarelighting 0 ถ้าปรับ dxlevel 80 ก็ไม่ต้องปรับแล้ว เป็นคำสั่งที่บังคับใช้ Lightmap โดย Software ครับ เหมาะกับการ์ดที่ไม่ค่อยแรง ได้เฟรมเรตมาประมาณ 3 เฟรม

-mat_monitorgamma 1.6 ปรับค่า Gamma ครับ แทนเลข 1.6(สว่างสุด) ถึง 2.5(มืดสุด) อันนี้ทำใน เมนูก็ได้

คำสั่ง: มีล้านแปดจริงๆ ผมยังลองไม่หมดเลยครับ

http://www.hl2world.com/wiki/index.php/Half_Life_2_Client_Console_Commands

http://www.tweakguides.com/HL2_7.html

edit @ 10 Mar 2008 12:31:03 by wizard_est

edit @ 10 Mar 2008 12:32:18 by wizard_est

การติดตั้ง Source SDK

posted on 19 Feb 2008 22:21 by wizardlab
With VALVe's recent release of Orange Box good ole' Source SDK no longer works. This is because Source SDK is used to develope games that use the older version of the Source Engine (e.g. CS: Source, HL2). But wait! Source SDK is also used to develope games that use the newer version of the Source Engine (i.e. HL2: Episode 1+2, Team Fortress 2). So in the process of releasing Orange Box, the geniuses at VALVe broke Source SDK for everybody who doesn't have Orange Box or a game with the newer version of the Source Engine.

So in this post I'm going to to tell you how to fix this problem!

First right click the Source SDK icon, select properties. There should be something called "Target". It shold have something that looks like this there: "C: \Program Files\Valve\Steam\Steam.exe" -applaunch 211. So on the very end of this you need to add -engine ep1. This will let Source SDK let you use the newer version of the Source Engine to develope you map or mod or w.e. you are doing with Source SDK. After adding it, the Target should look more like this: "C: \Program Files\Valve\Steam\Steam.exe" -applaunch 211 -engine ep1. Hope this has helped everybody.

P.S. If you don't want an icon on your desktop open up Steam and go to your tools tab. Right click Source SDK and choose properties. Then click "Set Launch Options" and add -engine ep1 and you should have just fixed your problem like you would have with the icon tutorial. Thanks for reading please suggest some ideas. Thanks-

edit @ 19 Feb 2008 22:21:53 by wizard_est

Decision Making Overview (Source Engine)

posted on 18 Feb 2008 16:57 by wizardlab

Decision Making Overview

From Valve Developer Community

แปลมาจาก Source SDK นะ  เป็นมุมมองในการคิดของ AI

การคิดของตัวละครในเกม อาศัยสิ่งต่อไปนี้้

  • ประสาทสัมผัส(Perform Sensing) NPC จะสามารถมองเห็น, ได้ยิน หรือรับรู้อะไรที่อยู่ในขอบเขตที่ตัวเองรู้ได้ สิ่งที่ไม่รู้ก็จะไม่เก็บมาคิด
  • รายการของเงื่อนไข(Generate a list of Conditions) สิ่งที่ NPC จะนำมาใช้ในการตัดสินใจ ก็คือ เงื่อนไขของการรับรู้ต่อสถานะการณ์ อย่างเช่น "I can see an enemy", "I have taken some damage" ,"My Weapon's clip is empty"
  • เปลี่ยนสถานะ(Choose an appropriate State) ผลการประเมินสถานะการณ์ตามเงื่อนไข จะเปลี่ยนสถานะของ NPC เช่น เมื่อเห็นศัตรูให้เปลี่ยนเป็น Combat State, เมื่อศัตรูในสายตาตายหมดแล้วก็เป็น Alert State, เมื่อ HP เหลือ 0 ก็เป็น Dead State
  • เลือก Schedule ใหม่ตามความเหมาะสม (Select a new Schedule if appropriate)

    • The Schedule is the overall action being taken by the NPC, which is then broken down into sub parts for the NPC to actually perform. Schedules are chosen based upon the NPCs current State, and the list of Conditions. Examples of schedules are: "I'm taking cover to reload my gun", "I'm chasing after my enemy", "I'm moving to a position where I have line-of-sight to my enemy".
    • NPCs will choose a new schedule for one of two reasons:
      • They finish performing the last part of the current schedule.
      • They generate a condition that their current schedule has specified as an Interrupt.
    • If neither of these are true, the NPC will continue running its current schedule.
  • Perform the current Task
    • The Task is the sub part of a Schedule that describes a discrete action within the schedule. The tasks must be performed, one by one, for the schedule to be completed. For example, the "I'm taking cover to reload my gun" schedule would be broken down into the following tasks: "Find a position to take cover at", "Generate a path to that position", "Run the path", and then "Reload my gun".
    • Many tasks take some time to perform (like the "Run the path" task in the above example), so the NPC will keep performing that task each time it thinks until the task is completed. Then, it'll move onto then next task in the current schedule, or pick a new schedule if there are no tasks left.