The Version-Code of TCE.
Public Const _VERSION As String = "ToeCrampEngine - Pro 1.0.3"
This is the Sprites-Database in wich every sprite will be saved in. Requires a name (as string) and the image (as image).
Public SpritesDatabase As Dictionary(Of String, System.Drawing.Image)
The Game-Screen Resolution. It can be what ever you want as long as you do not use the ToeCrampEngine.Resolution Class.
Public Resolution As System.Drawing.Size
This is a (somehow) useless variable. But technically it should set a cap of how many frames ar permitted to be rendered.
Public Max_FPS As Integer
Define what the maximum Memory-Usage of your game should be. Because it has to be a long, you should do something like Memory in Gigabyte * 1.000.000.000. Example: 2 GB = 2 * 1.000.000.000.
Public MAX_MEMORY As Long
If True then TCE will take care of a background.
Public NoBackground As Boolean
Disables Warnings.
Public DisableWarnings As Boolean
Normally if you change something like sprites, move sprites, etc, TCE will update the screen itself. Sometimes it necessary to update it manually.
Public SceneUpdated As Boolean
Defines how many particles are allowed in the game. Standard is 1024.
Public ParticleMaximum As Integer
(Will be a property in the future) Defines how many sprites are drawn on the screen.
Public DrawnSprites As Integer
Gives you the camera-location.
Public ReadOnly Property Camera As System.Drawing.Point
Defines how fast a particle is moving once per particle-tick. E.g.: if the particle-speed is 20, then it will move 20px.
Public Property SetParticleAnimationSpeed As Integer
Gives Frames per second.
Public ReadOnly Property FPS As Integer
Gives you the total amount of Particles.
Public ReadOnly Property ParticleCount As Integer
Gives you the last rendered Frame.
Public ReadOnly Property Frame As System.Drawing.Image
Set the Screen on wich the engine will render the game. It has to be a picturebox.
Public WriteOnly Property SetScreen As PictureBox
Gives you the total amount of sprites loaded into the project.
Public ReadOnly Property SpriteCount As Integer
Sets the particle timer interval in milliseconds.
Public Property SetParticleSpeed As Integer
Changes the image of a sprite inside the SpritesDatabase.
Public Sub ChangeSpriteImage(Name As String, ImageDB_Name As String)
Initializes the engine.
Public Sub Initialize()
Stops the engine.
Public Sub StopEngine()
Reinitializes the engine. not recommended to use, because of bugs that are yet to be fixed.
Public Sub Reinitialize()
Adds a sprite to the "Map" or screen.
Public Sub AddSprite(Name As String, Position As System.Drawing.Point, Z As Single, ImageDB_Name As String)
Adds a sprite to the SpritesDatabase.
Public Sub AddSpriteToDatabase(Name As String, ImageFile As System.Drawing.Image)
Removes every sprites with the given name.
Public Sub RemoveSprite(Name As String)
Moves the camera to its new location.
Public Sub MoveCamera(NewPosition As System.Drawing.Point)
Creates a explosion effect.
Public Sub AddExplosionParticle(Particle As System.Drawing.Image, pos As System.Drawing.Point, Count As Integer, Lifetime As Integer, Speed As Integer)
Creates a swirling particles effect.
Public Sub AddSwirlingParticle(Particle As System.Drawing.Image, pos As System.Drawing.Point, Count As Integer, Lifetime As Integer, Speed As Integer)
Moves every sprite with the given name to the given location.
Public Sub MoveSprite(Name As String, NewPosition As System.Drawing.Point)
Gives back the angle of two points. Can be used to make the player look to the mouse cursor.
Public Function LookingAtPoint(position As System.Drawing.Point, angle As Double, length As Double) As System.Drawing.Point
Gives back the image rotated by the given angle.
Public Function RotateImage(image As System.Drawing.Image, angle As Integer) As System.Drawing.Image
Resizes a image.
Public Function ResizeImage(InputImage As System.Drawing.Image, size_ As System.Drawing.Size) As System.Drawing.Image
Crops a bitmap.
Public Function CropBitmap(ByRef bmp As System.Drawing.Bitmap, cropX As Integer, cropY As Integer, cropWidth As Integer, cropHeight As Integer) As System.Drawing.Bitmap
Gives the angle of a point on the screen to the mouse cursor. Can also be used to get the angle between two points. Just set the cursor_postion to the second location.
Public Function GetAngleFromPlayerToCursor(player_position As System.Drawing.Point, playersize As System.Drawing.Size, cursor_position As System.Drawing.Point) As Double