Search found 7 matches

by JaquesEdrillavo
Thu May 01, 2014 2:08 am
Forum: Libraries and Tools
Topic: stateful.lua
Replies: 88
Views: 55816

Re: stateful.lua

Then Game can be defined as a class inside Game.lua, and have a Menu state, a Play state, and so on. Here's how you would create a Game with a Menu state: -- game.lua Game = class("Game"):include(Stateful) function Game:initialize() self.image = love.graphics.newImage("image.jpg"...
by JaquesEdrillavo
Wed Apr 30, 2014 10:49 pm
Forum: Support and Development
Topic: HELP! GameStates from scratch. (Intro > Menu > Game)
Replies: 7
Views: 3159

Re: HELP! GameStates from scratch. (Intro > Menu > Game)

Hey! Hope someone can help him, since it is something it's been bothering me for a while. Also, I don't know about this but, you used TitleScreen in your introstate.lua, but you tried to call it "Intro" in main.lua, which is not defined nowhere in the introstate.lua Again, Im new, but I'm ...
by JaquesEdrillavo
Fri Apr 25, 2014 10:02 pm
Forum: Support and Development
Topic: Enemy AI or CPU
Replies: 1
Views: 1205

Enemy AI or CPU

Hi everyone.

I keep looking but I can't find anything related, but: Does LÖVE support Enemy AI, or CPU player?
I was hoping someone could give me some pointers on this.

Thank you!
by JaquesEdrillavo
Sat Apr 12, 2014 7:32 pm
Forum: Support and Development
Topic: Fixed Movement For Cursor
Replies: 7
Views: 3442

Re: Fixed Movement For Cursor

A short hint: [wiki]love.keyboard.isDown[/wiki] called in love.update. I've been trying to calculate in love.update an equation that calculates the whole player.move but with no avail. I apologize, but I'm quite new with Löve, and inspite its easy coding, I still find difficult to make things work....
by JaquesEdrillavo
Thu Apr 10, 2014 8:40 pm
Forum: Support and Development
Topic: Fixed Movement For Cursor
Replies: 7
Views: 3442

Re: Fixed Movement For Cursor

Hi, The first thing that came to mind is that you could move the player right whenever the "right" key is tapped - but I assume you want to keep pressing the button and want the player to move at a constant speed? If you want "jumping" movement, this is how I'd do it: Just modif...
by JaquesEdrillavo
Thu Apr 10, 2014 12:56 am
Forum: Support and Development
Topic: Fixed Movement For Cursor
Replies: 7
Views: 3442

Re: Fixed Movement For Cursor

Hi, welcometo the forums! If I understand correctly, you want to draw something (a cursor) depending on where the mouse pointer is, but fixed to a grid. I wrote a quick example of how to do that: local cursorX, cursorY local GRID_SIZE = 30 function love.load() -- love.mouse.setVisible(false) end fu...
by JaquesEdrillavo
Wed Apr 09, 2014 3:28 am
Forum: Support and Development
Topic: Fixed Movement For Cursor
Replies: 7
Views: 3442

Fixed Movement For Cursor

Hey, new guy here. Im trying to figure it out the movement for a cursor for game Im making. What I want is the cursor to move in a grid like manner (or a fixed number of pixels). At this moment, I got the cursor to stop with a little momentum, but I can't figure it out. Does anyone have idea how to ...