Created basic tempo controller and initated song reader creation into playfield. No actual notes yet.

master
sigonasr2 6 years ago
parent 5565fed49f
commit 6eb991d540
  1. 8
      GameMakerStudio2/Bandori/Bandori.yyp
  2. 7
      GameMakerStudio2/Bandori/datafiles/TestSongFormat.txt
  3. 19
      GameMakerStudio2/Bandori/datafiles_yy/TestSongFormat.txt.yy
  4. 4
      GameMakerStudio2/Bandori/objects/background_field/Create_0.gml
  5. 5
      GameMakerStudio2/Bandori/objects/background_field/Draw_0.gml
  6. 3
      GameMakerStudio2/Bandori/objects/background_field/KeyPress_35.gml
  7. 10
      GameMakerStudio2/Bandori/objects/background_field/background_field.yy
  8. 3
      GameMakerStudio2/Bandori/objects/game_initializer/Create_0.gml
  9. 1
      GameMakerStudio2/Bandori/objects/music_selection_controller/Create_0.gml
  10. 4
      GameMakerStudio2/Bandori/rooms/music_selection/music_selection.yy
  11. 23
      GameMakerStudio2/Bandori/scripts/song_file_reader/song_file_reader.gml
  12. 2
      GameMakerStudio2/Bandori/views/168f6e4f-30e3-4950-868f-6ea48b36a8d8.yy

