Showing posts with label visual basic. Show all posts
Showing posts with label visual basic. Show all posts

Monday, March 1, 2010

Design 1.0

I'm going to be hitting the design phase sometime soon, due to the length of simultaneously learning and making. My posts will be less about a resume of my progress but a show of the progress itself. I will first try to make tiles and apply them to the game world. The game world will be a matrix of tiles put inside the panel you saw couple of posts ago ( in the image folder of my album ), 16x16 tiles generated with some kind of technique I still have to fathom. I plan on developing my own technique for doing this ( instead of just hitting the forums and asking how to do it ) because I feel like I can find it myself and thus will be better at applying it. It won't be anything revolutionizing  but fun to make out.


On my list right now there is:
  • Figuring how the hell to make a map and apply tiles to it.
  • Make said tiles using paint and the tutorial I got.
  • Make individual functions that I will be able to use throughout the game. ( Wait functions, timers, showing menu's, combat etc. )
  • Start thinking about music effects.
More will be added as I go. For now I have to study about my exam coming tomorrow morning. Hell I hate exams, nothing worse than theory. Give me practical exams for fuck's sake. 

Thursday, February 25, 2010

Classes Overview

Today we had to use classes. I will try to explain briefly what classes are, without going into too many details, because this is a deep subject.

First off classes are concepts of "things". A thing can be pretty much anything you can interact with. Chairs, tables, cars and clothes are all classes. Objects are physical representation of those concepts ( or logical, in the case of computers ). The particular chair you are standing on is the physical representation of the "chair" concept. Chairs are things which have several legs and a plate on which you can sit. But the one you are sitting on right now may have a number of legs and style and paint, it is unique ( even more unique when you think about the atoms making your chair ). Class = Chairs and Object = [The one chair you're sitting on]. 

Creating a class is made that way:

Public Class Car  'The class definition

Dim typeOfCar as string 'This is called a Member, it is specifically a property of a class (i.e a variable )


Sub nameCar(byval newValue as string) 'This is another member, it is a procedure.
typfOfCar = newValue


End Sub

End Class


By inserting the following snipper we have now created a Class called Car, it is a very general and broad class right now. It has a single property called typeOfCar that defines what type of car we're talking about. Right now it has no value so it can be anything. It a concept. When we create it, we define the car. We give it a brand, a name, a maximum speed, number of doors and etc. This is called an instance of a car. And creating an instance of a class is as easy as creating any other variable.

Dim MyViper as New Car
MyViper.nameCar("My Big Car")

We now have a living representation of a "car", its a dodge viper and its name is "My Big Car". We have given it a name using our member by accesing it using the syntax Class_Name.Procedure_Name


As you see, an instance of a class is an object. And the class itself that defines the procedures and properties is a Class. By using Object Oriented Programming you can do many things functional programming cannot do. The code you make is a lot neater and well structured. OOP is a lot more complex than that but thats all I'm going to risk explaining else if make some error and give you bad knowledge. That is all for today, hope to see you next time !

Hello World

Hello, and please be comfortable. This is my new blog in which I will talk about my passion: programming. As a young adult with very few experiences in the domain this will not be a breakthrough in computer programming concepts nor will it be particularly advanced. I've been studying in IT for 2 years and started experiencing with programming languages 2 years before that (with HTML, even if this is a markup language and not really programming it is still closely related ).

I am currently studying the Visual Basic.net language and will therefor make my articles in this language although I might branch off in another for demonstration purposes. Without further ado:

' I like colors by the way
console.writeline("Hello World !")
exit