Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 02 Jan 2013
Offline Last Active Jul 05 2013 11:06 AM

#5018707 No knowledge of any programming language

Posted by on 07 January 2013 - 02:07 PM


#5018379 Making Diablo 2 style rpg

Posted by on 06 January 2013 - 07:20 PM

But does anybody know where I could learn to program games similar to Diablo? Or where i could start to learn such programming?

Cause i cannot program 2D tiles, add sprites and make a character walk in a grid og 2D tiles etc smile.png I need to start from scratch. I know the basic C# programming, but not game programming.


One important thing that helped me, an epiphany of sorts is that once you wrap your ahead around the concept that everything is abstract, then you can do anything.


I know it's over used but there really is no spoon.


There is no sword. There is no ship. There are no engines and there are no shields.


There are drawing graphics, variables, x, y coords, screen, input, output, checking for collisions and the consequences or results or action for the program to take in the event of a collision.


For example my ship has an "engine". It can be damaged, if it gets damaged, my ship cannot fly as fast. Remember there is no engine. Only a variable called engine. I could call the variable lightswitch if I wanted too and still have it affect how fast the ship flew.


your game is up and running, you are flying around your ship. An enemy comes and shoots a projectile, it hits your ship.


Abstract version: your game is running, a graphic in the shape of a space ship is being drawn around the screen based on the input from you, left right, up down. Another graphic comes along being draw, controlled by AI routines, and a projectile graphic suddenly is created at the enemy ship, it is drawn across the screen until its near you, in your game it 'explodes'. In abstract one graphic touched another graphic. You have a collision.


pseudo code


If projectile Image, collide with space ship image

     stop drawing the projectile (delete the object, OOP)

     draw explosion @ x,y coordinates of the collision

     update the explosion, ( if its based on frames, a sprite)


    if explosion complete (all the frames were drawn)

         stop drawing the frames ( so you dont see a continuous explosion graphic)



     your_ship_engines = your_ship_engines - damage(damage from the projetile)

end if


Now imagine how fast you can go if you speed is based on the variable 'your_ship_engines'

the less value it has like say its 50/100 obviously you will fly slower. So your engines are damaged, and the effect of a damaged engine is 'simulated'


lets say speed = speed * your_ship_engines

and let's say your ship engines starts with a value of 1.0

if speed was 100, you can go at full speed because the engines have not been 'damaged' no value has been subtracted from them.


but if you subtracted a value of 0.5 (the damage from the projectile) then the variable 'your_ship_engines' = 0.5


remember speed = speed * your_ship_engines (which is now 0.5) which means your speed is only half the speed you were capable of before.



I hope this doesn't get confusing, it's extremely layman terms, I am just trying to show you it's all what you know just with graphics. What happens on screen must be drawn, it must be updated, either based on input or something else. If you just want to make a 2d game I'd suggest using a system built for 2d games. Blitzmax or monkey, you don't need UNITY.


blitzmax is a BASIC programming language, but it's powerful and fast because it was written with C modules. It uses precompiled C modules. It can use OPENGL, directx, supports scripting, so your application can be cross platform from the beginning. Systems like these are designed to make your life making the game easier. For example for drawing that sprite you say you do not know how to draw? Command in blitzmax is drawImage(image, x,y,) . Where image is the image you are drawing, (pre-specified by you), x and y are the coordinates on screen. Because blitz renders 2d with hardware, its extremely fast, rotations are done real time etc, no need for frames etc. Blitzmax also has well developed 3d modules for it.


You can use any system which you feel is best and suits your need. Maybe Python with PYGAME. Haven't looked at python in a while so I don't know what other stuff is out there for it.


You could look at XNA , that seems pretty good and popular. I just stick with blitzmax because it is fast enough, powerful enough, cross platform, has dozens of thirdy party modules and libraries written for it and it's a BASIC language. My interest in other languages/systems is merely academical because I won't use them for much, but I still like to read/learn about them and try stuff with them.