Platformer X™
Platformer X™
Platformer X
Last edited by Banoticus on Tue Aug 21, 2012 1:51 pm, edited 10 times in total.
Re: Platformer X
Screenshot:
PM me on here or elsewhere if you'd like to discuss porting your game to Nintendo Switch via mazette!
personal page and a raycaster
personal page and a raycaster
Re: Platformer X v.0.0002
I am having a bit of trouble with collisions. Can anybody help me.
Here is the next version of the game in the screenshot above.
Here is the next version of the game in the screenshot above.
Last edited by Banoticus on Sat Apr 28, 2012 6:29 am, edited 1 time in total.
Re: Platformer X
Hi Banoticus,
great to see you guys working on a game.
I've got some words I would like to share with you :
May you should learn first a bit about the engine before do big plans like release the game on steam or/and Desura.
This game could be a great way to learn everything you need to code with Löve I think.
May you try to set up some system for developing your game like this:
1. Planning your game
2. Create some simple artwork / Layout plans
3. Write the code / do the graphics etc.
4. Bugfixes etc.
If you plan the game first, you can do everything else much faster after the planning phase.
Also for team development, for example it's better to give the guy how do the graphics some kind of script, so the guy
could start more efficiently draw some stuff for the programmer to implement.
Collision trouble:
The easiest way to implement some box collisions was to compare positions of two objects.
Here some code (not by me btw):
This check if a calculated box overlapping a second box.
Try it or do some math on your own.
p.s sorry for the bad english.
EDIT: oh and I forgot some things. Your packages ( the downloads ) was packed wrong . You have to select all game items and dir's (main.lua, gfx-dir etc) and pack it as a zip file. to get a .love file you have to change the ".zip" to ".love". (for Windows)
You could find everything you need for pack it correct here: https://love2d.org/wiki/Getting_Started
greets
great to see you guys working on a game.
I've got some words I would like to share with you :
May you should learn first a bit about the engine before do big plans like release the game on steam or/and Desura.
This game could be a great way to learn everything you need to code with Löve I think.
May you try to set up some system for developing your game like this:
1. Planning your game
2. Create some simple artwork / Layout plans
3. Write the code / do the graphics etc.
4. Bugfixes etc.
If you plan the game first, you can do everything else much faster after the planning phase.
Also for team development, for example it's better to give the guy how do the graphics some kind of script, so the guy
could start more efficiently draw some stuff for the programmer to implement.
Collision trouble:
The easiest way to implement some box collisions was to compare positions of two objects.
Here some code (not by me btw):
Code: Select all
if pos.x > rect.x and pos.x < rect.x + rect.w and pos.y > rect.y and pos.y < rect.y + rect.h then
return
true
else
return
false
end
Try it or do some math on your own.
p.s sorry for the bad english.
EDIT: oh and I forgot some things. Your packages ( the downloads ) was packed wrong . You have to select all game items and dir's (main.lua, gfx-dir etc) and pack it as a zip file. to get a .love file you have to change the ".zip" to ".love". (for Windows)
You could find everything you need for pack it correct here: https://love2d.org/wiki/Getting_Started
greets
Re: Platformer X
K, thanks for the quick reply, but this is what a reaaaaaalllyyyyy don't like: people saying you should do that or this or I don't think your game is ready to release on Desura.
PS Sorry I am very tired.
PS Sorry I am very tired.
PM me on here or elsewhere if you'd like to discuss porting your game to Nintendo Switch via mazette!
personal page and a raycaster
personal page and a raycaster
Re: Platformer X
(edited)
You're right.I accept this opinion.
Take it as some wise words from a guy who like to help you.
Take it easy.
You're right.I accept this opinion.
Take it as some wise words from a guy who like to help you.
Take it easy.
Re: Platformer X
Thanks for the code.
I am sorry if davidobot is a bit grumpy. The best thing to do is just ignore him a and he'll get over it.
P.S. Can you please give me the name of your website.
I am sorry if davidobot is a bit grumpy. The best thing to do is just ignore him a and he'll get over it.
P.S. Can you please give me the name of your website.
Last edited by Banoticus on Sat Apr 28, 2012 6:29 am, edited 1 time in total.
- mikaldinho95
- Prole
- Posts: 8
- Joined: Sun Apr 22, 2012 7:42 pm
- Location: Planet Earth
- Contact:
Re: Platformer X
Looks promising enough, can't wait to see more!
Re: Platformer X collisions
I am having some trouble with collisions can anybody help please.
The problem is the guy is stuck in the air and can't move.
Can you also tell me what i did wrong please. EDIT: sorry i add proper file now ⇪
The problem is the guy is stuck in the air and can't move.
Can you also tell me what i did wrong please. EDIT: sorry i add proper file now ⇪
Re: Platformer X
Yo! looked through your code and addes some notes of what could be the problem...
Code: Select all
function love.update(dt)
fps = love.timer.getFPS()
--**if player.x > 1000 and player.x < 1000 + 32 and player.y > 500 and player.y < 500 + 32 then = makes your collision a 32x32 square... try just player.y > rect.y **
if player.x > rect.x and player.x < rect.x + rect.w and player.y > rect.y and player.y < rect.y + rect.h then
player.collision = true
return true --** this returns (exits) love.update(dt) function as you are not in any other function... remove this**
else
return false -- ** use player.collision = true instead**
end
frame = dt * 30 -- I do this just because I think better this way
player.ySpeed = player.ySpeed + player.gravSecond * frame -- We add gravity to the ySpeed
player.y = player.y + player.ySpeed * frame -- We add ySpeed to the player's y position -- ** should be down at -->>
if player.collision then -- Are we on the ground?
player.y = player.y - player.ySpeed * frame -- If we are, We undo that moving down
player.ySpeed = 0 -- The ySpeed is reset --** you should have this before player.y = ...
player.inAir = false
end-- ** and add an else -->> end instead
if love.keyboard.isDown("right") then
player.x= player.x+5
end
if love.keyboard.isDown("left") then
player.x= player.x-5
end
end
Who is online
Users browsing this forum: No registered users and 3 guests