Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
screens of my map maker
#11
400-500 =) the map editor is doing much much much more than the in-game engine has to do, not to mention thast the map editor runs at 800x600, while LL runs at 320x200 resolution.

and why would i optimize the editor? =P it runs smooth even at 15-20 fps, believe me ;]
Reply
#12
Man, I can't wait for this... Smile
Reply
#13
I'm drooling already. When can we see the game?
:o
y smiley is 24 bit.
[Image: anya2.jpg]

Genso's Junkyard:
http://rel.betterwebber.com/
Reply
#14
Quote:I'm drooling already. When can we see the game?
:o

boy you have been gone a while ^^
http://forum.qbasicnews.com/viewtopic.php?t=10973
url=http://www.smithcosoft.com]SmithcoSoft Creations[/url]
"If you make it idiot proof, someone will make a better idiot" - Murphy's Law
Reply
#15
btw that estimation of a month was a joke.. maps and stuff take way too long... and also SSC pm'd me about the features of gmap, so i figured i'd share it, someone might think it's interesting nyways:


Quote:here is a summary:

as of now, there is sporadic hard coding of tilesize = 16 type of thing, just because i was doing quick math. i know this could be easily changed to support any tile size. the editor loads in a 16x16 tileset thats in a certain format that i use. the format (that every picture in the game uses, not only tilesets) consists of a small header which describes things like tile xsize, tile y size, numberoftiles in the current file, etc. the image is then stored as an array of shorts (i will translate it to integer one day, i just had shorts from back in qb days)

anywho, onto the real stuff. my map format consists of multiple rooms in one map. gMap can create new rooms in a map, delete rooms in a map, resize a room in a map bigger or smaller (and fill any empty space with a slected tile)

each room can contain a number of enemies and teleports(doors, warps, anything to move you to another location on x,y with a fade out in between) each rooms darkness level can also be set (0-4) which causes an entire palette shift down, into darkness. a room's song can also be set.

i believe the number of enemies in a room is limited to somewhere around 512, due to space taken up storing information in certain bits. the engine cannot handle 512 enemies efficiently with it's current gfx backend (fbgfxlib) so, this isn't an issue. anyways, you can create, or delete enmies in a room using gmap. when you create an enemy, you can specify a "name" for the enemy, which is the name of an XML file in a specified folder which contains all the information to build the enemy. you can also specify the enemys starting direction, whether or not the enemy always spawns, or is controlled by an event (if so you input the event number to spawn) if that number <> 0 then you have the choice to make the enemy spawn if event n HAS been triggered or if it HAS NOT been triggered. there is also an area to store various misc. info about the enemy, which the engine may use. you can also set a default "name" for all new enemies you create.

tile-based collision is handled on an 8*8 grid "superimposed" over the normal 16x16 grid. the overlay modulates the tilesize, that is, if the tile size was 32x32 the overlay would be in 16x16 grid. each layer of tiles can have its own collision layer. while ll is not implementing this to its fullest potential, this means that there could be walk-under/over ares in maps.

ice is "painted" on in a similar way as tile collision, but in a grid that matches the size of the tiles. also, because of laziness, ice is only all on or all off for all layers.


also, a map contains entries, which are points of entry which can be pointed to, either from another teleport, or from the loading screen or title screen. each entry contains information such as x, y location, character direction, etc. also song information.


a tile can be clicked on and selected from the tileset on the right, and painted on the area on the left. you can also hold shift when you click the tileset, and then click another spot, and it creates a box in the 2 areas you clicked. you can then click on the map and the whole box is blitted to the map at once.

there are tile macros which is a grid that can have any tiles painted on it, then clicking the map will blit the macro to the map. yesterday i have added the ability to put a square of wall into the macro hit "wall macro" and it automatically tcreates a wall border around the edge of the rooms. i'm currently adding capability to put tile-based collision into the macro also, for one quick operation

a teleport is a structure that defines what room the teleport will send you to, and the destination x, y (and a couple other things)
teleports can be placed, as a box, if the player touches the box, the screen fades, they are teleported to the room which the teleport points to, and the x, y, coords. screen fades up and action

the map contains 2 togglable helper grids, one that is 16x16 and one that is 8x8. you can also zoom 2x into any portion of the map, and every part of the map, including helper grids, enemy sprites, teleport boxes, tile-based collision are properly scaled.

you can also fill an entire layer with a selected tile. also, there is an option to flood fill a tile until it hits any other tile.

an image for parallax can be loaded in a room and is properly scaled and clipped under all 3 layers of map.
Reply
#16
heres a bit of code that i wrote that was originally inspired by rel:

Code:
Sub Block2x ( img As Any Ptr, newimg As Any Ptr, w As Integer = 16, h As Integer = 16 )


  Dim As uShort Ptr lbf
  Dim As uByte Ptr imglook, newimglook

  Dim As Integer x, y, x2, y2, i, j

  Dim As Integer im_dex, im_dex2
  
  Dim As Integer b_opt, w_opt, y_opt
  
  imglook = img
  newimglook = newimg
  
  lbf = newimg    
                        
  lbf[0] = w * 2 * 8  
  lbf[1] = h * 2      


  w_opt = w * 2

  
  For y = 0 To (H - 1)

    For x = 0 To (W - 1)
      

      im_dex = (y_opt + x) + 4
      
      b_opt = y_opt * 4 + x * 2 + 4
      newimglook[b_opt]     =  imglook[im_dex]
      newimglook[b_opt + 1] =  imglook[im_dex]
      
      b_opt +=  w_opt
      newimglook[b_opt]     =  imglook[im_dex]
      newimglook[b_opt + 1] =  imglook[im_dex]

      

     Next x

     y_opt += w

  Next y
  


End Sub
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)