Fungle's Profile
Reputation: 242
Stalwart
- Group:
- Author w/DIC++
- Active Posts:
- 336 (0.29 per day)
- Joined:
- 06-March 10
- Profile Views:
- 11,741
- Last Active:
Apr 17 2013 08:08 AM- Currently:
- Offline
Previous Fields
- Country:
- GB
- OS Preference:
- Linux
- Favorite Browser:
- Chrome
- Favorite Processor:
- Intel
- Favorite Gaming Platform:
- Who Cares
- Your Car:
- Who Cares
- Dream Kudos:
- 225
Latest Visitors
-
CakeMagic 
15 Apr 2013 - 02:33 -
Rossberger 
22 Mar 2013 - 18:16 -
colemanoke 
21 Feb 2013 - 03:43 -
CodingSup3rna... 
16 Feb 2013 - 09:07 -
KrimCard 
08 Feb 2013 - 21:37 -
MissBeery 
01 Feb 2013 - 20:50 -
anveshr 
19 Dec 2012 - 10:57 -
cocoto4 
20 Nov 2012 - 15:07 -
livingstory1 
20 Nov 2012 - 13:43 -
tlhIn`toq 
11 Nov 2012 - 08:38
Posts I've Made
-
In Topic: C# For Beginners Tutorial I
Posted 16 Feb 2013
Update:
I feel I should mention that there will not be anymore of this tutorial series [from me at least].
As you can see this tutorial was written over two years ago now.
Alot has happened since then, and as far as I can remember, besides being very busy with exams etc at the time; another group of people in the C# Forum started their own learning series here: http://www.dreaminco...%23-start-here/
I'm not sure if that is being worked on anymore but feel free to check it out, or other tutorials in the C# section of Dreamincode if you wish to further your knowledge of C#.
I hope my tutorial helped, and I do check DIC from time to time for PM's etc. -
In Topic: C#: Basic Box Game
Posted 8 Feb 2013
cocoto4, on 20 November 2012 - 10:12 PM, said:hey! thanks alot for this tutorial! learned alot
/>/> although i can't seem to figure out how to make you "respawn" when you hit the corners, neither how you find out if the player hit the corners, can you please help me on this?
This is my current code:
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; namespace WindowsFormsApplication1 { public partial class Form1 : Form { private Rectangle Goal = new Rectangle(350, 600, 50, 50); private Rectangle Player = new Rectangle(350, 1, 50, 50); private Rectangle Enemy1 = new Rectangle(0, 150, 75, 75); private Rectangle Enemy2 = new Rectangle(599, 350, 75, 75); public Form1() { InitializeComponent(); this.MaximumSize = new Size(750, 750); this.MinimumSize = new Size(750, 750); InitializeComponent(); } private void Form1_Paint(object sender, PaintEventArgs e) { e.Graphics.DrawRectangle(Pens.Green, Goal); e.Graphics.DrawRectangle(Pens.Blue, Player); e.Graphics.DrawRectangle(Pens.Red, Enemy1); e.Graphics.DrawRectangle(Pens.Red, Enemy2); } private void Form1_KeyDown(object sender, KeyEventArgs e) { int PlayerX = Player.Location.X; int PlayerY = Player.Location.Y; switch (e.KeyData) { case Keys.Up: Player.Location = new Point(PlayerX += 0, PlayerY -= 20); this.Refresh(); break; case Keys.Down: Player.Location = new Point(PlayerX += 0, PlayerY += 20); this.Refresh(); break; case Keys.Left: Player.Location = new Point(PlayerX -= 20, PlayerY += 0); this.Refresh(); break; case Keys.Right: Player.Location = new Point(PlayerX += 20, PlayerY += 0); this.Refresh(); break; } } private void timer1_Tick(object sender, EventArgs e) { int EX1 = Enemy1.Location.X; int EY1 = Enemy1.Location.Y; if (Enemy1.Location.X > 600) { Enemy1.Location = new Point(EX1 = 0, EY1 = 150); } Enemy1.Location = new Point(EX1 += 30, EY1 += 0); this.Refresh(); int EX2 = Enemy2.Location.X; int EY2 = Enemy2.Location.Y; if (Enemy2.Location.X < 0) { Enemy2.Location = new Point(EX2 = 599, EY2 = 350); } Enemy2.Location = new Point(EX2 -= 30, EY2 += 0); this.Refresh(); } private void HitDetect(object sender, EventArgs e) { int PlayerX = Player.Location.X; int PlayerY = Player.Location.Y; if (Player.IntersectsWith(Goal)) { Player.Location = new Point(PlayerX = 350, PlayerY = 0); MessageBox.Show("You won!", "Nice!"); } if (Enemy1.IntersectsWith(Player)) { Player.Location = new Point(PlayerX = 350, PlayerY = 0); MessageBox.Show("You lose!"); } if (Enemy2.IntersectsWith(Player)) { Player.Location = new Point(PlayerX = 350, PlayerY = 0); MessageBox.Show("You lose!"); if (Player.Location.X > 650) { Player.Location = new Point(PlayerX -= 20, PlayerY += 0); } if (Player.Location.X < 0) { Player.Location = new Point(PlayerX += 20, PlayerY += 0); } if (Player.Location.Y > 590) { Player.Location = new Point(PlayerX += 0, PlayerY -= 20); } if (Player.Location.Y < 1) { Player.Location = new Point(PlayerX += 0, PlayerY += 20); } } } } }
PS: is there any other way i can get the MessageBox to stop spamming when hit goal? except putting out that you go back to start afterwards?
I gave your code a go, and it seemed to work (almost) out of the box for me.
I'm sorry for the broken code and the issue you're having, My only suggestion is perhaps modifying the switch statement from e.KeyPress to e.KeyCode
Both worked for me.
Also, Be aware this tutorial is very old so you may want to set yourself a challenge to write it in a much better, simpler way. -
In Topic: C#: Basic Box Game
Posted 19 Aug 2012
I'd like to issue an apology for my lack of support and activity for this tutorial. I wrote this tutorial as I was still new so there are issues with it.
In terms of the lack of support I have had some real life issues so I needed to keep stress to a minimum.
I am truely sorry, but I am glad some of you have been able to learn from what is essentially a broken tutorial. It appears to give guidance on the code structure and leaves it to you to do what programming is all about, problem solving.
I will do my best to help in the future and look forward to becoming more active on here. -
In Topic: radio button problem
Posted 4 Oct 2011
I reckon you may find the PHP forum should help with this problem.
But I can try and help, Need some clarification however;
What is it exactly your trying to do?
When the Second Radio Button is Clicked:
-> Add a empty textbox?
-> Add a new button?
I haven't done PHP for a while but can't you just echo new elements out? -
In Topic: Why do people hate windows?
Posted 4 Oct 2011
modi123_1, on 04 October 2011 - 09:15 PM, said:Quote
Unfortunately the monopoly does exclude Linux users in quite alot of educational institutions, Even in some universities! Which does present a hindrance to supporting alternatives to Windows and very restrictive propitiatory software.
Rightfully so! Which flavor of linux should a university invest in? Mint? Redhat 1? Ubunutu Satanic Edition? Tiny Core? Musix?
Even then where would the support come from? With most big educational contracts support is chucked in to the cost.
I didn't say a University should run only Linux and that's all, My one dual boots Windows and Linux together, It doesn't bother me. But regardless of what the system is based on, I reckon students should be encouraged to try things other than Windows and decide what they prefer. You never know, some of them might like Linux more.
As well as that they might prefer different languages along with Linux too for example they might of learned C# in College but tried out Java and preferred using Java instead.
Only for courses that relate to computing though, I'm not suggesting every person in the university must do this.
My Information
- Member Title:
- D.I.C Regular
- Age:
- Age Unknown
- Birthday:
- Birthday Unknown
- Gender:
-
- Interests:
- Programming, Writing Tutorials.
- Years Programming:
- 3
- Programming Languages:
- C#, Java, Python, Haskell
Contact Information
- E-mail:
- Private
Friends
|
|


Find Topics
Find Posts
View Reputation Given


|
Comments
anveshr
19 Dec 2012 - 11:01Thank you
vai24shinde
19 Jan 2011 - 20:32