Hi, i'm new to gameprogramming so i have some trouble understanding what every is talking about with the discussion on tile-thingy's and such.
I changed some scrolling code to my needs and this works:
(I do comment my code but it's in Dutch so i deleted it for the forum)
After reading a lot on the forum i found a lot of people talking about using tiles instead of my way because it's better smoother etc. Now that i want to make a level, have different pictures after eachother i'm getting the idea my code is going to become quite chaotic. So i'm looking for the 'right' to way to do this.
Can anyone explain to me what up with the tile stuff?
Everywhere i look i find lots of indepth technical stuff when i first want to understand the basics about it.
Does anyone know where to find a BlitzMax example on this?
After googling for hours and being sent from link to link i've become a little frustrated with it. Also, a lot of the info on the forum is years old and the links to sources dont work any more.
Trying to make a simple 2D sidescrolling shooter seemed like the perfect way to start learning BlitzMax....
After seeing Platypus i just have to try and make something like it, sure my graphics will totally suck and its not going to be so complex but i'm hoping its a nice start.
I changed some scrolling code to my needs and this works:
Global Schermbreedte: Int = 1024 Global Schermhoogte: Int = 768 Global Schermkleurdiepte: Int = 32 Graphics Schermbreedte, Schermhoogte, Schermkleurdiepte Type TParalax Field speed:Float Field x:Float Field y:Int Field width:Int Field cycle: Int Field img:TImage Function Create:TParalax(nx:Int, ny:Int, width:Int, speed:Float, ncycle: Int, imgFile:String) Local layer:TParalax = New TParalax layer.speed = speed layer.x = nx layer.y = ny layer.width = width layer.cycle = ncycle * width layer.img = LoadImage(imgfile) ListAddLast ParalaxList, layer Return layer End Function Method Update() x = x - speed If x < -width; x = 0 If cycle > 0; cycle:-1 If cycle = 0; ListRemove(ParalaxList,Self) DrawImage(img, x, y) If x < -(width - Schermbreedte); DrawImage(img, x+width, y) End Method End Type Global ParalaxList:TList=CreateList() Global Scroll0:TParalax = TParalax.Create(0, 0, 2048, .001, -1, "incbin::background-1a.png") Global Scroll1:TParalax = TParalax.Create(0, Schermhoogte-280, 1200, .2, -1, "incbin::mountains.png") Global Scroll2:TParalax = TParalax.Create(0, Schermhoogte-230, 2475, .4, 1, "incbin::buildings.png") Global Scroll3:TParalax = TParalax.Create(0, Schermhoogte-256, 1024, .5, -1, "incbin::crackice.png")
(I do comment my code but it's in Dutch so i deleted it for the forum)
After reading a lot on the forum i found a lot of people talking about using tiles instead of my way because it's better smoother etc. Now that i want to make a level, have different pictures after eachother i'm getting the idea my code is going to become quite chaotic. So i'm looking for the 'right' to way to do this.
Can anyone explain to me what up with the tile stuff?
Everywhere i look i find lots of indepth technical stuff when i first want to understand the basics about it.
Does anyone know where to find a BlitzMax example on this?
After googling for hours and being sent from link to link i've become a little frustrated with it. Also, a lot of the info on the forum is years old and the links to sources dont work any more.
Trying to make a simple 2D sidescrolling shooter seemed like the perfect way to start learning BlitzMax....
After seeing Platypus i just have to try and make something like it, sure my graphics will totally suck and its not going to be so complex but i'm hoping its a nice start.