General discussion about LÖVE, Lua, game development, puns, and unicorns.
Virox
Citizen
Posts: 64 Joined: Thu Jan 07, 2010 6:24 pm
Post
by Virox » Thu Feb 18, 2010 7:45 pm
thx
didn't know that.
TechnoCat
Inner party member
Posts: 1612 Joined: Thu Jul 30, 2009 12:31 am
Location: Milwaukee, WI
Contact:
Post
by TechnoCat » Fri Feb 19, 2010 1:51 am
I assume the "Disable page caching" preference under misc on the wiki does this on every page by default.
pekka
Party member
Posts: 206 Joined: Thu Jan 07, 2010 6:48 am
Location: Oulu, Finland
Contact:
Post
by pekka » Sun Feb 21, 2010 2:25 pm
I collected this wonderful list of functions from the source code so I could add the missing ones to the documentation in the Wiki. Unfortunately, I don't know how to actually make useful edits there. The function listings are imported from some mysterious potato thing and can't apparently be modified in the Wiki. No matter what Edit link I clicked, it wouldn't show me the markup for what it actually displays on the page.
So, in the interest of improving the docs, here is a list of functions I made by poking around in the sources earlier today. Maybe someone will add the missing ones to the Wiki one day? Maybe someone will explain to me how I could effectively contribute to the docs too? I remain ever so hopeful
Code: Select all
AUDIO
love.audio.getNumSources
love.audio.getOrientation
love.audio.getPosition
love.audio.getVelocity
love.audio.getVolume
love.audio.newSource
love.audio.pause
love.audio.play
love.audio.resume
love.audio.rewind
love.audio.setOrientation
love.audio.setPosition
love.audio.setVelocity
love.audio.setVolume
love.audio.stop
love.audio.Source.getPitch
love.audio.Source.getVolume
love.audio.Source.isLooping
love.audio.Source.isStopped
love.audio.Source.setLooping
love.audio.Source.setPitch
love.audio.Source.setVolume
EVENT
love.event.pump
love.event.poll
love.event.wait
love.event.push
FILESYSTEM
love.filesystem.enumerate
love.filesystem.exists
love.filesystem.getAppdataDirectory
love.filesystem.getSaveDirectory
love.filesystem.getUserDirectory
love.filesystem.getWorkingDirectory
love.filesystem.init (why?)
love.filesystem.isDirectory
love.filesystem.isFile
love.filesystem.lines
love.filesystem.load
love.filesystem.mkdir
love.filesystem.newFile
love.filesystem.read
love.filesystem.remove
love.filesystem.setIdentity
love.filesystem.setSource
love.filesystem.write
?love.filesystem.FileData.getExtension
?love.filesystem.FileData.getFilename
love.filesystem.File.close
love.filesystem.File.eof
love.filesystem.File.getSize
love.filesystem.File.lines
love.filesystem.File.open
love.filesystem.File.read
love.filesystem.File.seek
love.filesystem.File.tell
love.filesystem.File.write
?FONT
?love.font.newRasterizer
?love.font.newGlyphData
?love.font.GlyphData
?love.font.Rasterizer
GRAPHICS
love.graphics.Font.getHeight
love.graphics.Font.getLineHeight
love.graphics.Font.getWidth
love.graphics.Font.setLineHeight
?love.graphics.Glyph
love.graphics.Image.getFilter
love.graphics.Image.getHeight
love.graphics.Image.getWidth
love.graphics.Image.getWrap
love.graphics.Image.setFilter
love.graphics.Image.setWrap
love.graphics.ParticleSystem.count
love.graphics.ParticleSystem.getDirection
love.graphics.ParticleSystem.getOffsetX
love.graphics.ParticleSystem.getOffsetY
love.graphics.ParticleSystem.getSpread
love.graphics.ParticleSystem.getX
love.graphics.ParticleSystem.getY
love.graphics.ParticleSystem.isActive
love.graphics.ParticleSystem.isEmpty
love.graphics.ParticleSystem.isFull
love.graphics.ParticleSystem.pause
love.graphics.ParticleSystem.reset
love.graphics.ParticleSystem.setBufferSize
love.graphics.ParticleSystem.setColor
love.graphics.ParticleSystem.setDirection
love.graphics.ParticleSystem.setEmissionRate
love.graphics.ParticleSystem.setGravity
love.graphics.ParticleSystem.setLifetime
love.graphics.ParticleSystem.setOffset
love.graphics.ParticleSystem.setParticleLife
love.graphics.ParticleSystem.setPosition
love.graphics.ParticleSystem.setRadialAcceleration
love.graphics.ParticleSystem.setRelativeDirection
love.graphics.ParticleSystem.setRotation
love.graphics.ParticleSystem.setSize
love.graphics.ParticleSystem.setSizeVariation
love.graphics.ParticleSystem.setSpeed
love.graphics.ParticleSystem.setSpin
love.graphics.ParticleSystem.setSpinVariation
love.graphics.ParticleSystem.setSpread
love.graphics.ParticleSystem.setSprite
love.graphics.ParticleSystem.setTangentialAcceleration
love.graphics.ParticleSystem.start
love.graphics.ParticleSystem.stop
love.graphics.ParticleSystem.update
love.graphics.Quad.getViewport
love.graphics.Quad.flip
love.graphics.Quad.setViewport
love.graphics.SpriteBatch.add
love.graphics.SpriteBatch.addq
love.graphics.SpriteBatch.clear
love.graphics.SpriteBatch.lock
love.graphics.SpriteBatch.unlock
love.graphics.checkMode
love.graphics.circle
love.graphics.clear
love.graphics.draw
love.graphics.drawq
love.graphics.drawTest
love.graphics.getBackgroundColor
love.graphics.getBlendMode
love.graphics.getCaption
love.graphics.getColor
love.graphics.getColorMode
love.graphics.getFont
love.graphics.getHeight
love.graphics.getLineStipple
love.graphics.getLineStyle
love.graphics.getLineWidth
love.graphics.getMaxPointSize
love.graphics.getModes
love.graphics.getPointSize
love.graphics.getPointStyle
love.graphics.getScissor
love.graphics.getWidth
love.graphics.isCreated
love.graphics.line
love.graphics.newFont
love.graphics.newGlyph
love.graphics.newImage
love.graphics.newImageFont
love.graphics.newParticleSystem
love.graphics.newQuad
love.graphics.newScreenshot
love.graphics.newSpriteBatch
love.graphics.point
love.graphics.polygon
love.graphics.pop
love.graphics.print
love.graphics.printf
love.graphics.present
love.graphics.push
love.graphics.rectangle
love.graphics.reset
love.graphics.rotate
love.graphics.scale
love.graphics.setBackgroundColor
love.graphics.setBlendMode
love.graphics.setCaption
love.graphics.setColor
love.graphics.setColorMode
love.graphics.setFont
love.graphics.setLine
love.graphics.setLineStipple
love.graphics.setLineStyle
love.graphics.setLineWidth
love.graphics.setMode
love.graphics.setPoint
love.graphics.setPointSize
love.graphics.setPointStyle
love.graphics.setScissor
love.graphics.toggleFullscreen
love.graphics.translate
love.graphics.triangle
IMAGE
love.image.newEncodedImageData
love.image.newImageData
love.image.ImageData.getHeight
love.image.ImageData.getPixel
love.image.ImageData.getString
love.image.ImageData.getWidth
love.image.ImageData.mapPixel
love.image.ImageData.paste
love.image.ImageData.setPixel
JOYSTICK
love.joystick.close
love.joystick.getAxes
love.joystick.getAxis
love.joystick.getBall
love.joystick.getHat
love.joystick.getName
love.joystick.getNumAxes
love.joystick.getNumBalls
love.joystick.getNumButtons
love.joystick.getNumHats
love.joystick.getNumJoysticks
love.joystick.isDown
love.joystick.isOpen
love.joystick.open
KEYBOARD
love.keyboard.getKeyRepeat
love.keyboard.isDown
love.keyboard.setKeyRepeat
MOUSE
love.mouse.getX
love.mouse.getPosition
love.mouse.getY
love.mouse.isDown
love.mouse.isGrabbed
love.mouse.isVisible
love.mouse.setGrab
love.mouse.setPosition
love.mouse.setVisible
PHYSICS
love.physics.Body.applyForce
love.physics.Body.applyImpulse
love.physics.Body.applyTorque
love.physics.Body.destroy
love.physics.Body.getAngle
love.physics.Body.getAngularDamping
love.physics.Body.getAngularVelocity
love.physics.Body.getFixedRotation
love.physics.Body.getInertia
love.physics.Body.getLinearDamping
love.physics.Body.getLinearVelocity
love.physics.Body.getLinearVelocityFromLocalPoint
love.physics.Body.getLinearVelocityFromWorldPoint
love.physics.Body.getLocalCenter
love.physics.Body.getLocalPoint
love.physics.Body.getLocalVector
love.physics.Body.getMass
love.physics.Body.getPosition
love.physics.Body.getWorldCenter
love.physics.Body.getWorldPoint
love.physics.Body.getWorldVector
love.physics.Body.getX
love.physics.Body.getY
love.physics.Body.isBullet
love.physics.Body.isDynamic
love.physics.Body.isFrozen
love.physics.Body.isSleeping
love.physics.Body.isStatic
love.physics.Body.putToSleep
love.physics.Body.setAllowSleeping
love.physics.Body.setAngle
love.physics.Body.setAngularDamping
love.physics.Body.setAngularVelocity
love.physics.Body.setBullet
love.physics.Body.setFixedRotation
love.physics.Body.setInertia
love.physics.Body.setLinearDamping
love.physics.Body.setLinearVelocity
love.physics.Body.setMass
love.physics.Body.setMassFromShapes
love.physics.Body.setPosition
love.physics.Body.setX
love.physics.Body.setY
love.physics.Body.wakeUp
love.physics.CircleShape.getLocalCenter
love.physics.CircleShape.getRadius
love.physics.CircleShape.getWorldCenter
++ methods from love.physics.Shape, except for *GroupIndex (??)
love.physics.Contact.getFriction
love.physics.Contact.getNormal
love.physics.Contact.getPosition
love.physics.Contact.getRestitution
love.physics.Contact.getSeparation
love.physics.Contact.getVelocity
love.physics.DistanceJoint.getDamping
love.physics.DistanceJoint.getFrequency
love.physics.DistanceJoint.getLength
love.physics.DistanceJoint.setDamping
love.physics.DistanceJoint.setFrequency
love.physics.DistanceJoint.setLength
++ methods from love.physics.Joint
love.physics.GearJoint.getRatio
love.physics.GearJoint.setRatio
++ methods from love.physics.Joint
love.physics.Joint.destroy
love.physics.Joint.getAnchors
love.physics.Joint.getCollideConnected
love.physics.Joint.getReactionForce
love.physics.Joint.getReactionTorque
love.physics.Joint.getType
love.physics.Joint.setCollideConnected
love.physics.MouseJoint.getMaxForce
love.physics.MouseJoint.getTarget
love.physics.MouseJoint.setMaxForce
love.physics.MouseJoint.setTarget
++ methods from love.physics.Joint
love.physics.PolygonShape.getPoints
++ methods from love.physics.Shape, except for *GroupIndex (??)
love.physics.PrismaticJoint.getJointSpeed
love.physics.PrismaticJoint.getJointTranslation
love.physics.PrismaticJoint.getLimits
love.physics.PrismaticJoint.getLowerLimit
love.physics.PrismaticJoint.getMaxMotorForce
love.physics.PrismaticJoint.getMotorForce
love.physics.PrismaticJoint.getMotorSpeed
love.physics.PrismaticJoint.getUpperLimit
love.physics.PrismaticJoint.isLimitsEnabled
love.physics.PrismaticJoint.isMotorEnabled
love.physics.PrismaticJoint.setLimits
love.physics.PrismaticJoint.setLimitsEnabled
love.physics.PrismaticJoint.setLowerLimit
love.physics.PrismaticJoint.setMaxMotorForce
love.physics.PrismaticJoint.setMotorEnabled
love.physics.PrismaticJoint.setMotorSpeed
love.physics.PrismaticJoint.setUpperLimit
++ methods from love.physics.Joint
love.physics.PulleyJoint.getConstant
love.physics.PulleyJoint.getGroundAnchors
love.physics.PulleyJoint.getLength1
love.physics.PulleyJoint.getLength2
love.physics.PulleyJoint.getMaxLengths
love.physics.PulleyJoint.getRatio
love.physics.PulleyJoint.setConstant
love.physics.PulleyJoint.setMaxLengths
love.physics.PulleyJoint.setRatio
++ methods from love.physics.Joint
love.physics.RevoluteJoint.getJointAngle
love.physics.RevoluteJoint.getJointSpeed
love.physics.RevoluteJoint.getLimits
love.physics.RevoluteJoint.getLowerLimit
love.physics.RevoluteJoint.getMaxMotorTorque
love.physics.RevoluteJoint.getMotorSpeed
love.physics.RevoluteJoint.getMotorTorque
love.physics.RevoluteJoint.getUpperLimit
love.physics.RevoluteJoint.isLimitsEnabled
love.physics.RevoluteJoint.isMotorEnabled
love.physics.RevoluteJoint.setLimits
love.physics.RevoluteJoint.setLimitsEnabled
love.physics.RevoluteJoint.setLowerLimit
love.physics.RevoluteJoint.setMaxMotorTorque
love.physics.RevoluteJoint.setMotorEnabled
love.physics.RevoluteJoint.setMotorSpeed
love.physics.RevoluteJoint.setUpperLimit
++ methods from love.physics.Joint
love.physics.Shape.destroy
love.physics.Shape.getBoundingBox
love.physics.Shape.getCategory
love.physics.Shape.getData
love.physics.Shape.getDensity
love.physics.Shape.getFilterData
love.physics.Shape.getFriction
love.physics.Shape.getGroupIndex
love.physics.Shape.getMask
love.physics.Shape.getRestitution
love.physics.Shape.getType
love.physics.Shape.isSensor
love.physics.Shape.setCategory
love.physics.Shape.setData
love.physics.Shape.setDensity
love.physics.Shape.setFilterData
love.physics.Shape.setFriction
love.physics.Shape.setGroupIndex
love.physics.Shape.setMask
love.physics.Shape.setRestitution
love.physics.Shape.setSensor
love.physics.Shape.testPoint
love.physics.Shape.testSegment
love.physics.World.getBodyCount
love.physics.World.getCallBacks
love.physics.World.getGravity
love.physics.World.getJointCount
love.physics.World.getMeter
love.physics.World.isAllowSleep
love.physics.World.setAllowSleep
love.physics.World.setCallbacks
love.physics.World.setGravity
love.physics.World.setMeter
love.physics.World.update
love.physics.newBody
love.physics.newCircleShape
love.physics.newDistanceJoint
love.physics.newGearJoint
love.physics.newMouseJoint
love.physics.newPolygonShape
love.physics.newPrismaticJoint
love.physics.newPulleyJoint
love.physics.newRectangleShape
love.physics.newRevoluteJoint
love.physics.newWorld
SOUND
love.sound.newSoundData
love.sound.newDecoder
love.sound.Decoder.getChannels
love.sound.Decoder.getBits
love.sound.Decoder.getSampleRate
love.sound.SoundData.getBits
love.sound.SoundData.getChannels
love.sound.SoundData.getSampleRate
love.sound.SoundData.setSample
love.sound.SoundData.getSample
TIMER
love.timer.getDelta
love.timer.getFPS
love.timer.getMicroTime
love.timer.getTime
love.timer.sleep
love.timer.step
The documentation also contains some functions that do not actually exist as far as I can tell from reading the source. Here is one of them:
http://love2d.org/wiki/Shape:getBody
Now, seriously, I'd be happy to lend in a hand with improving the documentation! How can I do that?
bmelts
Party member
Posts: 380 Joined: Fri Jan 30, 2009 3:16 am
Location: Wiscönsin
Contact:
Post
by bmelts » Sun Feb 21, 2010 8:54 pm
First: line 44 of src/modules/physics/box2d/wrap_Shape.h:
Code: Select all
int w_Shape_getBody(lua_State * L);
It exists!
EDIT: But for some reason, it's not exposed...
Second: as to editing the wiki, it's actually very similar to the old documentation - just follow the instructions
here .
kikito
Inner party member
Posts: 3153 Joined: Sat Oct 03, 2009 5:22 pm
Location: Madrid, Spain
Contact:
Post
by kikito » Sun Feb 21, 2010 9:04 pm
pekka wrote: I collected this wonderful list of functions from the source code so I could add the missing ones to the documentation in the Wiki.
Hey, just wanted to say thanks for taking the time to write down that list. Kudos to you!
This is how the
love.graphics.checkMode function looks like on edit mode (just followed the link and pressed "Edit"):
Code: Select all
Checks if a display mode is supported.
== Function ==
=== Synopsis ===
<source lang="lua">
supported = love.graphics.checkMode( width, height, fullscreen )
</source>
=== Arguments ===
{{param|number|width|The display width.}}
{{param|number|height|The display height.}}
{{param|boolean|fullscreen|True to check for fullscreen, false for windowed.}}
=== Returns ===
{{param|boolean|supported|True if supported, false if not.}}
== See Also ==
* [[parent::love.graphics]]
[[Category:Functions]]
{{#set:Description=Checks if a display mode is supported.}}
Which part do you need help in understanding?
When I write def I mean function .
pekka
Party member
Posts: 206 Joined: Thu Jan 07, 2010 6:48 am
Location: Oulu, Finland
Contact:
Post
by pekka » Mon Feb 22, 2010 7:24 am
I'd like to add all the missing functions to the module functions lists. For example, this one is missing the love.event.pump function:
http://love2d.org/wiki/love.event
Unfortunately, the markup it shows after clicking on Edit does not contain any lists I can modify. It looks like this:
Code: Select all
Manages events, like keypresses.
== Functions ==
{{#ask: [[Category:Functions]] [[parent::love.event]]
| headers=hide
| ?Description
}}
== Enums ==
{{#ask: [[Category:Enums]] [[parent::love.event]]
| headers=hide
| ?Description
}}
[[Category:Modules]]
{{#set:Description=Manages events, like keypresses.}}
== See Also ==
* [[parent::love]]
The part responsible for this:
Code: Select all
love.event.poll Gets an iterator for messages in the event queue.
love.event.push Adds an event to the event queue.
love.event.wait Like love.event.poll, but blocks until there is an event in the queue.
does not appear anywhere that I can see. So, how would I add the pump function to this?
bmelts
Party member
Posts: 380 Joined: Fri Jan 30, 2009 3:16 am
Location: Wiscönsin
Contact:
Post
by bmelts » Mon Feb 22, 2010 7:50 am
anjo wrote: as to editing the wiki, it's actually very similar to the old documentation - just follow the instructions
here .
See above. Create a new page called love.event.pump and insert the appropriate function/parent boilerplate as described in the guidelines. It will be automatically added to the love.event page.
Robin
The Omniscient
Posts: 6506 Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:
Post
by Robin » Mon Feb 22, 2010 8:20 am
Page created.
pekka
Party member
Posts: 206 Joined: Thu Jan 07, 2010 6:48 am
Location: Oulu, Finland
Contact:
Post
by pekka » Mon Feb 22, 2010 10:07 am
Thanks for pointing me to the doc editing instructions. I missed them completely, but there they now are, plain as a day. Anyway, I had something to say about paying attention to things, but I saw this neat red car outside and I'm gonna go have a look at it. Later I'll probably visit the library. Mmm, books.
Ahem, well, right. I'll be adding things to the docs as soon as I have the chance to write the explanations carefully. If we add a few pages now and then, it won't take long for it to catch up to the current state of things.
What do we do with the functions (like Shape:getBody) that don't actually exist in the Lua binding, though? It would be useful to mark them somehow, instead of removing them completely, if they are going to appear one day in a future revision. Maybe saying NYI (not yet implemented) somewhere is enough?
Users browsing this forum: Ahrefs [Bot] and 3 guests