Greetings everyone, I have just started to learn LOVE and I have created a very simple "game" where you must simply press a key corresponding to the key shown. Since I used the arrow keys for this, the key you must press is represented by up, down, left, and right.
As for the questions, does this code look alright, or am I doing something incorrectly that will lead to problems later?
Secondly, I am looking to create a top-down RPG/Card Battle game, would LOVE be suitable for this? (Tried RPGMaker, but ended up wanting to use another engine for this.)
I am uploading the .love file, mainly to see if I created it correctly and so the code may be analyzed.
First little project and general questions about LOVE
First little project and general questions about LOVE
- Attachments
-
- First_Project.love
- (586 Bytes) Downloaded 105 times
Re: First little project and general questions about LOVE
Welcome to our LOVEly family! <3
You can do all of the key checking code in love.keypressed instead of setting a flag and then doing things in update. It is also worth noting that you should use love.math.random as it displays consistent numbers across all platforms (this may be important for some games). Otherwise, you seem to be off to a great start!
LOVE is a very capable engine that can be used to create nearly any style of game. It is also open enough to allow you the freedom that many game makers do not. LOVE is not a game maker, it is a framework to make games. That being said, LOVE would be a great tool to create an RPG or card game.
Good luck!
You can do all of the key checking code in love.keypressed instead of setting a flag and then doing things in update. It is also worth noting that you should use love.math.random as it displays consistent numbers across all platforms (this may be important for some games). Otherwise, you seem to be off to a great start!
LOVE is a very capable engine that can be used to create nearly any style of game. It is also open enough to allow you the freedom that many game makers do not. LOVE is not a game maker, it is a framework to make games. That being said, LOVE would be a great tool to create an RPG or card game.
Good luck!
STI - An awesome Tiled library
LÖVE3D - A 3D library for LÖVE 0.10+
Dev Blog | GitHub | excessive ❤ moé
LÖVE3D - A 3D library for LÖVE 0.10+
Dev Blog | GitHub | excessive ❤ moé
Re: First little project and general questions about LOVE
Thank you for the information, I moved all relevant functions to keypressed, and added a level system. Now I just need to find a way to add the tables so that a higher level has all the keys from the lower levels, and I need to add a timer to the game.
EDIT: I forgot to switch to love.math.random in the file I uploaded, but I did switch to it after uploading it.
EDIT: I forgot to switch to love.math.random in the file I uploaded, but I did switch to it after uploading it.
- Attachments
-
- First_project.love
- (670 Bytes) Downloaded 99 times
Re: First little project and general questions about LOVE
Hey welcome to the community!Tamzaiy wrote:Greetings everyone, I have just started to learn LOVE and I have created a very simple "game" where you must simply press a key corresponding to the key shown. Since I used the arrow keys for this, the key you must press is represented by up, down, left, and right.
As for the questions, does this code look alright, or am I doing something incorrectly that will lead to problems later?
Secondly, I am looking to create a top-down RPG/Card Battle game, would LOVE be suitable for this? (Tried RPGMaker, but ended up wanting to use another engine for this.)
I am uploading the .love file, mainly to see if I created it correctly and so the code may be analyzed.
feedback to your first project: if you want to add some more difficulty to your game I think you should add a some sort of timer so that the player won't have all the time in the world.
You're off to a good start but here's a piece of advice from me:
Like what you did with your first project (I have no idea how vast your programming experience is) start with small projects, maybe some type of games that focuses on different aspects and functions of Löve2D.
And making a rpg might be pouring a little water over yourself (Some might have different opinions about this but this is mine opinion) from what I understand there's a lot of balancing involved so there might be a lot of fine tuning that will take some time to do..
My suggestion would be that you take an old game (like Tetris) and make something that's different to what Tetris normally is and what that can be is up to your imagination.
I will add one of my old projects which is my take on the classical Asteroids but my twist to it.
I hope that I will see more from you!
- Attachments
-
- spacevoider.love
- (169.05 KiB) Downloaded 96 times
Have a good day!
Re: First little project and general questions about LOVE
Ah a project to look at, thanks for sharing! Also about the timer, I do plan on adding one, still tweaking the project (the one I last updated is severely out of date.) I do have a couple of more questions.
About libraries, would it be good to implement libraries in my first few projects? I know they make some things a lot easier but I'm wondering if it might be better to try to do things on my own at first.
Are there any programming practices I should try to avoid now so I don't develop bad habits? I know to stay away from global variables as much as I can, to comment code thoroughly, and to avoid "magic numbers".
I do like the idea of trying to recreate classics and modifying them, I think once I finish this first project I'll work on a vertical side-scrolling shooter.
About libraries, would it be good to implement libraries in my first few projects? I know they make some things a lot easier but I'm wondering if it might be better to try to do things on my own at first.
Are there any programming practices I should try to avoid now so I don't develop bad habits? I know to stay away from global variables as much as I can, to comment code thoroughly, and to avoid "magic numbers".
I do like the idea of trying to recreate classics and modifying them, I think once I finish this first project I'll work on a vertical side-scrolling shooter.
Re: First little project and general questions about LOVE
I'm not very familiar with libraries myself as I have just implemented a type of library myself but my suggestion is to start small and work your way up, don't rush it and try to learn how different functions in Löve works but my suggestion is to start small and work your way up, don't rush it and what do they say? easy does it?Tamzaiy wrote:Ah a project to look at, thanks for sharing! Also about the timer, I do plan on adding one, still tweaking the project (the one I last updated is severely out of date.) I do have a couple of more questions.
About libraries, would it be good to implement libraries in my first few projects? I know they make some things a lot easier but I'm wondering if it might be better to try to do things on my own at first.
Are there any programming practices I should try to avoid now so I don't develop bad habits? I know to stay away from global variables as much as I can, to comment code thoroughly, and to avoid "magic numbers".
I do like the idea of trying to recreate classics and modifying them, I think once I finish this first project I'll work on a vertical side-scrolling shooter.
Some of my learning with Löve
1. From what I learn from my experience with Löve is that always when you write a new function like a:
Code: Select all
function love.draw()
Code: Select all
function love.draw()
end
2. Look up how clean code should look like (preferably about löve/lua as you're working with it), it's good to have a good looking and clean code.
If you write a code so that you understand it that's fine but when you're maybe working in a group project or want someone else to understand it, it's very important that it's clean.
3. If you have encountered a problem with your project and wish to ask the forums (which is always welcome) add your code to your thread (see the code button), It will be easier for others to help you with your problem.
And like I said before make small projects and if you feel a little bit more confident in your abilities then look at a old classic game and redo it.
I have also added a link to books about lua and I suggest that you read the second version of it and If you don't want to buy the actual book of it I'm pretty sure that you can find other means of acquiring it .
http://www.lua.org/pil/
Have a good day!
Re: First little project and general questions about LOVE
Well I just put an end the second after I make the function so I don't forget later, same for parentheses and anything that needs closing. (Unless I interpreted it wrong...?)nice wrote: Some of my learning with Löve
1. From what I learn from my experience with Löve is that always when you write a new function like a:always put a end to it like this:Code: Select all
function love.draw()
That was a bad habit that I had when I was learning that I sometimes forgot to put a "end" to my function which sometimes screwed up my workflow.Code: Select all
function love.draw() end
while true do end;
Re: First little project and general questions about LOVE
That's pretty much what I mean, Back in ye olden times, I had the habit of forgetting to add an "end" statement for my functions, thus my intention for a more "visual" explanation.RonanZero wrote: That was a bad habit that I had when I was learning that I sometimes forgot to put a "end" to
Well I just put an end the second after I make the function so I don't forget later, same for parentheses and anything that needs closing. (Unless I interpreted it wrong...?)
Have a good day!
- Jasoco
- Inner party member
- Posts: 3726
- Joined: Mon Jun 22, 2009 9:35 am
- Location: Pennsylvania, USA
- Contact:
Re: First little project and general questions about LOVE
I use SublimeText which puts the End in automatically when I finish typing the closing parentheses and press return.
- Positive07
- Party member
- Posts: 1014
- Joined: Sun Aug 12, 2012 4:34 pm
- Location: Argentina
Re: First little project and general questions about LOVE
I tried the same with Notepad++ but I'm so used to writing the end after the if and closing parentheses after opening them that I ended with two ends or two parentheses ... so I turned the option off hahahaJasoco wrote:I use SublimeText which puts the End in automatically when I finish typing the closing parentheses and press return.
for i, person in ipairs(everybody) do
[tab]if not person.obey then person:setObey(true) end
end
love.system.openURL(github.com/pablomayobre)
[tab]if not person.obey then person:setObey(true) end
end
love.system.openURL(github.com/pablomayobre)
Who is online
Users browsing this forum: Google [Bot] and 5 guests