Seite 289 von 342 ErsteErste ... 189 239 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 339 ... LetzteLetzte
Zeige Ergebnis 8.641 bis 8.670 von 10238

Lua Programming Help Thread

This is a discussion on Lua Programming Help Thread within the PSP Development Forum forums, part of the PSP Development, Hacks, and Homebrew category; Just throwing it out there, if you are using an old version of luaplayer (<0.20), the "%" operator is not ...

  
  1. #8641
    QJ Gamer Bronze
    Points: 5.381, Level: 47
    Level completed: 16%, Points required for next Level: 169
    Overall activity: 0%

    Registriert seit
    Jul 2006
    Beiträge
    550
    Points
    5.381
    Level
    47
    Downloads
    1
    Uploads
    0

    Standard

    Just throwing it out there, if you are using an old version of luaplayer (<0.20), the "%" operator is not available (they are based on older versions of lua). Use math.mod instead.
    e.g. math.mod(step + 1,6)



  2. #8642
    Lua guy
    Points: 11.690, Level: 71
    Level completed: 10%, Points required for next Level: 360
    Overall activity: 0%

    Registriert seit
    Jan 2008
    Ort
    Wales, cardiff
    Beiträge
    1.442
    Points
    11.690
    Level
    71
    My Mood
    Blah
    Downloads
    0
    Uploads
    0

    Standard

    I have two questions :
    1) if i want an enemy to change direction when it reaches an certain space would i do this;
    Code:
    if Enemy[1].x > 200 then
    Enemy[1].x = Enemy[1].x + 2 
    end
    elseif Enemy[1].x < 100 then 
    Enemy[1].x = Enemy[1].x - 2
    end
    Would something like that work?

    2) This is general but concerns lua.
    How do you become an better Lua programmer? What books, online tuts to read to become better?

  3. #8643
    Developer and Tutor.
    Points: 8.736, Level: 62
    Level completed: 96%, Points required for next Level: 14
    Overall activity: 0%

    Registriert seit
    Jul 2007
    Ort
    Widnes, England
    Beiträge
    1.649
    Points
    8.736
    Level
    62
    My Mood
    Happy
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von dan369
    I have two questions :
    1) if i want an enemy to change direction when it reaches an certain space would i do this;
    Code:
    if Enemy[1].x > 200 then
    Enemy[1].x = Enemy[1].x + 2 
    end
    elseif Enemy[1].x < 100 then 
    Enemy[1].x = Enemy[1].x - 2
    end
    Would something like that work?

    2) This is general but concerns lua.
    How do you become an better Lua programmer? What books, online tuts to read to become better?
    1) yes that would work

    2) you dont become a better lua programmer by reading books or online tutorials, the books and online tutorials just teach you the knowledge, you yoursef have to apply that knowledge to become better

    over time with your programming you will look at sections of your code and think im sure that can be made smaller, so you make a backup copy and test different methods out, if you dont mange to do it in one day then dont just replace it with the old code, leave it but either work on it again a short time later or come back to it after a while, by which stage you will have probably solved the problem for a different project or peice of code, meaning that you should be able to fix it.

    all in all becomming a better programmer is all about coding and trying new things out, when you try new things out you will understand more full where and where not to use certain peices of code, and the method that they are coded in

    basically dan practice makes perfect, keep at it and you will get better.

    i didnt become as skilled as i am now in a month or two.
    ------ FaT3oYCG -----
    AKA Craig, call me what you want to It's your preference.
    My Website: http://www.modern-gamer.co.uk/

    Currently working on:
    (0) MediaGrab
    (0) PGE Gears Of War - On hold (Very large project).
    (0) PS???? -On Hold A tactical 2d side scrolling game involving AI and online multiplayer features. - Tile engine nearley finished (1 bug to fix).

  4. #8644
    Lua guy
    Points: 11.690, Level: 71
    Level completed: 10%, Points required for next Level: 360
    Overall activity: 0%

    Registriert seit
    Jan 2008
    Ort
    Wales, cardiff
    Beiträge
    1.442
    Points
    11.690
    Level
    71
    My Mood
    Blah
    Downloads
    0
    Uploads
    0

    Standard

    Ok, then Thanks Fat :)

  5. #8645
    QJ Gamer Bronze
    Points: 5.381, Level: 47
    Level completed: 16%, Points required for next Level: 169
    Overall activity: 0%

    Registriert seit
    Jul 2006
    Beiträge
    550
    Points
    5.381
    Level
    47
    Downloads
    1
    Uploads
    0

    Standard

    @dan
    Wow, Quadruple Post.

    @Fatboy
    Stop being so conceited, you have a long way to go before you are regarded as "skilled". I've seen you act in such a way a number of times recently, and it really make you come across as immature.
    Geändert von Nielkie (05-27-2008 um 04:52 AM Uhr)

  6. #8646
    Lua guy
    Points: 11.690, Level: 71
    Level completed: 10%, Points required for next Level: 360
    Overall activity: 0%

    Registriert seit
    Jan 2008
    Ort
    Wales, cardiff
    Beiträge
    1.442
    Points
    11.690
    Level
    71
    My Mood
    Blah
    Downloads
    0
    Uploads
    0

    Standard

    My bad the computer froze for a bit so i kept clicking post quick reply sorry

  7. #8647
    Developer and Tutor.
    Points: 8.736, Level: 62
    Level completed: 96%, Points required for next Level: 14
    Overall activity: 0%

    Registriert seit
    Jul 2007
    Ort
    Widnes, England
    Beiträge
    1.649
    Points
    8.736
    Level
    62
    My Mood
    Happy
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von Nielkie
    @Fatboy
    Stop being so conceited, you have a long way to go before you are regarded as "skilled". I've seen you act in such a way a number of times recently, and it really make you come across as immature.
    and that affects my programming skills how ?

    i may be imature at times but what the hey thats just the way i am people need to learn to deal with it or shut up, the people who do deal with it find that i am quite a nice person, the people who dont have outstanding grudges against me which to be honest im not that bothered about.
    ------ FaT3oYCG -----
    AKA Craig, call me what you want to It's your preference.
    My Website: http://www.modern-gamer.co.uk/

    Currently working on:
    (0) MediaGrab
    (0) PGE Gears Of War - On hold (Very large project).
    (0) PS???? -On Hold A tactical 2d side scrolling game involving AI and online multiplayer features. - Tile engine nearley finished (1 bug to fix).

  8. #8648
    Lua guy
    Points: 11.690, Level: 71
    Level completed: 10%, Points required for next Level: 360
    Overall activity: 0%

    Registriert seit
    Jan 2008
    Ort
    Wales, cardiff
    Beiträge
    1.442
    Points
    11.690
    Level
    71
    My Mood
    Blah
    Downloads
    0
    Uploads
    0

    Standard

    Fat IS an skilled programmer, just look at this thread Or the Lua examples/snippets Thread. That one might as well be his lol
    He's helped me and most people in the forum
    -= Double Post =-
    Ok, I'm trying to do 3 selectable difficulties But am having trouble I got 3 drifferent .cfg files with the info but don't know how to do it?

    I was thinking about having it after you press X on start in the menu then having it print: Easy, Medium, Hard changing colour on each one. Then you press X on anyone of them But i don't really want 3 drifferent files holding the difficultly So could someone maybe tell me how to do it?
    Geändert von dan369 (05-27-2008 um 11:36 AM Uhr) Grund: Automerged Doublepost

  9. #8649
    QJ Gamer Silver
    Points: 10.263, Level: 67
    Level completed: 54%, Points required for next Level: 187
    Overall activity: 0%

    Registriert seit
    Jun 2006
    Ort
    UK
    Beiträge
    2.326
    Points
    10.263
    Level
    67
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von dan369
    2) This is general but concerns lua.
    How do you become an better Lua programmer? What books, online tuts to read to become better?
    You become a better Lua programmer by becoming a better programmer. You don't become better overnight, it takes constant learning and practise to accumulate experience over a period of time.

    A good book to read would be Code Complete 2nd Edition.
    http://cc2e.com/

  10. #8650
    Lua guy
    Points: 11.690, Level: 71
    Level completed: 10%, Points required for next Level: 360
    Overall activity: 0%

    Registriert seit
    Jan 2008
    Ort
    Wales, cardiff
    Beiträge
    1.442
    Points
    11.690
    Level
    71
    My Mood
    Blah
    Downloads
    0
    Uploads
    0

    Standard

    Ok, thanks I'm also reading an book about lua itself, then after understanding lua really well i'll try C/C++

  11. #8651
    Developer and Tutor.
    Points: 8.736, Level: 62
    Level completed: 96%, Points required for next Level: 14
    Overall activity: 0%

    Registriert seit
    Jul 2007
    Ort
    Widnes, England
    Beiträge
    1.649
    Points
    8.736
    Level
    62
    My Mood
    Happy
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von dan369
    Ok, I'm trying to do 3 selectable difficulties But am having trouble I got 3 drifferent .cfg files with the info but don't know how to do it?

    I was thinking about having it after you press X on start in the menu then having it print: Easy, Medium, Hard changing colour on each one. Then you press X on anyone of them But i don't really want 3 drifferent files holding the difficultly So could someone maybe tell me how to do it?
    as i said you need the functions that i have made for the saving and loading of a config file, when i have made it a proper function and made it as small as it can be ill post it on my site and tell you so you can take a look
    ------ FaT3oYCG -----
    AKA Craig, call me what you want to It's your preference.
    My Website: http://www.modern-gamer.co.uk/

    Currently working on:
    (0) MediaGrab
    (0) PGE Gears Of War - On hold (Very large project).
    (0) PS???? -On Hold A tactical 2d side scrolling game involving AI and online multiplayer features. - Tile engine nearley finished (1 bug to fix).

  12. #8652
    Lua guy
    Points: 11.690, Level: 71
    Level completed: 10%, Points required for next Level: 360
    Overall activity: 0%

    Registriert seit
    Jan 2008
    Ort
    Wales, cardiff
    Beiträge
    1.442
    Points
    11.690
    Level
    71
    My Mood
    Blah
    Downloads
    0
    Uploads
    0

    Standard

    I got the Menu part Set up moving left and right Simply But the loading is quiet hard because i'm not strong with reading/writing to files i know the basics but not advanced stuff

  13. #8653
    Developer and Tutor.
    Points: 8.736, Level: 62
    Level completed: 96%, Points required for next Level: 14
    Overall activity: 0%

    Registriert seit
    Jul 2007
    Ort
    Widnes, England
    Beiträge
    1.649
    Points
    8.736
    Level
    62
    My Mood
    Happy
    Downloads
    0
    Uploads
    0

    Standard

    hey dan those examples are up on my site, you know which ones to click on
    ------ FaT3oYCG -----
    AKA Craig, call me what you want to It's your preference.
    My Website: http://www.modern-gamer.co.uk/

    Currently working on:
    (0) MediaGrab
    (0) PGE Gears Of War - On hold (Very large project).
    (0) PS???? -On Hold A tactical 2d side scrolling game involving AI and online multiplayer features. - Tile engine nearley finished (1 bug to fix).

  14. #8654
    Lua guy
    Points: 11.690, Level: 71
    Level completed: 10%, Points required for next Level: 360
    Overall activity: 0%

    Registriert seit
    Jan 2008
    Ort
    Wales, cardiff
    Beiträge
    1.442
    Points
    11.690
    Level
    71
    My Mood
    Blah
    Downloads
    0
    Uploads
    0

    Standard

    Wow that was quick Thanks Fat will help me and loads off people
    Off topic: Fat is it possible for your site to have an mini-forum? that would be cool i'd register :)

  15. #8655
    Developer and Tutor.
    Points: 8.736, Level: 62
    Level completed: 96%, Points required for next Level: 14
    Overall activity: 0%

    Registriert seit
    Jul 2007
    Ort
    Widnes, England
    Beiträge
    1.649
    Points
    8.736
    Level
    62
    My Mood
    Happy
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von dan369
    Wow that was quick Thanks Fat will help me and loads off people
    yeah i know how to do it i just couldnt be bothered to code it earlier when i mentioned it

    Zitat Zitat von dan369
    Off topic: Fat is it possible for your site to have an mini-forum? that would be cool i'd register :)
    probably but im not quite sure that i need one, if you make a petition and get 50 + people to sign it that will use the forums if i put some up then ill make some
    ------ FaT3oYCG -----
    AKA Craig, call me what you want to It's your preference.
    My Website: http://www.modern-gamer.co.uk/

    Currently working on:
    (0) MediaGrab
    (0) PGE Gears Of War - On hold (Very large project).
    (0) PS???? -On Hold A tactical 2d side scrolling game involving AI and online multiplayer features. - Tile engine nearley finished (1 bug to fix).

  16. #8656
    Lua guy
    Points: 11.690, Level: 71
    Level completed: 10%, Points required for next Level: 360
    Overall activity: 0%

    Registriert seit
    Jan 2008
    Ort
    Wales, cardiff
    Beiträge
    1.442
    Points
    11.690
    Level
    71
    My Mood
    Blah
    Downloads
    0
    Uploads
    0

    Standard

    How do you make an petition? Does my name count?

  17. #8657
    QJ Gamer Platinum
    Points: 66.627, Level: 100
    Level completed: 0%, Points required for next Level: 0
    Overall activity: 0%

    Registriert seit
    Feb 2006
    Ort
    National Front Disco
    Beiträge
    13.057
    Points
    66.627
    Level
    100
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von dan369
    How do you make an petition? Does my name count?
    We don't allow petitions on this forum, so it would have to be private.

  18. #8658
    QJ Gamer Blue
    Points: 4.268, Level: 41
    Level completed: 59%, Points required for next Level: 82
    Overall activity: 0%

    Registriert seit
    Apr 2008
    Beiträge
    497
    Points
    4.268
    Level
    41
    Downloads
    0
    Uploads
    0

    Standard

    Hey, how would I code bliting only a section of a sprite sheet so I don't have to make 54 seperate images?? thanx

  19. #8659
    Developer and Tutor.
    Points: 8.736, Level: 62
    Level completed: 96%, Points required for next Level: 14
    Overall activity: 0%

    Registriert seit
    Jul 2007
    Ort
    Widnes, England
    Beiträge
    1.649
    Points
    8.736
    Level
    62
    My Mood
    Happy
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von PSProgramer
    Hey, how would I code bliting only a section of a sprite sheet so I don't have to make 54 seperate images?? thanx
    here i dont know if these are any good but i just found them in one of my folders entitled "sprite crap"

    Code:
    white = Color.new(255, 255, 255)
    
    number = 0
    tile_width = 32
    tile_height = 32
    tile_image = Image.load("tiles.png")
    tiles = { }
    
    oldpad = Controls.read()
    
    while true do
    
    pad = Controls.read()
    
    screen:clear()
    
    -- insert your main code here
    
    if pad:left() and not oldpad:left() then
    number = number + 1
    end
    
    if number >= 9 then
    number = 0
    end
    
    screen:blit(10, 10, tile_image, 32 * number, 0, 32, 32)
    
    -- insert your main code here
    
    if Controls.read():start() then
    	break
    end
    
    oldpad = pad
    
    screen.flip()
    screen.waitVblankStart()
    
    end
    Code:
    white = Color.new(255, 255, 255)
    
    number = 0
    tile_width = 32
    tile_height = 32
    tile_image = Image.load("tiles.png")
    tiles = { }
    
    oldpad = Controls.read()
    
    while true do
    
    pad = Controls.read()
    
    screen:clear()
    
    -- insert your main code here
    
    number = number + 1
    
    if number >= 9 then
    number = 0
    end
    
    screen:blit(10, 10, tile_image, 32 * number, 0, 32, 32)
    screen.waitVblankStart(60)
    
    -- insert your main code here
    
    if Controls.read():start() then
    	break
    end
    
    oldpad = pad
    
    screen.flip()
    screen.waitVblankStart()
    
    end
    Code:
    white = Color.new(255, 255, 255)
    
    collumn = 0
    row = 0
    tile_width = 32
    tile_height = 32
    tile_image = Image.load("tilesb.png")
    tiles = { }
    
    oldpad = Controls.read()
    
    while true do
    
    pad = Controls.read()
    
    screen:clear()
    
    -- insert your main code here
    
    if pad:left() and not oldpad:left() then
    collumn = collumn + 1
    end
    
    if collumn >= 3 then
    collumn = 0
    row = row + 1
    end
    
    if row >= 3 then
    row = 0
    end
    
    screen:blit(10, 10, tile_image, 32 * collumn, 32 * row, 32, 32)
    
    -- insert your main code here
    
    if Controls.read():start() then
    	break
    end
    
    oldpad = pad
    
    screen.flip()
    screen.waitVblankStart()
    
    end
    ------ FaT3oYCG -----
    AKA Craig, call me what you want to It's your preference.
    My Website: http://www.modern-gamer.co.uk/

    Currently working on:
    (0) MediaGrab
    (0) PGE Gears Of War - On hold (Very large project).
    (0) PS???? -On Hold A tactical 2d side scrolling game involving AI and online multiplayer features. - Tile engine nearley finished (1 bug to fix).

  20. #8660
    QJ Gamer Blue
    Points: 4.268, Level: 41
    Level completed: 59%, Points required for next Level: 82
    Overall activity: 0%

    Registriert seit
    Apr 2008
    Beiträge
    497
    Points
    4.268
    Level
    41
    Downloads
    0
    Uploads
    0

    Standard

    thanx, glad to put use to your "sprite crap" by the way did you get my P.M.??

  21. #8661
    QJ Gamer Green
    Points: 3.721, Level: 38
    Level completed: 48%, Points required for next Level: 79
    Overall activity: 0%

    Registriert seit
    Jan 2008
    Beiträge
    612
    Points
    3.721
    Level
    38
    Downloads
    0
    Uploads
    0

    Standard

    screen:blit(x,y,spriteshe etimage,topleftcornerofse ctionofspritesheetyouwant toblitx, topleftcornerofsectionofs pritesheetyouwanttoblity, bottomrightcornerofsectio nofspritesheetyouwanttobl itx, bottomrightcornerofsectio nofspritesheetyouwanttobl ity)

  22. #8662
    Developer and Tutor.
    Points: 8.736, Level: 62
    Level completed: 96%, Points required for next Level: 14
    Overall activity: 0%

    Registriert seit
    Jul 2007
    Ort
    Widnes, England
    Beiträge
    1.649
    Points
    8.736
    Level
    62
    My Mood
    Happy
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von PSProgramer
    thanx, glad to put use to your "sprite crap" by the way did you get my P.M.??
    yeah ill take a look when i get time im busy doing a few things this week

    and put simply

    Code:
    screen:blit(xpos to blit, ypos to blit, full image to use, x start position for tile, y start position for tile, width of tile, height of tile)
    tile is another word for sprite
    ------ FaT3oYCG -----
    AKA Craig, call me what you want to It's your preference.
    My Website: http://www.modern-gamer.co.uk/

    Currently working on:
    (0) MediaGrab
    (0) PGE Gears Of War - On hold (Very large project).
    (0) PS???? -On Hold A tactical 2d side scrolling game involving AI and online multiplayer features. - Tile engine nearley finished (1 bug to fix).

  23. #8663
    QJ Gamer Blue
    Points: 4.268, Level: 41
    Level completed: 59%, Points required for next Level: 82
    Overall activity: 0%

    Registriert seit
    Apr 2008
    Beiträge
    497
    Points
    4.268
    Level
    41
    Downloads
    0
    Uploads
    0

    Standard

    thank you very much, that helps alot. Makes it way easier, and way more efficient!!! thank you!!

  24. #8664
    Lua guy
    Points: 11.690, Level: 71
    Level completed: 10%, Points required for next Level: 360
    Overall activity: 0%

    Registriert seit
    Jan 2008
    Ort
    Wales, cardiff
    Beiträge
    1.442
    Points
    11.690
    Level
    71
    My Mood
    Blah
    Downloads
    0
    Uploads
    0

    Standard

    I want to do some type of online highscore system, But don't have a clue how to do this? would i have do make an webpage or sumthing?
    My Plan: Have an system that loads your score using "r" (reading&writing functions) Then connecting to somewhere then you enter an name and it Places you in the right place? Is that possible????

  25. #8665
    Developer and Tutor.
    Points: 8.736, Level: 62
    Level completed: 96%, Points required for next Level: 14
    Overall activity: 0%

    Registriert seit
    Jul 2007
    Ort
    Widnes, England
    Beiträge
    1.649
    Points
    8.736
    Level
    62
    My Mood
    Happy
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von dan369
    I want to do some type of online highscore system, But don't have a clue how to do this? would i have do make an webpage or sumthing?
    My Plan: Have an system that loads your score using "r" (reading&writing functions) Then connecting to somewhere then you enter an name and it Places you in the right place? Is that possible????
    with your own server and sql databse to manage it yes
    ------ FaT3oYCG -----
    AKA Craig, call me what you want to It's your preference.
    My Website: http://www.modern-gamer.co.uk/

    Currently working on:
    (0) MediaGrab
    (0) PGE Gears Of War - On hold (Very large project).
    (0) PS???? -On Hold A tactical 2d side scrolling game involving AI and online multiplayer features. - Tile engine nearley finished (1 bug to fix).

  26. #8666
    QJ Gamer Green
    Points: 3.721, Level: 38
    Level completed: 48%, Points required for next Level: 79
    Overall activity: 0%

    Registriert seit
    Jan 2008
    Beiträge
    612
    Points
    3.721
    Level
    38
    Downloads
    0
    Uploads
    0

    Standard

    You don't need an SQL DB for a list of scores, but yes, you need some server side scripting and a webserver as well as some good lua online backend stuff.

  27. #8667
    Points: 2.480, Level: 30
    Level completed: 20%, Points required for next Level: 120
    Overall activity: 0%
    Achievements:
    First 1000 Experience Points

    Registriert seit
    May 2008
    Beiträge
    1
    Points
    2.480
    Level
    30
    Downloads
    0
    Uploads
    0

    Standard a little help from my friends

    Hi everyone!
    this is my first post here at qj and i wondered if someone can help me im having some trouble making my game which is tile based, so far i have been using this code as a base for mine i got it from http://wiki.ps2dev.org/psp:lua_player:tutorial

    -- load graphics
    tiles = Image.load("tiles.png")
    figure = Image.load("figure.png")

    -- the map
    mapSource = {
    "mmmmmmmmmmmmmmmmmmmmmmmm mmmmmm",
    "mmmmmmmmmmmmmmmmmmmmmmmm mmmmmm",
    "mmeaaaaaaaaaaaaaaaaaaaaa aaafmm",
    "mmdpnnnnnnnnnnnnnnnnnnnn nnpbmm",
    "mmdokcccccclnkcccccccccc clnbmm",
    "mmdojaaaaafdnbmmmmmmmmmm mdnbmm",
    "mmdooooooobdnbmmmmmmmmmm mdnbmm",
    "mmdokccclobdnbmmmmmmmmmm mdnbmm",
    "mmdobmmmdobdnbmmmmmmmmmm mdnbmm",
    "mmdobmmmdobdnjaaaaaaaaaa fdnbmm",
    "mmdobmmmdpbdnnnnnnnnnnnn bdnbmm",
    "mmdobmmmhcghccccccccccln bdnbmm",
    "mmdojaaaaaaaaaaaaaaaaain jinbmm",
    "mmdpnnnnnnnnnnnnnnnnnnnn nnpbmm",
    "mmhccccccccccccccccccccc cccgmm",
    "mmmmmmmmmmmmmmmmmmmmmmmm mmmmmm",
    "mmmmmmmmmmmmmmmmmmmmmmmm mmmmmm"
    }

    -- offsreen image, where the map will be drawn
    board = Image.createEmpty(480, 272)

    -- draw one tile on the map
    function drawTile(tile, x, y)
    tile = string.byte(tile, 1) - string.byte("a")
    local tileX = math.mod(tile, 4)
    local tileY = math.floor(tile / 4)
    board:blit(16 * x, 16 * y, tiles, 17 * tileX + 1, 17 * tileY + 1, 16, 16, false)
    end

    -- copy the map source to an array for easier access and draw the offscreen board
    map = {}
    for y = 1, 17 do
    line = mapSource[y]
    map[y] = {}
    for x = 1, 30 do
    tile = string.sub(line, x, x)
    map[y][x] = tile
    drawTile(tile, x - 1, y - 1)
    end
    end



    Now i want to use a tileset that it has a total of 64 tiles each tile of 16px by 16px in 8 colums and 8 rows now i cant figure how to number the tiles i have been planning using "aa ab ac ad af" ("aa" beign one tile) etc but i cant figure how to make this code

    tile = string.sub(line, x, x)

    so it can read the first two characters and then the next two and so on and so forth of each row and then adjust this so it works with the one above

    tile = string.byte(tile, 1) - string.byte("a")

    well in general how to change the code so it work with the tileset i would like to use
    Or if you have a better sugestion on how to do this please i would really appreciate your help

  28. #8668
    Lua guy
    Points: 11.690, Level: 71
    Level completed: 10%, Points required for next Level: 360
    Overall activity: 0%

    Registriert seit
    Jan 2008
    Ort
    Wales, cardiff
    Beiträge
    1.442
    Points
    11.690
    Level
    71
    My Mood
    Blah
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von TurtlesPwn
    You don't need an SQL DB for a list of scores, but yes, you need some server side scripting and a webserver as well as some good lua online backend stuff.
    So how do i start to do this?

  29. #8669
    Developer and Tutor.
    Points: 8.736, Level: 62
    Level completed: 96%, Points required for next Level: 14
    Overall activity: 0%

    Registriert seit
    Jul 2007
    Ort
    Widnes, England
    Beiträge
    1.649
    Points
    8.736
    Level
    62
    My Mood
    Happy
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von dan369
    So how do i start to do this?
    get your own website
    ------ FaT3oYCG -----
    AKA Craig, call me what you want to It's your preference.
    My Website: http://www.modern-gamer.co.uk/

    Currently working on:
    (0) MediaGrab
    (0) PGE Gears Of War - On hold (Very large project).
    (0) PS???? -On Hold A tactical 2d side scrolling game involving AI and online multiplayer features. - Tile engine nearley finished (1 bug to fix).

  30. #8670
    Lua guy
    Points: 11.690, Level: 71
    Level completed: 10%, Points required for next Level: 360
    Overall activity: 0%

    Registriert seit
    Jan 2008
    Ort
    Wales, cardiff
    Beiträge
    1.442
    Points
    11.690
    Level
    71
    My Mood
    Blah
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von FaT3oYCG
    get your own website
    Any suggestions? Though will it be free? If so any good free website places? Then i get the website What do you do after that?


 

Tags for this Thread

Forumregeln

  • Es ist Ihnen nicht erlaubt, neue Themen zu verfassen.
  • Es ist Ihnen nicht erlaubt, auf Beiträge zu antworten.
  • Es ist Ihnen nicht erlaubt, Anhänge hochzuladen.
  • Es ist Ihnen nicht erlaubt, Ihre Beiträge zu bearbeiten.
  •  





Alle Zeitangaben in WEZ -8. Es ist jetzt 07:54 AM Uhr.

Use of this Web site constitutes acceptance of the TERMS & CONDITIONS and PRIVACY POLICY
Copyright © , Caputo Media, LLC. All Rights Reserved. Cluster .