@ -302,6 +302,14 @@
"resourceType": "GMScript"
}
},
{
"Key": "dc814062-491a-4f3d-9968-41c49ec0a64a",
"Value": {
"id": "aae0bed1-70e7-492f-8288-ef4ce564eb81",
"resourcePath": "datafiles_yy\\TestSongFormat.txt.yy",
"resourceType": "GMIncludedFile"
}
},
{
"Key": "e1b8208f-ed03-4442-8be3-eed205abd614",
"Value": {

@ -0,0 +1,7 @@
SEKAIWA KOINI OCHITERU
Sekaiwa_Koini_Ochiteru
0
130
1,2,4.333333333
1,6,4.333333333
1,4,5.7777777777777777777777744444444

@ -0,0 +1,19 @@
{
"id": "dc814062-491a-4f3d-9968-41c49ec0a64a",
"modelName": "GMIncludedFile",
"mvc": "1.0",
"name": "TestSongFormat.txt",
"CopyToMask": -1,
"exists": false,
"exportAction": 0,
"exportDir": "",
"fileName": "TestSongFormat.txt",
"filePath": "datafiles",
"freeData": false,
"origName": "",
"overwrite": false,
"removeEnd": false,
"size": 0,
"store": false,
"tags": ""
}

@ -53,4 +53,6 @@ BEATS_PER_SECOND = global.music_bpm/60
TIME_BETWEEN_BEAT = 1/BEATS_PER_SECOND
FLICKER_TIME = 0
FLICKER_OFFSET = 0 //Amount of time in seconds to offset the flicker. Set with END key in EDIT MODE.
FLICKER_OFFSET = 0.5 //Amount of time in seconds to offset the flicker. Set with END key in EDIT MODE.
LAST_BEAT += FLICKER_OFFSET

@ -22,6 +22,9 @@ for (i=0;i<ds_list_size(lane1);i+=1) {
STEP_COUNTER+=NOTE_SPACING
if (FLICKER_TIME<20) {
draw_rectangle(5,5,37,37,false)
draw_rectangle(global.PLAYFIELD_WIDTH/2-BOTTOM_LANE_WIDTH*3,
BOTTOM_LANE_Y,
global.PLAYFIELD_WIDTH/2+BOTTOM_LANE_WIDTH*3,
BOTTOM_LANE_Y+12,false)
FLICKER_TIME+=1
}

@ -0,0 +1,3 @@
if (global.mode==1) {
LAST_BEAT = audio_sound_get_track_position(global.playing_id);
}

@ -33,6 +33,16 @@
"enumb": 0,
"eventtype": 3,
"m_owner": "22998e6f-2f12-4c9e-8ab3-f05bf4af3bf5"
},
{
"id": "5fd81c78-a02d-477e-8aed-389a8ea036de",
"modelName": "GMEvent",
"mvc": "1.0",
"IsDnD": false,
"collisionObjectId": "00000000-0000-0000-0000-000000000000",
"enumb": 35,
"eventtype": 9,
"m_owner": "22998e6f-2f12-4c9e-8ab3-f05bf4af3bf5"
}
],
"maskSpriteId": "00000000-0000-0000-0000-000000000000",

@ -2,4 +2,5 @@
//1 = Song edit. Access to special controls.
global.mode=1
global.title
global.title=""
global.SONG_timeline=-1

@ -1,3 +1,4 @@
global.music_selection = Sekaiwa_Koini_Ochiteru
global.music_bpm = 130
song_file_reader("TestSongFormat.txt")
room_goto(playfield)

@ -7,6 +7,7 @@
"inheritCreationOrder": false,
"inheritLayers": false,
"instanceCreationOrderIDs": [
"739e438e-34b4-4ef8-a509-f140ef03e14a",
"abcbedef-bac7-4ee5-bd96-d7fec65a5f57"
],
"IsDnD": false,
@ -25,7 +26,8 @@
"inheritSubLayers": false,
"inheritVisibility": false,
"instances": [
{"name": "inst_6D8A3836","id": "abcbedef-bac7-4ee5-bd96-d7fec65a5f57","colour": { "Value": 4294967295 },"creationCodeFile": "","creationCodeType": "","ignore": false,"inheritCode": false,"inheritItemSettings": false,"IsDnD": false,"m_originalParentID": "00000000-0000-0000-0000-000000000000","m_serialiseFrozen": false,"modelName": "GMRInstance","name_with_no_file_rename": "inst_6D8A3836","objId": "3af8c491-95d5-49f2-ad8e-204ee5d672c2","properties": null,"rotation": 0,"scaleX": 13,"scaleY": 13,"mvc": "1.0","x": 0,"y": 0}
{"name": "inst_6D8A3836","id": "abcbedef-bac7-4ee5-bd96-d7fec65a5f57","colour": { "Value": 4294967295 },"creationCodeFile": "","creationCodeType": "","ignore": false,"imageIndex": 0,"imageSpeed": 1,"inheritCode": false,"inheritItemSettings": false,"IsDnD": false,"m_originalParentID": "00000000-0000-0000-0000-000000000000","m_serialiseFrozen": false,"modelName": "GMRInstance","name_with_no_file_rename": "inst_6D8A3836","objId": "3af8c491-95d5-49f2-ad8e-204ee5d672c2","properties": null,"rotation": 0,"scaleX": 13,"scaleY": 13,"mvc": "1.0","x": 0,"y": 128},
{"name": "inst_19CDD227","id": "739e438e-34b4-4ef8-a509-f140ef03e14a","colour": { "Value": 4294967295 },"creationCodeFile": "","creationCodeType": "","ignore": false,"imageIndex": 0,"imageSpeed": 1,"inheritCode": false,"inheritItemSettings": false,"IsDnD": false,"m_originalParentID": "00000000-0000-0000-0000-000000000000","m_serialiseFrozen": false,"modelName": "GMRInstance","name_with_no_file_rename": "inst_19CDD227","objId": "232b3a99-2548-425f-bae5-2ee7f9d9bcd5","properties": null,"rotation": 0,"scaleX": 7,"scaleY": 7,"mvc": "1.1","x": 0,"y": 0}
],
"layers": [

@ -15,21 +15,24 @@ global.SONG_title = file_text_read_string(global.SONG_file);
global.SONG_songid = file_text_read_real(global.SONG_file);
global.SONG_offset = file_text_read_string(global.SONG_file);
global.SONG_bpm = file_text_read_real(global.SONG_file);
if (timeline_exists(global.SONG_timeline)) {
if (global.SONG_timeline!=-1 && timeline_exists(global.SONG_timeline)) {
timeline_clear(global.SONG_timeline);
}
global.SONG_timeline = timeline_add();
var i=0;
while (!file_text_eof(global.SONG_file)) {
global.SONG_note[i]=file_text_read_string(global.SONG_file);
str1 = string_copy(global.SONG_note[i],0,string_pos(",",global.SONG_note[i]));
temp1 = string_copy(global.SONG_note[i],string_pos(",",global.SONG_note[i]),string_length(global.SONG_note[i])-string_pos(",",global.SONG_note[i]));
str2 = string_copy(str1,0,string_pos(",",str1));
temp2 = string_copy(str1,string_pos(",",str1),string_length(str1)-string_pos(",",str1));
str3 = string_copy(str2,0,string_pos(",",str2));
note = instance_create_layer(0,0,playfield,music_note)
note.val1=number(str1);
note.val2=number(str2);
note.val3=number(str3);
if (string_count(",",global.SONG_note[i])==3) {
str1 = string_copy(global.SONG_note[i],0,string_pos(",",global.SONG_note[i]));
temp1 = string_copy(global.SONG_note[i],string_pos(",",global.SONG_note[i]),string_length(global.SONG_note[i])-string_pos(",",global.SONG_note[i]));
str2 = string_copy(str1,0,string_pos(",",str1));
temp2 = string_copy(str1,string_pos(",",str1),string_length(str1)-string_pos(",",str1));
str3 = string_copy(str2,0,string_pos(",",str2));
note = instance_create_layer(0,0,playfield,music_note)
note.val1=real(str1);
note.val2=real(str2);
note.val3=real(str3);
}
i+=1;
file_text_readln(global.SONG_file);
}

@ -4,7 +4,7 @@
"mvc": "1.1",
"name": "168f6e4f-30e3-4950-868f-6ea48b36a8d8",
"children": [
"dc814062-491a-4f3d-9968-41c49ec0a64a"
],
"filterType": "GMIncludedFile",
"folderName": "datafiles",

Loading…
Cancel
Save