joxin

诚信、业绩、创新
posts - 18, comments - 17, trackbacks - 0, articles - 0

2006年2月5日

今天看了《深入Managed DirectX9》第一部分,发现几个问题。
1)
Verts[0].SetPosition()没有这个方法;
2)应该在private void Render()中写代码而不是OnPaint;
接着看了第二部分。
那个真的是三角形而不是立体的锥体。

posted @ 2006-02-05 17:26 昕 阅读(342) | 评论 (3)编辑

2006年1月26日

《金刚》挺好看的,总的来说是个黑色幽默的悲剧。
当我看见金刚落下的那一刻,眼泪再也无法止住了,我仿佛又看见了威廉~华莱士,那个曾经让我钦佩的英雄。
当然,从人道上说,金刚嗜杀,没有人性,唯一共鸣的是那份感情。

posted @ 2006-01-26 14:19 昕 阅读(61) | 评论 (1)编辑

2005年11月22日

我的E文够烂,只能打开词霸2005,凭感觉,成功编译了ClanLib。目前放出的稳定版本是ClanLib 0.8.0。
1)网址:http://www.clanlib.org/
2)授权:(不敢乱翻译)只知道大意是允许任何使用方式,并且可以修改。没有对成果的释放有要求。
但是要注意相关引用lib的授权。
ClanLib SDK
Copyright (c) 1997-2005 The ClanLib Team

This software is provided 'as-is', without any express or implied
warranty.  In no event will the authors be held liable for any damages
arising from the use of this software.

Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:

1. The origin of this software must not be misrepresented; you must not
   claim that you wrote the original software. If you use this software
   in a product, an acknowledgment in the product documentation would be
   appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
   misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.

Note: Some of the libraries ClanLib may link to may have additional
requirements or restrictions.
相关lib的授权:包含SDL(LGPL)、libmikmod(LGPL)、libogg(OSI)、libvorbis(BSD)、zlib(自主开放)、libjpeg、libpng。目前看都是没有版权争议的开放软件。
3)首先下载的是ClanLib-0.8.0-RC1.zip,解压缩后,我用的是vc.net,打开ClanLib-0.8.0-RC1目录下的configure.dsw,
转换后编译。这个过程中没有遇到什么问题。
4)配置,编译成功后,ClanLib-0.8.0-RC1目录下有个configure.exe,运行按提示指定输入输出路径
5)下载相关lib,
libogg、libvorbis----http://xiph.org/downloads/
SDL---------------- http://www.libsdl.org/
zlib------------------http://www.zlib.net/
libmikmod ----------http://mikmod.raphnet.net/
libpng、libjpeg -------------- http://www.clanlib.org/download/binaries-win32-vc70/
除了libpng、libjpeg是通过ClanLib网站下载的,其他的都是我找的新的。
下载后全部解压。分别拷贝到上面说的“指定输入路径”里。
我这里是最后打包的inputLib目录http://www.cnblogs.com/Files/joxin/inputLib.rar
注意
libmikmod中的win32目录下的mikmod_build.h需要改名为mikmod.h;
jmorecfg.h中#ifndef HAVE_BOOLEAN这个段落的预定义需要注释掉。
我就是这里出了问题,察看资料后知道是为了兼容C。(好像是,一知半解的地方还请各位前辈指正)
6)打开ClanLib-0.8.0-RC1目录下的ClanLib.dsw,编译即可。
编译后的文件都放在上面说的“指定输出路径”里。
关于ClanLib的使用,我还会连续出随笔,希望感兴趣的朋友一起研究。

posted @ 2005-11-22 09:44 昕 阅读(681) | 评论 (1)编辑

ClanLib是我早就注意的游戏开发引擎。网址:http://www.clanlib.org/
在经过了对TV3D和Realm Forge GDK的研究后,觉得根据我的实际情况,研究3D引擎不实际。
还是转向2D引擎较好,并且能够快速做出游戏,需要的是游戏开发架构而不仅仅是引擎。
下面是我转贴的ClanLib类库。可以看见比较全面,算是一个可以真正拿来做游戏的架构。

App
System
CL_ClanApplication

