Click here to Skip to main content
15,884,298 members
Articles / Programming Languages / C# 2.0

Sample Pamper Series - Part 4: 2/3D Space Game, Simple Sounds, and Threads

Rate me:
Please Sign up or sign in to vote.
4.67/5 (11 votes)
4 Apr 2012CPOL5 min read 39.6K   714   42  
This article is the final one in the series, and it will give you a 2/3D space game out of what we have learnt from previous articles. We will also apply simple sounds to it played in threads.
using System;
using System.Collections;
using System.Drawing;

namespace Engine3DVP
{
	public interface IEngine3D
	{
		int Energy(int i);
		double GetDegree(int i, int m);
		void SetDegree(int i, int m, double degree);
		void SetMouse(int x, int y);
		Point GetMouse();
		void SetChield(int i);
		int GetChield(int i);
		void ReleaseChield(int i);
		void NewPlayer(ref ArrayList mesh, Poinx3D place, double rotX, double rotY, int energy);
		void NewEnemy(ref ArrayList mesh, Poinx3D place, double rotX, double rotY, double paseX, double paseY, int energy);
		Poinx3D GetObjPos(int i);
		void SetObjPos(int i, Poinx3D pos);
		double RotNumX(int i);
		double RotNumY(int i);
		void ToggleLazer(int i);
		void RotateXY(ref Bitmap bm, ref uint[][] zbuffer);
		Segment3D Normalize(ref Segment3D normal);
		Segment3D BuildSegment(Poinx3D start, Poinx3D end, ref Segment3D segm);
		double DotNormalized(Segment3D segm1, Segment3D segm2);
		Segment3D ExctractNormal(Segment3D segm1, Segment3D segm2, ref Segment3D normal);
	}
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Sweden Sweden
Professional programmer, degree in Informatics and Applied Systems Science.

Comments and Discussions