Mini Game - Never Ending. :)
Community Forums/Showcase/Mini Game - Never Ending. :)
| ||
Here's my mini game. You have to collect all the stars to get to the next level. Enjoy )![]() Download |
| ||
"Bandwidth theft will not be tolerated." Might want to fix that =P |
| ||
Where are you trying to download from? I've added blitzmax.com and blitzbasic.com to my allowed list. I'll go and check now. [edit] Ok, there was a rogue "/" in the link for BlitzMax.com on my allowed list. I've fixed it and I'm assuming you're logged in to BlitzMax.com??? |
| ||
I posted, didn't I? lol. It's still not working mate. |
| ||
Ok Try now. I've disabled hotlinking until I find out why it's not working. Yeah I meant if you were logged in to Blitzmax.com, blitzbasic.com or blitzbasic.co.nz. |
| ||
Works now. Heh, it really seems never ending. Not sure how many you need for next level but it got too repetetive when i'm running short on time lol. Nifty little sprite dude though |
| ||
Got too boring for me before I completed the 1st level. There's no challenge because you can't possibly fail. I also liked the sprite dude. |
| ||
LOL! There's no other Levels. It's just a never ending collect the star game. My intention was to win the boring and stupidity award. :) I think I won. [edit] By the way, the sprite dude is not mine. I found it in the Graphics Showcase. |
| ||
I got to 768 stars then got bored.... |
| ||
I got to 768 stars then got bored.... My God Man, how board were you to play until you collected 768 stars? :) |
| ||
when I got to 150 I figured that the next level was a joke. By that time I started getting depressed and quit. anyway how is the scroller comming allong Amon? |
| ||
Hey, thanks for playing. 150 stars before you got depressed is not so bad. :) The scroller is not going well. I have no idea how to code it. I've tried reading the tuts posted by tonyg but don't get whats going on. I'm stuck where I have to scroll the map or the level and only draw the tiles that are within the screen space. |
| ||
I'm stuck where I have to scroll the map or the level and only draw the tiles that are within the screen space. It's really not that hard, Amon ;-) If it's only ever scrolling in one direction (say, moving right) you need to draw one extra set of tiles on that side, which will nicely scroll into view. You'll get there :-) |
| ||
I think I sussed it. The code below only draws the tiles within a given area on screen. So you could have large maps and only draw the tiles visible within an area. :)SuperStrict Graphics 800, 600 Global MapWidth:Int = 1600 / 25 Global MapHeight:Int = 1600 / 25 Global MapStartX:Int = 50 Global MapSTartY:Int = 50 Global MapXOffset:Int, MapYOffset:Int Global array:Int[MapWidth, MapHeight] Print MapWidth For Local x:Int = 0 Until MapWidth For Local y:Int = 0 Until MapHeight array[x, y] = Rand(0, 5) Next Next Global startmapx:Int = 0, startmapy:Int = 0 While Not KeyHit(KEY_ESCAPE) Cls DrawMap() MoveMap() Flip Wend Function MoveMap() If KeyHit(KEY_LEFT) If startmapx <= 0 startmapx = 0 MapStartX = 50 Else MapXOffset:-1 startmapx:-1 MapStartX:+25 EndIf ElseIf KeyHit(KEY_RIGHT) If startmapx < MapWidth - 28 MapXOffset:+1 startmapx:+1 MapStartX:-25 Else startmapx = MapWidth - 28 End If End If If KeyHit(KEY_UP) If startmapy <= 0 startmapy = 0 MapSTartY = 50 Else MapYOffset:-1 startmapy:-1 MapSTartY:+25 EndIf ElseIf KeyHit(KEY_DOWN) If startmapy < MapHeight - 20 MapYOffset:+1 startmapy:+1 MapSTartY:-25 Else startmapy = MapHeight - 20 EndIf End If End Function Function DrawMap() Local endmapx:Int, endmapy:Int If MapXOffset + 25 > MapWidth endmapx=mapwidth Else endmapx = MapXOffset + 28 EndIf If MapYOffset + 20 > MapHeight endmapy=mapheight Else endmapy = MapYOffset + 20 EndIf For Local x:Int = startmapx Until endmapx For Local y:Int = startmapy Until endmapy Select array[x, y] Case 0 SetColor 255, 255, 255 DrawRect MapStartX + x * 25, MapSTartY + y * 25, 25, 25 Case 1 SetColor 0, 255, 255 DrawRect MapStartX + x * 25, MapSTartY + y * 25, 25, 25 Case 2 SetColor 255, 0, 255 DrawRect MapStartX + x * 25, MapSTartY + y * 25, 25, 25 Case 3 SetColor 255, 255, 0 DrawRect MapStartX + x * 25, MapSTartY + y * 25, 25, 25 Case 4 SetColor 0, 0, 255 DrawRect MapStartX + x * 25, MapSTartY + y * 25, 25, 25 End Select Next Next End Function |
| ||
You more or less got the concept. You still need to be able to move it at different speeds based on your character speed. keep the character toward the center while moving, and moving toward the edge of the screen when reaching the end. I just saw the code Brucey posted on your other thread. that is a pretty good sample of the basic concept. The code I posted there is a bit more powerfull in the sence that it lets you create a map any size you want and use whatever graphics mode you want. you can use any tile set you want but you won't be able to use the wall tile set, unless you follow the same patter for the different wall graphics set. It is also set, in a way that it can be controlled by the position of the controlled character. I modified the code I posted recently so it might be a little bit different than what you have. |