14sum
Junior Member
Posts: 66
|
Post by 14sum on Sept 26, 2019 20:52:13 GMT
g = require 'nitro.graphics' e = require 'nitro.events' mat = require 'nitro.matrix' width, height = getscreensize() graphics.points(width/2, height/2)
Why idiesnt getscreensize work?
|
|
14sum
Junior Member
Posts: 66
|
Post by 14sum on Sept 26, 2019 22:10:40 GMT
g = require 'nitro.graphics' e = require 'nitro.events' mat = require 'nitro.matrix' width, height = g.getscreensize() g.points(width/2, height/2)
Apparently g.points need a table. Can I get an example?
|
|
14sum
Junior Member
Posts: 66
|
Post by 14sum on Sept 26, 2019 22:14:40 GMT
vf = 'p2c4' What does this mean? vf stands for vertex format. when your draw, you are required provide an array of vertices to draw (alongside with basic primitive shape type). p2c4 says each vertex I provide for drawing is composed of two position components (axis) x and y, and four color components (red, green, blue, alpha) (each component is provided as float value in the vertices array) So you could also have p3c6 if you were doing 3D in six colors?
|
|
|
Post by Admin on Sept 27, 2019 10:55:41 GMT
vf stands for vertex format. when your draw, you are required provide an array of vertices to draw (alongside with basic primitive shape type). p2c4 says each vertex I provide for drawing is composed of two position components (axis) x and y, and four color components (red, green, blue, alpha) (each component is provided as float value in the vertices array) So you could also have p3c6 if you were doing 3D in six colors? Color can have 3 or 4 components only. en.wikipedia.org/wiki/RGB_color_model
|
|
14sum
Junior Member
Posts: 66
|
Post by 14sum on Sept 27, 2019 17:38:59 GMT
Do you have answers for my other questions? I could really use a step by step
|
|
14sum
Junior Member
Posts: 66
|
Post by 14sum on Sept 27, 2019 21:01:51 GMT
What procedures did you use to learn programming?
|
|
14sum
Junior Member
Posts: 66
|
Post by 14sum on Sept 27, 2019 21:57:45 GMT
a = 40000 w = 20000 t = 10000 buffer = {} buffer.data = {a*math.sin((2*math.pi*t)/w)} buffer.rate = {44100} buffer.channels = {2} buffer.bits = {16} audio.playbuffer = {buffer}
What's wrong with this code? No errors show up but it Durant play a sound. Did it create something's my only dogs can here or something?
|
|
14sum
Junior Member
Posts: 66
|
Post by 14sum on Sept 27, 2019 22:01:21 GMT
I mean don't get me wrong I've fixed ears before (complaining about the womb)
But this? I might as well have a stethoscope to a plant.
|
|
14sum
Junior Member
Posts: 66
|
Post by 14sum on Sept 27, 2019 23:25:18 GMT
Ooh it's corrrcting mistakes!! I'll do my best...
|
|
|
Post by Admin on Sept 29, 2019 12:40:09 GMT
Do you have answers for my other questions? I could really use a step by step I recommend reading: lua-users.org/wiki/TutorialDirectoryI also recommend to Apply every thing you read immediately. Good luck.
|
|
14sum
Junior Member
Posts: 66
|
Post by 14sum on Sept 29, 2019 23:12:54 GMT
Alright I just did the types tutorial. Should I go to the assignment tutorial or go through the other tutorials mentioned in types tutorial?
|
|
14sum
Junior Member
Posts: 66
|
Post by 14sum on Sept 29, 2019 23:17:47 GMT
Waited some time. I feel like filling it out. I'll be doing the tutorials mentioned in Luatypes
|
|
14sum
Junior Member
Posts: 66
|
Post by 14sum on Sept 29, 2019 23:28:56 GMT
Oh great it brought me to the console
|
|
14sum
Junior Member
Posts: 66
|
Post by 14sum on Nov 23, 2019 6:14:10 GMT
Can I get step by step instructions?
|
|
14sum
Junior Member
Posts: 66
|
Post by 14sum on Jan 2, 2020 4:36:21 GMT
draw.setscreen(1) width, height = draw.getsize() draw.clear(draw.black) function firework (x, y) x=-1*(((-h^2)/a+(((y-k)^2)/b))-r^2) y=-1*(((x-h)^2)/a)+((-k^2)/b)-r^2 return x return y end sleep(10000)
Why does this tell me to add "end"? I think I already added it...
|
|