This is Squario:
Version Info
- = Added Feature
+ = Changed Feature
| = A problem
Version 0.1.0 [12/2/10]
-Basic Graphic (Squario, Grass)
-Basis for entity and image systems
-Not much else
Version 0.1.1 [12/3/10]
-New Graphics!
+A slightly better class library (Thanks Mud)
+Squario will fall
|Squario will not collide with the ground.
The Goal:
To make a platformer where you jump, spin, and fall to the end of the level.
If you hit the edge of platform, you'll fall off, not stand with your foot in the air like an idiot.
Squario: A squary survival horror
Squario: A squary survival horror
- Attachments
-
- squario.love
- (10.39 KiB) Downloaded 169 times
Last edited by ZenX2 on Sat Dec 04, 2010 3:21 am, edited 3 times in total.
Re: Squario: The squariest platformer in LOVE.
Player:Think is never being called, only the base class method is. I took a look at the class library and it made me want to punch a baby, so you're on your own there... >.>
- kikito
- Inner party member
- Posts: 3153
- Joined: Sat Oct 03, 2009 5:22 pm
- Location: Madrid, Spain
- Contact:
Re: Squario: The squariest platformer in LOVE.
Poor baby. I see that he is using a modified version of an old middleclass. Your punching instincts come from the fact that he uses middleclass, that his version isn't up to date, or that he's done custom changes? Warning: The first option might hurt my feelings.Mud wrote:Player:Think is never being called, only the base class method is. I took a look at the class library and it made me want to punch a baby, so you're on your own there... >.>
Speaking about modifications: guys, if you make them, don't be shy. Make a github fork, publicly, so other people can see them, re-use, comment and correct! ... Also it would make me happy. Ego boost!
I think that your problem is that you are using super the wrong way on ents/player and ents/ground.ZenX2 wrote:I've been trying to figure this out for a few hours, and haven't had much luck. Here's the .love if you think you can help, which would be lovely.
You have this:
Code: Select all
self.super:__init(p, 32, 32, 0, 0)
Code: Select all
super.__init(self, p, 32, 32, 0, 0)
Similarly, I had to change this line in ents/player:
Code: Select all
self.super:Think()
Code: Select all
super.Think(self)
(Incidentally, I also had to add additional parameters to love.physics.newworld instead of just w,h. I think this might be LÖVE 0.7 a bug. I'm using the unstable PPA)
When I did those changes, the red box started falling down.
Some comments:
- Be more strict with your naming conventions. If the file is called entbase.lua, then I'd expect the class defined inside it to be called 'EntBase', not just 'Ent'. Also, there is a table called images next to another one called Images ( ).
- A method called 'Think' should not be invoking love.graphics.draw. It should really be just updating positions, removing health, handling collisions, etc. Drawing stuff should be put inside a method called 'Draw' or similar. (I also started having a method called 'think' in my Actors, but I ended up changing it to 'update' so it mimicked the love functions better)
- I don't think the separation between 'Images' and 'Entities' has any good reason to be. Your code will be simpler and faster to implement if you just add an 'image' attribute to your Ents, as well as a "Draw" method.
- You declare the ents table inside main.lua, but then use it inside core/entbase. Consider putting ents inside core/entbase instead; then add a class method called Ent:ThinkAll() and/or Ent:DrawAll(). This way your code will be more encapsulated.
Only one more thing: Good luck! Making a physics-based platformer is pretty much the holy grail of LÖVE development...
When I write def I mean function.
Re: Squario: The squariest platformer in LOVE.
Have you tried dividing the positions by 16?
Hello, I am not dead.
- bartbes
- Sex machine
- Posts: 4946
- Joined: Fri Aug 29, 2008 10:35 am
- Location: The Netherlands
- Contact:
Re: Squario: The squariest platformer in LOVE.
It is most certainly not a bug, it's an API change.kikito wrote:(Incidentally, I also had to add additional parameters to love.physics.newworld instead of just w,h. I think this might be LÖVE 0.7 a bug. I'm using the unstable PPA)
- kikito
- Inner party member
- Posts: 3153
- Joined: Sat Oct 03, 2009 5:22 pm
- Location: Madrid, Spain
- Contact:
Re: Squario: The squariest platformer in LOVE.
Well on that case the wiki needs some rewriting. Please confirm: On 0.6.2 we had two function signatures, but on 0.7.0 we'll have just one, correct?bartbes wrote:It is most certainly not a bug, it's an API change.
When I write def I mean function.
- TechnoCat
- Inner party member
- Posts: 1611
- Joined: Thu Jul 30, 2009 12:31 am
- Location: Denver, CO
- Contact:
Re: Squario: The squariest platformer in LOVE.
kikito wrote:Well on that case the wiki needs some rewriting. Please confirm: On 0.6.2 we had two function signatures, but on 0.7.0 we'll have just one, correct?bartbes wrote:It is most certainly not a bug, it's an API change.
http://bitbucket.org/rude/love/changeset/5fc0273fb4a9rude wrote:Removed newWorld(w, h). Added newWorld(x1, y1, x2, y2).
I am unable to play because of the newWorld incorrect parameters stuff. I'm on 0.7.0 Ubuntu unstable PPA.
Re: Squario: The squariest platformer in LOVE.
Ah, having an x1, y1, x2, y2 makes much more sense than just a width and height.
And thanks for the C&C
And thanks for the C&C
Re: Squario: The squariest platformer in LOVE.
kikito, could you upload your edited version? I tried making the changes you suggested and it's not working
- kikito
- Inner party member
- Posts: 3153
- Joined: Sat Oct 03, 2009 5:22 pm
- Location: Madrid, Spain
- Contact:
Re: Squario: The squariest platformer in LOVE.
Sorry, no . I deleted it right when I finished.
When I write def I mean function.
Who is online
Users browsing this forum: No registered users and 74 guests