Core
I/O Data
CL_Directory
CL_DirectoryScanner
CL_Endian
CL_InputSource
CL_InputSourceProvider
CL_InputSourceProvider_File
CL_InputSource_File
CL_InputSource_Memory
CL_InputSource_Zipped
CL_OutputSource
CL_OutputSourceProvider
CL_OutputSource_File
CL_OutputSource_Memory
CL_OutputSource_Zipped
CL_Zip_Archive
CL_Zip_FileEntry

Library
CL_LibraryFactory
CL_LibraryLoader
CL_LibraryManager

Math
CL_DelauneyTriangulator
CL_DelauneyTriangulator_Triangle
CL_DelauneyTriangulator_Vertex
CL_LineMath
CL_Matrix4x4
CL_NumberPool
CL_OutlineTriangulator
CL_Point
CL_Pointf
CL_Quad
CL_Rect
CL_Rectf
CL_Size
CL_Sizef
CL_TriangleMath
CL_Vector
CL_Vector2

Resources
CL_Boolean
CL_Float
CL_InputSource_Raw
CL_Integer
CL_Raw
CL_Resource
CL_ResourceData
CL_ResourceData_Boolean
CL_ResourceData_Float
CL_ResourceData_Integer
CL_ResourceData_Raw
CL_ResourceData_String
CL_ResourceManager

System
CL_Assert
CL_CallStack
CL_Clonable
CL_CommandLine
CL_ConsoleWindow
CL_CrashReporter
CL_Error
CL_EventListener
CL_EventTrigger
CL_KeepAlive
CL_Log
CL_Mutex
CL_MutexSection
CL_Runnable
CL_SetupCore
CL_String
CL_System
CL_Thread
CL_Timer

XML
CL_DomAttr
CL_DomCDATASection
CL_DomCharacterData
CL_DomComment
CL_DomDocument
CL_DomDocumentFragment
CL_DomDocumentType
CL_DomElement
CL_DomEntity
CL_DomEntityReference
CL_DomException
CL_DomImplementation
CL_DomNamedNodeMap
CL_DomNode
CL_DomNodeList
CL_DomNotation
CL_DomProcessingInstruction
CL_DomText
CL_XMLToken
CL_XMLTokenLoad
CL_XMLTokenSave
CL_XMLTokenString
CL_XMLTokenizer

CL_XMLWriter

Display
Collision
CL_CollisionOutline
CL_Contour
CL_OutlineCircle
CL_OutlineProvider
CL_OutlineProviderBitmap
CL_OutlineProviderFile

Display 2D
CL_Canvas
CL_Color
CL_Colorf
CL_Display
CL_DisplayMode
CL_DisplayWindow
CL_DisplayWindowDescription
CL_FramerateCounter
CL_Gradient
CL_GraphicContext
CL_Palette
CL_PixelBuffer
CL_PixelFormat
CL_RLESurface
CL_Surface
CL_Surface_DrawParams1
CL_Surface_DrawParams2

Fonts
CL_Font
CL_GlyphBuffer
CL_TextStyler

Input
CL_InputBuffer
CL_InputButton
CL_InputContext
CL_InputDevice
CL_InputEvent
CL_Joystick
CL_KeyBinding
CL_Keyboard
CL_Mouse

Sprites
CL_Sprite
CL_SpriteDescription
CL_SpritePacker

Surface Providers
CL_DeviceContextBuffer
CL_JPEGProvider
CL_PCXProvider
CL_PNGProvider
CL_ProviderFactory
CL_ProviderType
CL_TargaProvider

System
CL_SetupDisplay

GL
Display 2D
CL_OpenGLSurface
CL_OpenGLWindow
CL_OpenGLWindowDescription

Display 3D
CL_LightSource
CL_Material
CL_ProgramAttribute
CL_ProgramObject
CL_ProgramUniform
CL_ShaderObject
CL_Texture
CL_TextureUnit
CL_Viewpoint

System
CL_GLFunctions
CL_OpenGL
CL_OpenGLState
CL_OpenGLStateData
CL_SetupGL

GUI
Controls
CL_Button
CL_CheckBox
CL_FileDialog
CL_Frame
CL_Image
CL_InputBox
CL_InputDialog
CL_Label
CL_ListBox
CL_Menu
CL_MenuItem
CL_MenuNode
CL_MessageBox
CL_ProgressBar
CL_RadioButton
CL_RadioGroup
CL_ScrollBar
CL_TreeItem

