Platformer X™

Show off your games, demos and other (playable) creations.
User avatar
Banoticus
Citizen
Posts: 60
Joined: Wed Apr 04, 2012 4:01 pm
Location: London

Platformer X™

Post by Banoticus »

Platformer X
Last edited by Banoticus on Tue Aug 21, 2012 1:51 pm, edited 10 times in total.
User avatar
Davidobot
Party member
Posts: 1226
Joined: Sat Mar 31, 2012 5:18 am
Location: Oxford, UK
Contact:

Re: Platformer X

Post by Davidobot »

Screenshot:
Image
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
User avatar
Banoticus
Citizen
Posts: 60
Joined: Wed Apr 04, 2012 4:01 pm
Location: London

Re: Platformer X v.0.0002

Post by Banoticus »

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.
Platformer X.love.zip
v.0.0002
(8.07 KiB) Downloaded 426 times
Last edited by Banoticus on Sat Apr 28, 2012 6:29 am, edited 1 time in total.
User avatar
Larsii30
Party member
Posts: 267
Joined: Sun Sep 11, 2011 9:36 am
Location: Germany

Re: Platformer X

Post by Larsii30 »

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):

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
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
User avatar
Davidobot
Party member
Posts: 1226
Joined: Sat Mar 31, 2012 5:18 am
Location: Oxford, UK
Contact:

Re: Platformer X

Post by Davidobot »

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.
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
User avatar
Larsii30
Party member
Posts: 267
Joined: Sun Sep 11, 2011 9:36 am
Location: Germany

Re: Platformer X

Post by Larsii30 »

(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.
User avatar
Banoticus
Citizen
Posts: 60
Joined: Wed Apr 04, 2012 4:01 pm
Location: London

Re: Platformer X

Post by Banoticus »

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.
Last edited by Banoticus on Sat Apr 28, 2012 6:29 am, edited 1 time in total.
User avatar
mikaldinho95
Prole
Posts: 8
Joined: Sun Apr 22, 2012 7:42 pm
Location: Planet Earth
Contact:

Re: Platformer X

Post by mikaldinho95 »

Looks promising enough, can't wait to see more!
-Mikaldinho95

Check out my website!
User avatar
Banoticus
Citizen
Posts: 60
Joined: Wed Apr 04, 2012 4:01 pm
Location: London

Re: Platformer X collisions

Post by Banoticus »

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. :ehem:
Can you also tell me what i did wrong please.
Platformer X.love.zip
almost v.0.0003
(8.36 MiB) Downloaded 305 times
EDIT: sorry i add proper file now ⇪
Zeliarden
Party member
Posts: 139
Joined: Tue Feb 28, 2012 4:40 pm

Re: Platformer X

Post by Zeliarden »

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
Post Reply

Who is online

Users browsing this forum: Google [Bot] and 164 guests