Giter VIP home page Giter VIP logo

Comments (7)

H4CKL0RD avatar H4CKL0RD commented on July 20, 2024 3

So i was working on pong 2 and i couldn't find the correct font file so i chose one that I liked and i got this error

image

from pong.

H4CKL0RD avatar H4CKL0RD commented on July 20, 2024

this is also a pic of my code

push = require 'push'

WINDOW_WIDTH = 1280
WINDOW_HEIGHT = 720

VIRTUAL_WIDTH = 432
VIRTUAL_HEIGHT = 243

function love.load ()
love.graphics.setDefaultFilter('nearest', 'nearest')
smallFont = love.graphics.newFont('font.TTF', 8)
love.graphics.setFont(smallFont)
push:setupScreen(VIRTUAL_WIDTH, VIRTUAL_HEIGHT, WINDOW_WIDTH, WINDOW_HEIGHT, {
fullscreen = false,
resizable = false,
vsync = true,
})
end

function love.keypressed(key)
if key == 'escape' then
love.event.quit()
end
end

function love.draw()
push:apply('start')
love.graphics.clear(40, 45, 52, 255)
love.graphics.printf('Hello Pong!', 0, 20, VIRTUAL_WIDTH, 'center')
love.graphics.rectangle('fill', 10, 30, 5, 20)
love.graphics.rectangle('fill', VIRTUAL_WIDTH - 10, VIRTUAL_HEIGHT - 50, 5, 20)
love.graphics.rectangle('fill', VIRTUAL_WIDTH / 2 - 2, VIRTUAL_HEIGHT / 2 - 2, 4, 4)
push:apply('end')
end

from pong.

H4CKL0RD avatar H4CKL0RD commented on July 20, 2024

so pls help thanks

from pong.

H4CKL0RD avatar H4CKL0RD commented on July 20, 2024

so pls help thanks

from pong.

Kafeedos avatar Kafeedos commented on July 20, 2024

font.zip
replace your font file with this one and your replace your font code with this
" smallFont = love.graphics.newFont('font.ttf', 8)"

i hope it helps

from pong.

H4CKL0RD avatar H4CKL0RD commented on July 20, 2024

Thx i figured it out before you commented but couldn't find the file so thx for the font

from pong.

NTDLS avatar NTDLS commented on July 20, 2024

@H4CKL0RD is this Steven? I've been looking for you. Hit me up!
http://networkdls.com/Page/View/Official/Make_Contact

from pong.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.