I know this was quick but I came out with a new version 0.1.2. decreased the volume of all the music and made a beginner script in Lua for those who do not get how to begin coding.
Just got this message after I made an update. I'll try to balance the music eq for the music on the next update. I posted mega ships into the game that require higher levels.
I agree with Out-Of_Names you have to learn about the C# language first. This guy's youtube channel covers from beginner to advanced. https://youtu.be/SXmVym6L8dw
I would highly suggest learning how to use interfaces which makes your code professional. It is not just a tool that makes your code follow strict guidelines. It allows data that is unrelated to have something in common. For example, you can store two very different objects in the same data structure with interfaces.
it looks excellent to me. when I write music I think all my pieces are bad but then they wind up on youtube with 60,000 views. Other peoples opinions matter more than your own because you are your worse enemy.
Oh sorry no I actually attached a video to this I re-upload it. It actually showed up differently for me.
Here is the code I made. I did use someone else's code but the majority of it is my own.
cmajorscale = {0,2,4,5,7,9,11}
gmajorscale = {7,9,11,0,2,4,6}
dmajorscale = {2,4,6,7,9,11,1}
amajorscale = {9,11,1,2,4,6,8}
emajorscale = {4,6,8,9,11,1,3}
bmajorscale = {11,1,3,4,6,8,10}
fsharpmajorscale = {6,8,10,11,1,3,5}
csharpmajorscale = {1,3,5,6,8,10,0}
gsharpmajorscale = {8,10,0,1,3,5,6,7}
eflatmajorscale = {3,5,6,7,8,10,2}
bflatmajorscale = {10,2,3,5,6,7,9}
fmajorscale = {5,6,7,9,10,2,4}
function playscales(sfxnum,scale)
local rand = 1
srand(s)
local rand2
local shift = 12
local rand3 = 1
local rand4 = 7
local arpeggio = 1
local vol
local tempo = 20
vol = 1
for t=0,31 do
rand2 = rnd()
rand = flr(rnd(3))+1
if rand2 > .5 then
if(t > 0) then
if(arpeggio == 1) then
arpeggio = 3
shift = 12
elseif arpeggio == 3 then
arpeggio = 5
shift = 12
elseif arpeggio == 5 then
arpeggio = 7
shift = 12
elseif arpeggio == 7 then
arpeggio = 1
shift = 12
end
else arpeggio = 1
end
if(scale == 1) then
note=make_note(cmajorscale[arpeggio]+shift-12,rand4,vol,0)
elseif(scale == 2) then
note=make_note(gmajorscale[arpeggio]+shift-12,rand4,vol,0)
elseif(scale == 3) then
note=make_note(dmajorscale[arpeggio]+shift-12,rand4,vol,0)
elseif(scale == 4) then
note=make_note(amajorscale[arpeggio]+shift-12,rand4,vol,0)
elseif(scale == 5) then
note=make_note(emajorscale[arpeggio]+shift-12,rand4,vol,0)
elseif(scale == 6) then
note=make_note(bmajorscale[arpeggio]+shift-12,rand4,vol,0)
elseif(scale == 7) then
note=make_note(fsharpmajorscale[arpeggio]+shift-12,rand4,vol,0)
elseif(scale == 8) then
note=make_note(csharpmajorscale[arpeggio]+shift-12,rand4,vol,0)
elseif(scale == 9) then
note=make_note(gsharpmajorscale[arpeggio]+shift-12,rand4,vol,0)
elseif(scale == 10) then
note=make_note(eflatmajorscale[arpeggio]+shift-12,rand4,vol,0)
elseif(scale == 11) then
note=make_note(bflatmajorscale[arpeggio]+shift-12,rand4,vol,0)
elseif(scale == 12) then
note=make_note(fmajorscale[arpeggio]+shift-12,rand4,vol,0)
end
set_note(sfxnum+26,t,note)
set_speed(sfxnum+26,tempo)
else
t += 1
end
end
vol = 1
for t=0,31 do
rand2 = rnd()
rand = flr(rnd(3))+1
if(rand2 > .5) then
if(t > 0) then
if rand3 == 1 then
if rand == 1 then rand3 = 3
elseif rand == 2 then rand3 = 7
elseif rand == 3 then rand3 = 4 end
elseif rand3 == 2 then
if rand == 1 then rand3 = 4
elseif rand == 2 then rand3 = 6
elseif rand == 3 then rand3 = 1 end
elseif rand3 == 3 then
if rand == 1 then rand3 = 5
elseif rand == 2 then rand3 = 7
elseif rand == 3 then rand3 = 1 end
elseif rand3 == 4 then
if rand == 1 then rand3 = 6
elseif rand == 2 then rand3 = 3
elseif rand == 3 then rand3 = 1 end
elseif rand3 == 5 then
if rand == 1 then rand3 = 2
elseif rand == 2 then rand3 = 1
elseif rand == 3 then rand3 = 7 end
elseif rand3 == 6 then
if rand == 1 then rand3 = 4
elseif rand == 2 then rand3 = 2
elseif rand == 3 then rand3 = 1 end
elseif rand3 == 7 then
if rand == 1 then rand3 = 5
elseif rand == 2 then rand3 = 3
elseif rand == 3 then rand3 = 2 end
end
else arpeggio = 1
end
if(scale == 1) then
note=make_note(cmajorscale[rand3]+shift,rand4,vol,0)
elseif(scale == 2) then
note=make_note(gmajorscale[rand3]+shift,rand4,vol,0)
elseif(scale == 3) then
note=make_note(dmajorscale[rand3]+shift,rand4,vol,0)
elseif(scale == 4) then
note=make_note(amajorscale[rand3]+shift,rand4,vol,0)
elseif(scale == 5) then
note=make_note(emajorscale[rand3]+shift,rand4,vol,0)
elseif(scale == 6) then
note=make_note(bmajorscale[rand3]+shift,rand4,vol,0)
elseif(scale == 7) then
note=make_note(fsharpmajorscale[rand3]+shift,rand4,vol,0)
elseif(scale == 8) then
note=make_note(csharpmajorscale[rand3]+shift,rand4,vol,0)
elseif(scale == 9) then
note=make_note(gsharpmajorscale[rand3]+shift,rand4,vol,0)
elseif(scale == 10) then
note=make_note(eflatmajorscale[rand3]+shift,rand4,vol,0)
elseif(scale == 11) then
note=make_note(bflatmajorscale[rand3]+shift,rand4,vol,0)
elseif(scale == 12) then
note=make_note(fmajorscale[rand3]+shift,rand4,vol,0)
end
set_note(sfxnum,t,note)
set_speed(sfxnum,tempo)
else t+=1
end
end
end
function write_new_song()
local i = flr(rnd(12))+1
local rand = flr(rnd(3))+1
for index = 1, 12 do
for y = 1, 2 do
if(y == 1) then
if(i <= 11) then
if rand == 1 then i+=1
elseif rand == 2 then
if i > 2 then i = i - 1
else i = 12 end
elseif rand == 3 then
if(i+9 <= 11) then i = i + 9
elseif i-4 >= 1 then i = i - 4
elseif i-4 <= 0 then
i = i-4 + 13
end
end
else i = 1 end
end
playscales(index+1+y,i)
end
end
music(3,-300)
end
function make_note(pitch, instr, vol, effect)
return { pitch + 64*(instr%4) , 16*effect + 2*vol + flr(instr/4) } -- flr may be redundant when this is poke'd into memory
end
function get_note(sfx, time)
local addr = 0x3200 + 68*sfx + 2*time
return { peek(addr) , peek(addr + 1) }
end
function set_note(sfx, time, note)
local addr = 0x3200 + 68*sfx + 2*time
poke(addr, note[1])
poke(addr+1, note[2])
end
function get_speed(sfx)
return peek(0x3200 + 68*sfx + 65)
end
function set_speed(sfx, speed)
poke(0x3200 + 68*sfx + 65, speed)
end
function get_loop_start(sfx)
return peek(0x3200 + 68*sfx + 66)
end
function get_loop_end(sfx)
return peek(0x3200 + 68*sfx + 67)
end
function set_loop(sfx, start, endt)
local addr = 0x3200 + 68*sfx
poke(addr + 66, start)
poke(addr + 67, endt)
end
A community of musicians that want to get their music out there.
I know this was quick but I came out with a new version 0.1.2. decreased the volume of all the music and made a beginner script in Lua for those who do not get how to begin coding.
update 0.1.1 out
Just got this message after I made an update. I'll try to balance the music eq for the music on the next update. I posted mega ships into the game that require higher levels.
I agree with Out-Of_Names you have to learn about the C# language first. This guy's youtube channel covers from beginner to advanced. https://youtu.be/SXmVym6L8dw
I would highly suggest learning how to use interfaces which makes your code professional. It is not just a tool that makes your code follow strict guidelines. It allows data that is unrelated to have something in common. For example, you can store two very different objects in the same data structure with interfaces.
it looks excellent to me. when I write music I think all my pieces are bad but then they wind up on youtube with 60,000 views. Other peoples opinions matter more than your own because you are your worse enemy.
this is the longest game I have ever created. lol https://youtu.be/pIeyAJpw0ZU
I watched all three videos. That was entertaining! Good job. That game is longer than any game I've made. Did you use a game engine?
Pages