CL_TreeNode
CL_TreeView
CL_Window

Framework
CL_Component
CL_ComponentManager
CL_ComponentMoveHandler
CL_ComponentResizeHandler
CL_ComponentStyle
CL_ComponentType
CL_Deck
CL_GUIManager
CL_Layout
CL_ListItem
CL_StyleManager

Style: Silver
CL_Button_Silver
CL_CheckBox_Silver
CL_Frame_Silver
CL_Image_Silver
CL_InputBox_Silver
CL_Label_Silver
CL_ListBox_Silver
CL_MenuItem_Silver
CL_MenuNode_Silver
CL_Menu_Silver
CL_ProgressBar_Silver
CL_RadioButton_Silver
CL_ScrollBar_Silver
CL_StyleManager_Silver
CL_TreeItem_Silver
CL_TreeView_Silver
CL_Window_Silver

System
CL_SetupGUI

MikMod
Sound Providers
CL_SoundProvider_MikMod

System
CL_SetupMikMod

Network
Internet Relay Chat
CL_DCCDownload
CL_IRCConnection

NetObjects
CL_NetObject_Client
CL_NetObject_Controller
CL_NetObject_Server
CL_NetVariables

NetSessions
CL_InputSource_NetPacket
CL_InputSource_NetStream
CL_NetComputer
CL_NetGroup
CL_NetPacket
CL_NetSession
CL_NetStream
CL_OutputSource_NetPacket
CL_OutputSource_NetStream

Sockets
CL_IPAddress
CL_InputSource_Socket
CL_OutputSource_Socket
CL_Socket

System
CL_SetupNetwork

SDL
System
CL_SetupSDL

Signal
System
CL_FunctionSlot_v0
CL_Signal
CL_Signal_v0
CL_Signal_v0_Generic
CL_Slot
CL_SlotBuffer_v0
CL_SlotContainer
CL_SlotParent_v0
CL_Slot_Generic
CL_Slot_v0

Sound
Audio Mixing
CL_Sound
CL_SoundBuffer
CL_SoundBuffer_Session
CL_SoundFilter
CL_SoundOutput
CL_SoundOutput_Description
CL_SoundProvider
CL_SoundProvider_Session

CD Audio
CL_CDDrive

Filters
CL_EchoFilter
CL_FadeFilter
CL_InverseEchoFilter

Sound Providers
CL_SoundProviderFactory
CL_SoundProviderType
CL_SoundProvider_Raw
CL_SoundProvider_Recorder
CL_SoundProvider_Wave

System
CL_SetupSound

Vorbis
Sound Providers
CL_SoundProvider_Vorbis

System
CL_Setu

posted @ 2005-11-22 09:27 昕 阅读(577) | 评论 (0)编辑

TV3D是个不错的图形引擎,我也觉得很好用,但是用它来做游戏,缺得东西太多了。唯一让我有点割舍不下的是它支持C#。也许以后还会用的到吧。

posted @ 2005-11-22 09:18 昕 阅读(894) | 评论 (7)编辑

2005年2月23日

注意计划工作的优先级,以下是我的分级标准:
1.为项目成员提供服务。
这些服务包括:指导和教育,处理冲突,提供资源,设立项目目标和优先级等等,适当时也要提供技术指导。
2.让你所在组织的客户满意。
让客户满意。为你的项目成员创造一个环境,使得他们在这个环境下工作,可以最有效的满足客户的需求。
3.是你自己的事情。可能是一个与项目有关的技术问题(当然也是你感兴趣的),也可能是你的老板要你做的某件事。
目前主要负责一个系统的开发,同时还是2个系统的跟进人,如果这2个系统出了问题,还要解决。
时间很容易被零碎化,如果要提高效率,尤为重要的就是工作的优先级。

posted @ 2005-02-23 16:24 昕 阅读(393) | 评论 (0)编辑

2004年12月14日

