Speedran the tutorial to get my head around the basics; super easy to follow and light enough that I didn't feel like I had to skip a bunch of stuff as an experienced software dev. Truly well-focused course. Cheers!
Added this to the top down game you had us build and wow, music and sound really adds so much to the game! Love it! I mean it would seem obvious, but during the build process I wasn't expecting such a noticeable impact so early in the game development of this little top down game.
Thanks for making this whole series thingy, i just watched the whole playlist, and its already better (performance and readability imo) than the "engine" i was using before, called pygame lol.
are you gonna make more tutorials like adding items and monsters? i know you are working on your zelda like game but when you get done with that i would love to see more tutorials on how to implement more things
im gonna make a mobile game where you spam click to launch a rocket and dodge obstacles. are there any other resources you think would help? (im doing it as a challenge to see if unity 2d or love2d are better for mobile games.)
Thanks for the great tutorials. I added some coins for my kid to collect. At the end of the game I want to zoom out and display the whole map. I cant find anyway of doing this ... can you help?
Thanks very much for this tutorial it have benefited me so much. I try to put this game with button so that when start game is clicked the game will run but a problem face me is that the collider is the only thing is running in screen without graphics(trees, ground, sprite). if you can just help me Code: function newButton(text,fn) return {text=text,fn=fn,now=false,last=false} end local buttons={} local font=nil function love.load() wf=require 'libraries/windfield' world=wf.newWorld(0, 0) camera=require 'libraries/camera' cam=camera() anim8 = require 'libraries/anim8' love.graphics.setDefaultFilter('nearest','nearest') sti=require 'libraries/sti' gameMap=sti('maps/testMap.lua') sounds={} sounds.blip=love.audio.newSource('sounds/blip.wav','static') sounds.music=love.audio.newSource('sounds/music.mp3','stream') sounds.music:setLooping(true) sounds.music:setVolume(100) sounds.music:play() player={} player.collider=world:newBSGRectangleCollider(400, 250, 50, 100, 10) player.collider:setFixedRotation(true) player.x=400 player.y=200 player.speed=300 player.sprite = love.graphics.newImage('sprites/parrot.png') player.spriteSheet=love.graphics.newImage('sprites/player-sheet.png') player.grid=anim8.newGrid(12,18,player.spriteSheet:getWidth(),player.spriteSheet:getHeight()) player.animations= {} player.animations.down=anim8.newAnimation(player.grid('1-4',1),0.2) player.animations.left=anim8.newAnimation(player.grid('1-4',2),0.2) player.animations.right=anim8.newAnimation(player.grid('1-4',3),0.2) player.animations.up=anim8.newAnimation(player.grid('1-4',4),0.2) player.anim=player.animations.right background=love.graphics.newImage('sprites/background.png') walls={} if gameMap.layers['Walls'] then for i,obj in pairs(gameMap.layers['Walls'].objects) do local wall=world:newRectangleCollider(obj.x,obj.y,obj.width,obj.height) wall:setType('static') table.insert(walls,wall) end end font=love.graphics.newFont(16) table.insert(buttons,newButton('Start Game', function() function love.update(dt) local isMove=false local vx=0 local vy=0 if love.keyboard.isDown('right') then vx=player.speed player.anim=player.animations.right sounds.blip:play() isMove=true end if love.keyboard.isDown('left') then vx=player.speed * -1 player.anim=player.animations.left sounds.blip:play() isMove=true end if love.keyboard.isDown('down') then vy=player.speed player.anim=player.animations.down sounds.blip:play() isMove=true end if love.keyboard.isDown('up') then vy=player.speed * -1 player.anim=player.animations.up sounds.blip:play() isMove=true end player.collider:setLinearVelocity(vx,vy) if isMove==false then player.anim:gotoFrame(2) end world:update(dt) player.x=player.collider:getX() player.y=player.collider:getY() player.anim:update(dt) cam:lookAt(player.x,player.y) local w=love.graphics.getWidth() local h=love.graphics.getHeight() if cam.x < w/2 then cam.x = w/2 end if cam.y < h/2 then cam.y = h/2 end local mapW=gameMap.width * gameMap.tilewidth local mapH=gameMap.height * gameMap.tileheight if cam.x >(mapW - w/2) then cam.x = (mapW-w/2) end if cam.y >(mapH - h/2) then cam.y = (mapH-h/2) end end function love.draw() cam:attach() gameMap:drawLayer(gameMap.layers['Ground']) gameMap:drawLayer(gameMap.layers['Trees']) player.anim:draw(player.spriteSheet,player.x,player.y,nil,6,nil,6,9) world:draw() cam:detach() end end)) table.insert(buttons,newButton('Load Game', function() print('Loading Game') end)) table.insert(buttons,newButton('Settings', function() print('go to Settings menu') end)) table.insert(buttons,newButton('Exit', function() love.event.quit(0) end)) end function love.draw() local ww=love.graphics.getWidth() local wh=love.graphics.getHeight() local button_width=ww*(1/3) local BUTTON_HEIGHT=wh*(1/14) local margin=16 local total_height=(BUTTON_HEIGHT + margin) * #buttons local cursor_y=0 for i,button in ipairs(buttons) do button.last=button.now local bx=(ww *0.5)-(button_width * 0.5) local by=(wh *0.5) - (total_height * 0.5) + cursor_y local color={0.4,0.4,0.5,1.0} local mx,my=love.mouse.getPosition() local hot=mx>bx and mxby and my