Added debug overlays and file read/write operations.

master
Joshua Sigona 6 years ago
parent 8009b927c8
commit eebd26b911
  1. 27
      GameMakerStudio2/Bandori/Bandori.yyp
  2. 7
      GameMakerStudio2/Bandori/Sekaiwa_Koini_Ochiteru.txt
  3. 7
      GameMakerStudio2/Bandori/datafiles/songdata/Sekaiwa_Koini_Ochiteru.txt
  4. 19
      GameMakerStudio2/Bandori/datafiles_yy/songdata/Sekaiwa_Koini_Ochiteru.txt.yy
  5. 5
      GameMakerStudio2/Bandori/objects/background_field/Create_0.gml
  6. 4
      GameMakerStudio2/Bandori/objects/background_field/Draw_0.gml
  7. 3
      GameMakerStudio2/Bandori/objects/background_field/KeyPress_114.gml
  8. 0
      GameMakerStudio2/Bandori/objects/background_field/Mouse_54.gml
  9. 20
      GameMakerStudio2/Bandori/objects/background_field/background_field.yy
  10. 2
      GameMakerStudio2/Bandori/objects/music_selection_controller/Create_0.gml
  11. 38
      GameMakerStudio2/Bandori/scripts/song_file_reader1/song_file_reader1.gml
  12. 8
      GameMakerStudio2/Bandori/scripts/song_file_reader1/song_file_reader1.yy
  13. 27
      GameMakerStudio2/Bandori/scripts/song_file_writer/song_file_writer.gml
  14. 8
      GameMakerStudio2/Bandori/scripts/song_file_writer/song_file_writer.yy
  15. 3
      GameMakerStudio2/Bandori/views/168f6e4f-30e3-4950-868f-6ea48b36a8d8.yy
  16. 13
      GameMakerStudio2/Bandori/views/246b6677-8b24-4947-9115-36b8d4fc01e8.yy
  17. 3
      GameMakerStudio2/Bandori/views/845cdbdd-d4ad-415d-bca7-04f31b6e6c99.yy

@ -70,6 +70,14 @@
"resourceType": "GMObject"
}
},
{
"Key": "246b6677-8b24-4947-9115-36b8d4fc01e8",
"Value": {
"id": "2c0b2a82-5031-41a0-9848-355fad95281c",
"resourcePath": "views\\246b6677-8b24-4947-9115-36b8d4fc01e8.yy",
"resourceType": "GMFolder"
}
},
{
"Key": "292c43b1-1f73-4bf1-a374-f7335d04df3f",
"Value": {
@ -102,6 +110,14 @@
"resourceType": "GMFolder"
}
},
{
"Key": "375a746a-804f-4301-8d8e-7ce40f231c36",
"Value": {
"id": "b22375ab-2b5a-4978-9f37-dd7824dbb249",
"resourcePath": "datafiles_yy\\songdata\\Sekaiwa_Koini_Ochiteru.txt.yy",
"resourceType": "GMIncludedFile"
}
},
{
"Key": "3af8c491-95d5-49f2-ad8e-204ee5d672c2",
"Value": {
@ -174,6 +190,14 @@
"resourceType": "GMScript"
}
},
{
"Key": "57fd057a-79d6-4298-a8d5-807f353ec3b9",
"Value": {
"id": "3c26574d-d36d-46c7-80bc-b0dd47b8dcbc",
"resourcePath": "scripts\\song_file_writer\\song_file_writer.yy",
"resourceType": "GMScript"
}
},
{
"Key": "5c8f2a9d-ca8c-4306-81ef-f1172aa12cd5",
"Value": {
@ -366,7 +390,8 @@
"9b3969f3-bd44-47ed-9b48-f6c85ded7082",
"c0e356fa-e36a-4477-973a-556032ed0262",
"d47c7e44-37b2-454b-abcd-743c1820603b",
"008b1512-eed6-4d5f-9207-e064882a4844"
"008b1512-eed6-4d5f-9207-e064882a4844",
"57fd057a-79d6-4298-a8d5-807f353ec3b9"
],
"tutorial": ""
}

@ -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,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": "375a746a-804f-4301-8d8e-7ce40f231c36",
"modelName": "GMIncludedFile",
"mvc": "1.0",
"name": "Sekaiwa_Koini_Ochiteru.txt",
"CopyToMask": -1,
"exists": false,
"exportAction": 0,
"exportDir": "",
"fileName": "Sekaiwa_Koini_Ochiteru.txt",
"filePath": "datafiles\\songdata",
"freeData": false,
"origName": "",
"overwrite": false,
"removeEnd": false,
"size": 0,
"store": false,
"tags": ""
}

@ -55,4 +55,7 @@ FLICKER_TIME = 0
FLICKER_OFFSET = 0.5 //Amount of time in seconds to offset the flicker. Set with END key in EDIT MODE.
LAST_BEAT += FLICKER_OFFSET
LAST_BEAT += FLICKER_OFFSET
saveactions = "F3 - Save new data."
debugtxt = ""

