A forum for the Tanghinian

Welcome to Discuss
Monday, 6 September 2010 @ 04:49 PM HKT


 Forum Index > Computer Lessons > S2 Computer Game Programming New Topic Post Reply
 有任何問題,在此提出!
 |  Printable Version
Wong sir
 February 10 2010 10:17 AM (Read 1313 times)  
Forum Chatty
Chatty

Status: offline

Registered: 12/28/06
Posts: 57

09-10中二同學,過年要寫game,有任何問題,在此提出!


 
Profile Email Website
Quote
Wong sir
 February 10 2010 10:41 AM  
Forum Chatty
Chatty

Status: offline

Registered: 12/28/06
Posts: 57

Chinese New Year Holiday Assignment
Task: Using Visual Basic to create an interactive game
Create an interactive game with Visual Basic, using the methods, functions and skills discussed in the lesson.
This assignment should be completed by 1-2 students. The full mark constitutes 40% of the 2nd Test mark.
You are recommended to further your study in this programming language from other sources like books and Internet. After the study, you have to make sure that you understand the newly learned techniques.
Assessment criteria based on the following:
1. Proper use of conditionals: “If…Then…Else” or relevant;
2. Use of Randomize and Rnd;
3. Proper use of Image control;
4. Proper use of Timer control;
5. Proper design of the user interface, i.e. the layout of the Form(s);
6. Including instruction for the user(s) who use/uses the game;
7. Game consisting different levels of challenges and of interest for users;
8. Codes are shown clearly in the source programme, remember to zip up ALL files in the project on submission;
9. Able to submit the completed assignment on time. Students have to show the work on the first computer lesson after the Chinese New Year Holiday. After fixing all problems, all the works should be submitted to teachers on the 2nd computer lesson ;
10. You can raise questions in the school forum: http://discuss.tanghin.edu.hk/  Computer Lessons  S2 Computer Game Programming .


 
Profile Email Website
Quote
S080118@eClass
 February 26 2010 18:38 PM  
Forum Newbie
Newbie

Status: offline

Registered: 02/24/10
Posts: 2

我想問
使用者在視窗中看見的文字語言可以是中文嗎?


 
Profile
Quote
Wong sir
 February 26 2010 18:41 PM  
Forum Chatty
Chatty

Status: offline

Registered: 12/28/06
Posts: 57

Of course, you can!
But why do you make it in Chinese interface.

Wong sir


 
Profile Email Website
Quote
S080118@eClass
 February 26 2010 18:55 PM  
Forum Newbie
Newbie

Status: offline

Registered: 02/24/10
Posts: 2

弄好的時候給其他人使用時看中文會比較舒服而已


 
Profile
Quote
Wong sir
 February 27 2010 21:05 PM  
Forum Chatty
Chatty

Status: offline

Registered: 12/28/06
Posts: 57

OK,
最緊要係玩家知道點玩~


 
Profile Email Website
Quote
S080085@eClass
 March 01 2010 20:44 PM  
Forum Newbie
Newbie

Status: offline

Registered: 03/01/10
Posts: 4

如果一個picturebox中有一隻小動物,run game時要左右移動,如何把其背景色變為透明,不會遮蓋form的background?


 
Profile
Quote
Wong sir
 March 02 2010 00:21 AM  
Forum Chatty
Chatty

Status: offline

Registered: 12/28/06
Posts: 57

See this


 
Profile Email Website
Quote
S080124@eClass
 March 05 2010 21:50 PM  
Forum Newbie
Newbie

Status: offline

Registered: 04/08/09
Posts: 5

Quote by: Wong+sir

09-10中二同學,過年要寫game,有任何問題,在此提出!



Wong Sir,
I want to ask you how to reload the game?And what is me.unload(the same function) now?


 
Profile
Quote
Wong sir
 March 06 2010 14:24 PM  
Forum Chatty
Chatty

Status: offline

Registered: 12/28/06
Posts: 57

Re: S080124@eClass

If you just want to reload the program, just like closing the program and start all over again, use this code:

PHP Formatted Code
        Application.Restart()


If you want to show form2 and the same time close form1 do the following:
PHP Formatted Code
        Form2.Show()
        Me.Close()
 

Also, in the Project properties, [Click Project at the top menu bar -> click the last one: XXXX Properties]
The the Shutdown Mode drop down menu, choose "When last form closes".

If you don't the last step, the program will close. It 's because Me.Close is called and that Me is the startup form.

Hope it helps!

Pls reply me if you have read~ I think I am working alone, without response!

