LoginLogin
Nintendo shutting down 3DS + Wii U online services, see our post

announcing TerraBasic

Root / Talk About Programs / [.]

randoCreated:
terraria clone i suddenly like the idea more and i want some competition with whoever else is making a terraria clone! this will be a contest thread NOT OFFICIAL!!! and you have until jan. 5 to enter. i will post deadline--
'----------
-- when entering is over and and the deadline for the contest will be when everybody is done with the base game. if an entry is full of polish and is SLOW like a year or something that entry is disqualified. anyway NO COPYING NAMES ALSO POST NAME FOR ENTRY MINE IS TerraBasic. prize is popularity for best awesome game clone!

Ah, punning with "terrible," I see.

Ah, punning with "terrible," I see.
no. terra as in terraria clone thing.

new rule, you can also team. 3 at max edit:4 at max now

team 1: 1.random_guy 2.Picy3 3.DaSonicMario 4.

so if i would like to start on the idea of the map and how it will load. cause idk how it will work yet, so here goes. we will load a bit of the map from around the player at a time *why you may ask for some reason..?* well the answer is simple. have you seen sb maps? well if you have you know a normal one is far from big enough to be a terraria world, it would be like a mini biome lol. so instead we load only a little bit at a time from our array that hold the map, now the graphics map has each color representing every block, and the array has a number that tells apart tiles such as 0 is air, 1 is grass land, 2 is sand land and so on. so. in order to actually use a 1024x1024 map we have to have load only a bit at a time as to obviously the fact we cant load an entire one at the same time, now you may ask *why dont we load the max at a time, 127x128 instead of just around the player view???* again this is simple, we would have to redo the map everytime we moved, for example try to make a for look that checks an area from 1000 to 1000 both x and y, you will see you program has decreased speed insanely a lot because it has to check the whole area before moving on, every time around. so making a small area does it. heres what i propose. we take our array with the map saved to it first, then we load the area ONLY by the player in certain ammount, if we move so does it and it deletes the map behind us and creates the in front too, same with behind us too, if we go back behind us will go back and the other side will go back and so on. creating the #MapThatIsHuge ok Now that we know WHAT we will do, we have to get te HOW we will do. if it were this simple why would everyone use this always or a lot more? so thus starts: PART 2. the how. I propose we generate at the least only the map area on the screen and at the current most, some head on top behind on below like maybe 2 - 5 tiles. now lemme go see how many tiles are in a one screen area. so the screen is 400x240, 400 divided by 8 is 50 and 240 divided by 8 is 30 soo 50x30 now im going to go put a for loop in a look and see how fast 50x30 runs. oh look it runs with near 0 lag (i say near 0 because it cause some sort of lag one way or another, but in this you cant see it) so now comes the hard part Example of the loop is here
ACLS

'map width and height
VAR MAPW=100,MAPH=100
DIM MAP[MAPH,MAPW]
'fill map with random tiles
FOR J=0 TO MAPH-1
 FOR I=0 TO MAPW-1
  MAP[J,I]=RND(1024)
 NEXT I
NEXT J
'background width/height (the size of the screen + 1 extra row and column of tiles)
BGW=25+1
BGH=15+1

BGSCREEN 0,BGW,BGH

WHILE 1
 VSYNC
 STICK OUT SX,SY
 INC X,SX
 INC Y,-SY
 'offset the layer between 0 and 15 pixels to give the illusion of smooth movement
 BGOFS 0,(X-FLOOR(X))*16,(Y-FLOOR(Y))*16
 'clear the bg layer
 BGCLR 0
 'load the tile data into the correct position
 BGLOAD 0,-FLOOR(X),-FLOOR(Y),MAPW,MAPH,MAP
WEND

that is just the code im using EDIT 12me helped me with a nice thing so tis working nicely, so now map loading is done. im now starting on something evil. collision, now i have much fear that when i do this it will fail and get completely messed up AND just not work, but if my plans work out we will have terraria sb test version in no time now ill make a new past and stop editing this

i wanna join team 1

i wanna join team 1
ok


http://tibasicdev.wikidot.com/archive:mine-ti
hmm now i have an account there. ok i wanna work on player mechanics to, team.

so as of now i have a close to working prototype, we have generation, we have saving, wwe have loading and loading again in map form :), now whats left is collision mainly, by this i mean anything else will be easy compared random guy anytime now would be good for just anything you have sprite wise btw