@ -33,4 +33,8 @@ if (global.mode==1) {
draw_set_color(c_white)
draw_text(camera_get_view_x(view_camera[0]),0,string(TIME_BETWEEN_BEAT))
draw_text(camera_get_view_x(view_camera[0]),16,string(LAST_BEAT%TIME_BETWEEN_BEAT))
draw_set_halign(fa_right)
draw_text(camera_get_view_x(view_camera[0])+camera_get_view_width(view_camera[0]),0,saveactions)
draw_text(camera_get_view_x(view_camera[0])+camera_get_view_width(view_camera[0]),string_height(debugtxt),debugtxt)
draw_set_halign(fa_left)
}

@ -0,0 +1,3 @@
/// @description Save data.
song_file_writer("songdata"+audio_get_name(global.music_selection)+".txt")
debugtxt = "Saved Song Data !"

@ -43,6 +43,26 @@
"enumb": 35,
"eventtype": 9,
"m_owner": "22998e6f-2f12-4c9e-8ab3-f05bf4af3bf5"
},
{
"id": "4221f34a-b34a-4d31-83a2-47f038d42159",
"modelName": "GMEvent",
"mvc": "1.0",
"IsDnD": false,
"collisionObjectId": "00000000-0000-0000-0000-000000000000",
"enumb": 54,
"eventtype": 6,
"m_owner": "22998e6f-2f12-4c9e-8ab3-f05bf4af3bf5"
},
{
"id": "28554264-a583-494b-9ae4-2a870dc8dcb5",
"modelName": "GMEvent",
"mvc": "1.0",
"IsDnD": false,
"collisionObjectId": "00000000-0000-0000-0000-000000000000",
"enumb": 114,
"eventtype": 9,
"m_owner": "22998e6f-2f12-4c9e-8ab3-f05bf4af3bf5"
}
],
"maskSpriteId": "00000000-0000-0000-0000-000000000000",

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

@ -0,0 +1,38 @@
/// @function song_file_reader(filename)
/// @description Reads a song file and creates the appropriate playfield for the song.
/// @param filename The file to read from.
/*<FILE START>
TITLE
SONGID
OFFSET
BPM
NOTETYPE
NOTETYPE,NOTEDATA,TIMING*/
global.SONG_file = file_text_open_read(argument0);
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 (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);
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);
}

@ -0,0 +1,8 @@
{
"id": "57fd057a-79d6-4298-a8d5-807f353ec3b9",
"modelName": "GMScript",
"mvc": "1.0",
"name": "song_file_reader1",
"IsCompatibility": false,
"IsDnD": false
}

@ -0,0 +1,27 @@
/// @function song_file_reader(filename)
/// @description Reads a song file and creates the appropriate playfield for the song.
/// @param filename The file to read from.
/*<FILE START>
TITLE
SONGID
OFFSET
BPM
NOTETYPE
NOTETYPE,NOTEDATA,TIMING*/
global.SONG_file = file_text_open_write(argument0);
file_text_write_string(global.SONG_file,global.SONG_title);
file_text_writeln(global.SONG_file);
file_text_write_real(global.SONG_file,global.SONG_songid);
file_text_writeln(global.SONG_file);
file_text_write_string(global.SONG_file,global.SONG_offset);
file_text_writeln(global.SONG_file);
file_text_write_real(global.SONG_file,global.SONG_bpm);
file_text_writeln(global.SONG_file);
var i=0;
while (global.SONG_note[i]!=0) {
global.SONG_note[i]=file_text_write_string(global.SONG_file,global.SONG_note[i]);
file_text_writeln(global.SONG_file);
}
file_text_close(global.SONG_file)

@ -0,0 +1,8 @@
{
"id": "57fd057a-79d6-4298-a8d5-807f353ec3b9",
"modelName": "GMScript",
"mvc": "1.0",
"name": "song_file_writer",
"IsCompatibility": false,
"IsDnD": false
}

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

@ -0,0 +1,13 @@
{
"id": "246b6677-8b24-4947-9115-36b8d4fc01e8",
"modelName": "GMFolder",
"mvc": "1.1",
"name": "246b6677-8b24-4947-9115-36b8d4fc01e8",
"children": [
"375a746a-804f-4301-8d8e-7ce40f231c36"
],
"filterType": "GMIncludedFile",
"folderName": "songdata",
"isDefaultView": false,
"localisedFolderName": ""
}

@ -10,7 +10,8 @@
"9b3969f3-bd44-47ed-9b48-f6c85ded7082",
"c0e356fa-e36a-4477-973a-556032ed0262",
"d47c7e44-37b2-454b-abcd-743c1820603b",
"008b1512-eed6-4d5f-9207-e064882a4844"
"008b1512-eed6-4d5f-9207-e064882a4844",
"57fd057a-79d6-4298-a8d5-807f353ec3b9"
],
"filterType": "GMScript",
"folderName": "scripts",

Loading…
Cancel
Save