第一页面用Server.Transfer跳转至第二页面。
第二页面中核心代码如下:
if(!Page.IsPostBack)
   {    
    Webtest1 _webtest1;
    _webtest1 = (Webtest1) Context.Handler;
    if(_webtest1!=null)
    {
     ViewState["TNum"] = System.Convert.ToInt32(((TextBox)_webtest1.FindControl("TextBox1")).Text.Trim());     
    }
   }
   table1.Controls.Clear();
   if(System.Convert.ToInt32(ViewState["TNum"].ToString())>0)
   {
    for(int i=0;i<System.Convert.ToInt32(ViewState["TNum"].ToString());i++)
    {
     HtmlTableRow tr = new HtmlTableRow();
     HtmlTableCell cell = new HtmlTableCell();
     TextBox newbox = new TextBox();
     newbox.Text = "第"+i.ToString()+"个";
     newbox.Width = 180;
     newbox.ID = "DynTextBox"+i.ToString();
     newbox.Attributes.Add("name", newbox.ID);
     //ViewState[newbox.ID] = newbox;
     cell.Controls.Add(newbox);
     tr.Controls.Add(cell);
     table1.Controls.Add(tr);
    }
   }
//获取动态生成控件中的内容。
   string res ="";
   for (int i=0;i<System.Convert.ToInt32(ViewState["TNum"].ToString());i++)
   {
    //res = this.Controls[i].ID;
    //Control myControl1 = FindControl("DynTextBox"+i.ToString());
    TextBox txt0 = (TextBox)this.FindControl("DynTextBox"+i.ToString());
    res+= txt0.Text;    
   }
   Response.Write(res); 

posted @ 2004-12-14 15:56 昕 阅读(1479) | 评论 (0)编辑

在综合了OGRE、RealmForgeGDK、Truevision3D、HGE、irrlicht等游戏引擎后,决定使用TV3D。
1)可以使用c#。
2)既支持3D也支持2D。
3)无限制商业版才500美元。
4)使用的人群广泛、有成功的案例。
5)不是单纯的图形渲染引擎,支撑游戏开发的其他很多方面。
6)技术支持充分。

posted @ 2004-12-14 10:21 昕 阅读(1063) | 评论 (0)编辑

2004年12月13日

1)接手他人项目工作时需要注意:
业务实现文档、数据库设计文档。
功能实现必须细致到代码级。
2)项目的前期准备工作:
所有业务逻辑的设计说明要详细。
3)系统设计在页面级要尽量分散。(复杂的系统需求过于集中,将会导致修改困难)

posted @ 2004-12-13 09:41 昕 阅读(390) | 评论 (1)编辑

2004年11月22日

假定用户控件(UserControl.ascx)中包含按钮控件AButton,希望实现按AButton按钮时,包含该用户控件的页面可以接收到事件。为此,在用户控件和页面的代码中分别作了处理。
        UserControl.ascx.cs中的处理:
        1. 定义public的事件委托,如ClickEventHandler;
        2. 在UserControl类中声明事件,如Click;
        3. 在UserControl类中定义引发事件的方法,如OnClick()方法;
        4. 在UserControl类的相关方法中调用引发事件的方法,如在Button_Click()中调用OnClick()。

        核心代码示意如下:
        public delegate void ClickEventHandler(object sender, EventArgs e);
        public class MyUserControl : System.Web.UI.UserControl
       {
          protected System.Web.UI.WebControls.Button AButton;
          public event ClickEventHandler Click;
          protected void OnClick(EventArgs e)
          {
              if (Click!=null) Click(this, e);
          }
          private void AButton_Click(object sender, System.EventArgs e)
          {
              this.OnClick(e);
          }
       }

      包含UserControl的页面cs文件中的处理:
     1. InitializeComponent()中增加事件处理程序,采用FindControl方法找到UserControl;
     2. 定义事件处理方法,在该方法中处理UserControl的事件,如UserControl_Clicked()。
     核心代码示意如下:
     private void InitializeComponent()
     {   
          this.Load += new System.EventHandler(this.Page_Load);
          MyUserControl uc = this.FindControl("myUserControlID") as MyUserControl;
          uc.Click += new ClickEventHandler(this.UserControl_Clicked);
     }
     private void UserControl_Clicked(object sender, System.EventArgs e)
     {
          // UserControl_Clicked event hanlder
     }

posted @ 2004-11-22 14:38 昕 阅读(1176) | 评论 (1)编辑