Wong sir


 
Profile Email Website
Quote
S080124@eClass
 March 07 2010 17:08 PM  
Forum Newbie
Newbie

Status: offline

Registered: 04/08/09
Posts: 5


Thx!Wong sir.I have read your response.And I will try what you say.Thx very mcuh!


 
Profile
Quote
S080075@eClass
 March 08 2010 23:11 PM  
Forum Newbie
Newbie

Status: offline

Registered: 03/08/10
Posts: 1

Wong Sir,
我想請教您一個問題

如果遊戲的勝利條件是三張圖案(picturebox)–樣.
我有5張圖片會在三個picturebox中隨機轉換.
我應該怎樣做才能證實三張圖案(picturebox)–樣,而令玩家勝出?

麻煩您了.


 
Profile
Quote
Wong sir
 March 09 2010 00:24 AM  
Forum Chatty
Chatty

Status: offline

Registered: 12/28/06
Posts: 57

你是否會抽一幅圖放到3張圖中?

e.g.

PHP Formatted Code
        If Int(Rnd() * 2) = 0 Then
            PictureBox3.Image = PictureBox1.Image
        Else
            PictureBox3.Image = PictureBox2.Image
        End If


用 tag property 加多句:
PHP Formatted Code
        If Int(Rnd() * 2) = 0 Then
            PictureBox3.Image = PictureBox1.Image
            PictureBox3.Tag = "1"
        Else
            PictureBox3.Image = PictureBox2.Image
            PictureBox3.Tag = "2"
        End If


Tag is a property to let you store some short data. This is very very very useful to make many tricks!

唔麻煩, 問問題係學生應該做的, 問「好」問題是學生應該學的

所以我沒有給你完整答案, 你仍然要學下自我解決難題!

仍然歡迎你問!
黃sir


 
Profile Email Website
Quote
S080124@eClass
 March 09 2010 16:14 PM  
Forum Newbie
Newbie

Status: offline

Registered: 04/08/09
Posts: 5

我想知點樣將個picturebox係每次formload都擺係唔同位置,而唔係係load緊果陣先移動


 
Profile
Quote
S080127@eClass
 March 09 2010 17:25 PM  
Forum Newbie
Newbie

Status: offline

Registered: 03/07/10
Posts: 12

呀sir- -又係我......
我想問下點樣改變vb圖片方向


 
Profile
Quote
S080114@eClass
 March 09 2010 17:53 PM  
Forum Junior
Junior

Status: offline

Registered: 02/12/10
Posts: 18

LEFT的減等於向左
LEFT的加等於向右
TOP的減等於向上
TOP的加等於向下


 
Profile
Quote
S080127@eClass
 March 09 2010 19:26 PM  
Forum Newbie
Newbie

Status: offline

Registered: 03/07/10
Posts: 12

我唔係要個個呀,我指係係design個陣改
比如由打橫轉做打直


 
Profile
Quote
Wong sir
 March 09 2010 19:32 PM  
Forum Chatty
Chatty

Status: offline

Registered: 12/28/06
Posts: 57

Re: S080124

Take the picturebox's left and top value. Draw a random number ....

e.g.
picturebox1.left=int( rnd()* (me.width - picturebox1.width) )

It seems difficult, actually, very easy.

Put such code in form_load procedure.....

That's all I can tell you! Or, I will finish it for you!

Wong sir


 
Profile Email Website
Quote
Wong sir
 March 09 2010 19:34 PM  
Forum Chatty
Chatty

Status: offline

Registered: 12/28/06
Posts: 57

Re: S080127

你自己都話design時改啦~

Use image editing software, e.g. PhotoImpact, to change!

Wong sir

ps. Pls post a new question to a new thread.We are now replying to different questions but in the same thread! It's not easy for us all to follow!


 
Profile Email Website
Quote
S080127@eClass
 March 09 2010 21:41 PM  
Forum Newbie
Newbie

Status: offline

Registered: 03/07/10
Posts: 12

but 佢係gif-v-


 
Profile
Quote
Content generated in: 0.94 seconds
New Topic Post Reply



 All times are HKT. The time is now 04:49 PM.
Normal Topic Normal Topic
Locked Topic Locked Topic
Sticky Topic Sticky Topic
New Post New Post
Sticky Topic W/ New Post Sticky Topic W/ New Post
Locked Topic W/ New Post Locked Topic W/ New Post
View Anonymous Posts 
Anonymous users can post 
Full HTML Allowed 
Censored Content