Commit 107098ba authored by Ulises Gaytan's avatar Ulises Gaytan 💬

First commit

parents
{
"id": "d03a85b5-df42-4e8f-b7ba-14fc5bfa2e8b",
"modelName": "GMProject",
"mvc": "1.0",
"IsDnDProject": false,
"configs": [
],
"option_ecma": false,
"parentProject": {
"id": "4712a6b8-801f-4801-8d85-9ed18a2011da",
"modelName": "GMProjectParent",
"mvc": "1.0",
"alteredResources": [
{
"Key": "ed6a955d-5826-4f98-a450-10b414266c27",
"Value": {
"configDeltas": [
"inherited"
],
"id": "f0b97258-c3bb-4f7e-b072-02290d43237a",
"resourcePath": "options\\main\\options_main.yy",
"resourceType": "GMMainOptions"
}
}
],
"hiddenResources": [
],
"projectPath": "${base_project}"
},
"resources": [
{
"Key": "0bf000a4-6db3-4343-b8d8-4094460429a4",
"Value": {
"id": "b273afa2-a22e-4081-bd72-07541c8d8792",
"resourcePath": "views\\0bf000a4-6db3-4343-b8d8-4094460429a4.yy",
"resourceType": "GMFolder"
}
},
{
"Key": "101bcda5-8bcb-4bf1-ab43-0f8191722922",
"Value": {
"id": "71c5f316-b78c-40f7-bfec-5cfe2c364b48",
"resourcePath": "sprites\\spr_asteroid_med\\spr_asteroid_med.yy",
"resourceType": "GMSprite"
}
},
{
"Key": "1bf0a2e2-3f39-40d7-9f1b-976885186783",
"Value": {
"id": "d9e86af5-37d9-4725-ae12-82502d755645",
"resourcePath": "views\\1bf0a2e2-3f39-40d7-9f1b-976885186783.yy",
"resourceType": "GMFolder"
}
},
{
"Key": "23c05215-9e92-4e39-a8e3-addaa1c7fdde",
"Value": {
"id": "c2e8caa1-6934-44fc-82a6-a19a55f5c7d1",
"resourcePath": "views\\23c05215-9e92-4e39-a8e3-addaa1c7fdde.yy",
"resourceType": "GMFolder"
}
},
{
"Key": "682d8e1f-278c-4149-a614-44b3acd4f83d",
"Value": {
"id": "b948e7c9-47ff-49f9-8938-7eaf03d8cc16",
"resourcePath": "views\\682d8e1f-278c-4149-a614-44b3acd4f83d.yy",
"resourceType": "GMFolder"
}
},
{
"Key": "69470eb4-8433-4912-9203-04bff749331b",
"Value": {
"id": "278daee6-fecc-42ae-ac05-db8faffcdc6f",
"resourcePath": "views\\69470eb4-8433-4912-9203-04bff749331b.yy",
"resourceType": "GMFolder"
}
},
{
"Key": "6f477955-ef25-454a-b33b-d742d0f70093",
"Value": {
"id": "90343f70-f6fa-43c2-a973-087a17d77cca",
"resourcePath": "views\\6f477955-ef25-454a-b33b-d742d0f70093.yy",
"resourceType": "GMFolder"
}
},
{
"Key": "8e1cf7c4-ba54-47e8-aa2a-94b31b73785e",
"Value": {
"id": "c6a17a6c-888c-4e00-9471-9b886228333e",
"resourcePath": "views\\8e1cf7c4-ba54-47e8-aa2a-94b31b73785e.yy",
"resourceType": "GMFolder"
}
},
{
"Key": "8ed7b8be-a6a6-4d29-a693-25524bec43b5",
"Value": {
"id": "b56aef49-2549-4d86-84b1-ce3b447e43da",
"resourcePath": "views\\8ed7b8be-a6a6-4d29-a693-25524bec43b5.yy",
"resourceType": "GMFolder"
}
},
{
"Key": "ab6e1d40-433e-43ae-94e4-2b888f24bab2",
"Value": {
"id": "e9901f53-70ec-46bf-858d-06f670115d74",
"resourcePath": "views\\ab6e1d40-433e-43ae-94e4-2b888f24bab2.yy",
"resourceType": "GMFolder"
}
},
{
"Key": "aca8810f-3e9f-4627-a3f3-55b21afbe5f0",
"Value": {
"id": "18eaa7e9-5bbb-4575-be8c-6103dddeef05",
"resourcePath": "sprites\\spr_asteroid_small\\spr_asteroid_small.yy",
"resourceType": "GMSprite"
}
},
{
"Key": "b4f1bdac-4607-4f99-9fed-677de6efb32f",
"Value": {
"id": "93ef46e3-f7b5-4978-902a-1acd7c79da4d",
"resourcePath": "views\\b4f1bdac-4607-4f99-9fed-677de6efb32f.yy",
"resourceType": "GMFolder"
}
},
{
"Key": "b862f709-0b96-406c-81bc-3b10daaa050b",
"Value": {
"id": "a7a4e721-e994-4f50-856b-df47de7c1198",
"resourcePath": "sprites\\spr_ship\\spr_ship.yy",
"resourceType": "GMSprite"
}
},
{
"Key": "bb059795-3f7a-462e-b79f-e15ade90771e",
"Value": {
"id": "927cc119-4a56-4031-bd8b-aa04bd836f13",
"resourcePath": "views\\bb059795-3f7a-462e-b79f-e15ade90771e.yy",
"resourceType": "GMFolder"
}
},
{
"Key": "bf145a80-8a6b-4a39-b46d-8e21ec597c7b",
"Value": {
"id": "881ccac0-166e-4a5e-b929-09a79cbe6064",
"resourcePath": "views\\bf145a80-8a6b-4a39-b46d-8e21ec597c7b.yy",
"resourceType": "GMFolder"
}
},
{
"Key": "c0bca26a-fc9b-4054-9f1a-0f8c8ca40ca1",
"Value": {
"id": "c29fa583-566f-4296-a9ec-f62b1ffa82ed",
"resourcePath": "views\\c0bca26a-fc9b-4054-9f1a-0f8c8ca40ca1.yy",
"resourceType": "GMFolder"
}
},
{
"Key": "cc98d028-7bdd-4680-85f3-c87a7baa481e",
"Value": {
"id": "f0be9afe-0790-43b2-9c55-2ba0619b81b3",
"resourcePath": "options\\windows\\options_windows.yy",
"resourceType": "GMWindowsOptions"
}
},
{
"Key": "d1f92236-ebe1-4e6d-a915-ed30a95f74c7",
"Value": {
"id": "75ed80b5-7bcd-4e3a-b31c-a51a198b4df1",
"resourcePath": "views\\d1f92236-ebe1-4e6d-a915-ed30a95f74c7.yy",
"resourceType": "GMFolder"
}
},
{
"Key": "e05384ce-241d-4ae0-8cfb-3ec07d4e2922",
"Value": {
"id": "c8ecacd1-2d20-4ac4-b5d9-06d5fcfa58f0",
"resourcePath": "views\\e05384ce-241d-4ae0-8cfb-3ec07d4e2922.yy",
"resourceType": "GMFolder"
}
},
{
"Key": "e825c539-c845-4073-af7f-ca0c2dadec68",
"Value": {
"id": "ac349578-4a69-4f60-a61b-1a426cc2dacf",
"resourcePath": "views\\e825c539-c845-4073-af7f-ca0c2dadec68.yy",
"resourceType": "GMFolder"
}
},
{
"Key": "fceb2150-96ff-48d3-b28a-3b5abfd65aa4",
"Value": {
"id": "e3578167-d7fd-4239-840d-92b30f78d127",
"resourcePath": "rooms\\room0\\room0.yy",
"resourceType": "GMRoom"
}
}
],
"script_order": [
],
"tutorial": ""
}
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
sprite_index = choose(
spr_asteroid_small,
spr_asteroid_huge,
spr_asteroid_big
);
direction = irandom_range(1, 359);
image_angle = irandom_range(1, 359);
speed = 1;
move_wrap(true, true, sprite_width/2);
image_angle = image_angle + 1;
\ No newline at end of file
{
"id": "719aaadb-3a37-460f-8935-5418d39d23a5",
"modelName": "GMObject",
"mvc": "1.0",
"name": "obj_asteroid",
"eventList": [
{
"id": "b3fa3b63-0847-4dae-b8d6-0c570f9f0976",
"modelName": "GMEvent",
"mvc": "1.0",
"IsDnD": false,
"collisionObjectId": "00000000-0000-0000-0000-000000000000",
"enumb": 0,
"eventtype": 0,
"m_owner": "719aaadb-3a37-460f-8935-5418d39d23a5"
},
{
"id": "6efa4fd1-e652-4357-ae48-c92f9871b7fa",
"modelName": "GMEvent",
"mvc": "1.0",
"IsDnD": false,
"collisionObjectId": "00000000-0000-0000-0000-000000000000",
"enumb": 0,
"eventtype": 3,
"m_owner": "719aaadb-3a37-460f-8935-5418d39d23a5"
}
],
"maskSpriteId": "00000000-0000-0000-0000-000000000000",
"overriddenProperties": null,
"parentObjectId": "00000000-0000-0000-0000-000000000000",
"persistent": false,
"physicsAngularDamping": 0.1,
"physicsDensity": 0.5,
"physicsFriction": 0.2,
"physicsGroup": 0,
"physicsKinematic": false,
"physicsLinearDamping": 0.1,
"physicsObject": false,
"physicsRestitution": 0.1,
"physicsSensor": false,
"physicsShape": 1,
"physicsShapePoints": null,
"physicsStartAwake": true,
"properties": null,
"solid": false,
"spriteId": "ab55ff82-88fb-4d1d-9ec1-1dfd5e35d5d4",
"visible": true
}
\ No newline at end of file
lives += 1;
instance_destroy();
with(other)
instance_destroy();
\ No newline at end of file
score += 10;
audio_play_sound(snd_die, 1, false);
instance_destroy();
with(other){
instance_destroy();
if(sprite_index == spr_asteroid_huge){
repeat(2){
var new_asteroid = instance_create_layer(x,y, "Instances", obj_asteroid);
new_asteroid.sprite_index = spr_asteroid_big;
}
} else if(sprite_index == spr_asteroid_big){
repeat(2){
var new_asteroid = instance_create_layer(x,y, "Instances", obj_asteroid);
new_asteroid.sprite_index = spr_asteroid_small;
}
}
repeat(10){
instance_create_layer(x,y, "Instances", obj_debris)
}
}
\ No newline at end of file
instance_destroy();
with(other)
instance_destroy();
\ No newline at end of file
speed = 6;
\ No newline at end of file
instance_destroy();
\ No newline at end of file
{
"id": "4b9d6d76-083c-4684-8b21-381ee5b7c543",
"modelName": "GMObject",
"mvc": "1.0",
"name": "obj_bullet",
"eventList": [
{
"id": "773abb4a-72db-428c-a59c-0c1ef4889eba",
"modelName": "GMEvent",
"mvc": "1.0",
"IsDnD": false,
"collisionObjectId": "00000000-0000-0000-0000-000000000000",
"enumb": 0,
"eventtype": 0,
"m_owner": "4b9d6d76-083c-4684-8b21-381ee5b7c543"
},
{
"id": "8e7a9d9f-2911-4723-a408-a9e95be4d5d8",
"modelName": "GMEvent",
"mvc": "1.0",
"IsDnD": false,
"collisionObjectId": "719aaadb-3a37-460f-8935-5418d39d23a5",
"enumb": 0,
"eventtype": 4,
"m_owner": "4b9d6d76-083c-4684-8b21-381ee5b7c543"
},
{
"id": "88606511-09af-4951-9671-427493652d81",
"modelName": "GMEvent",
"mvc": "1.0",
"IsDnD": false,
"collisionObjectId": "00000000-0000-0000-0000-000000000000",
"enumb": 0,
"eventtype": 7,
"m_owner": "4b9d6d76-083c-4684-8b21-381ee5b7c543"
},
{
"id": "20cc578d-68cb-4278-b8df-c3900b2b2612",
"modelName": "GMEvent",
"mvc": "1.0",
"IsDnD": false,
"collisionObjectId": "68982bb5-9464-41f3-ace4-53820dcf767b",
"enumb": 0,
"eventtype": 4,
"m_owner": "4b9d6d76-083c-4684-8b21-381ee5b7c543"
},
{
"id": "c94ee23d-e725-4bb4-ae91-3f5bfbf7cecd",
"modelName": "GMEvent",
"mvc": "1.0",
"IsDnD": false,
"collisionObjectId": "57478c58-3e74-47eb-a4e8-99074b881766",
"enumb": 0,
"eventtype": 4,
"m_owner": "4b9d6d76-083c-4684-8b21-381ee5b7c543"
}
],
"maskSpriteId": "00000000-0000-0000-0000-000000000000",
"overriddenProperties": null,
"parentObjectId": "00000000-0000-0000-0000-000000000000",
"persistent": false,
"physicsAngularDamping": 0.1,
"physicsDensity": 0.5,
"physicsFriction": 0.2,
"physicsGroup": 0,
"physicsKinematic": false,
"physicsLinearDamping": 0.1,
"physicsObject": false,
"physicsRestitution": 0.1,
"physicsSensor": false,
"physicsShape": 1,
"physicsShapePoints": null,
"physicsStartAwake": true,
"properties": null,
"solid": false,
"spriteId": "00000000-0000-0000-0000-000000000000",
"visible": true
}
\ No newline at end of file
direction = irandom_range(1,359);
speed = 1;
\ No newline at end of file
image_alpha -= 0.01;
if(image_alpha <= 0){
instance_destroy();
}
\ No newline at end of file
{
"id": "51b0e11f-3081-46ec-81d6-a43f2da287a8",
"modelName": "GMObject",
"mvc": "1.0",
"name": "obj_debris",
"eventList": [
{
"id": "da4e6fbc-f866-45b3-bf3b-9f95d32d3841",
"modelName": "GMEvent",
"mvc": "1.0",
"IsDnD": false,
"collisionObjectId": "00000000-0000-0000-0000-000000000000",
"enumb": 0,
"eventtype": 0,
"m_owner": "51b0e11f-3081-46ec-81d6-a43f2da287a8"
},
{
"id": "a07cdffd-0fda-4f11-9c3d-6e2578416849",
"modelName": "GMEvent",
"mvc": "1.0",
"IsDnD": false,
"collisionObjectId": "00000000-0000-0000-0000-000000000000",
"enumb": 0,
"eventtype": 3,
"m_owner": "51b0e11f-3081-46ec-81d6-a43f2da287a8"
}
],
"maskSpriteId": "00000000-0000-0000-0000-000000000000",
"overriddenProperties": null,
"parentObjectId": "00000000-0000-0000-0000-000000000000",
"persistent": false,
"physicsAngularDamping": 0.1,
"physicsDensity": 0.5,
"physicsFriction": 0.2,
"physicsGroup": 0,
"physicsKinematic": false,
"physicsLinearDamping": 0.1,
"physicsObject": false,
"physicsRestitution": 0.1,
"physicsSensor": false,
"physicsShape": 1,
"physicsShapePoints": null,
"physicsStartAwake": true,
"properties": null,
"solid": false,
"spriteId": "0cb44450-e43d-4acd-b027-80ee9fc5b4bc",
"visible": true
}
\ No newline at end of file
direction = irandom_range(0, 359);
image_angle = irandom_range(0, 359);
speed = 0.1;
\ No newline at end of file
move_wrap(true,true,sprite_width/2)
image_angle = image_angle + 1;
{
"id": "a07c6523-fd50-468f-aaf3-62f741d58e55",
"modelName": "GMObject",
"mvc": "1.0",
"name": "obj_energy",
"eventList": [
{
"id": "071e2f15-0fed-40fe-9ca0-4eca2b7c16d0",
"modelName": "GMEvent",
"mvc": "1.0",
"IsDnD": false,
"collisionObjectId": "00000000-0000-0000-0000-000000000000",
"enumb": 0,
"eventtype": 0,
"m_owner": "a07c6523-fd50-468f-aaf3-62f741d58e55"
},
{
"id": "ef30ac86-7322-430b-a8b1-5a988d84e7d8",
"modelName": "GMEvent",
"mvc": "1.0",
"IsDnD": false,
"collisionObjectId": "00000000-0000-0000-0000-000000000000",
"enumb": 0,
"eventtype": 3,
"m_owner": "a07c6523-fd50-468f-aaf3-62f741d58e55"
}
],
"maskSpriteId": "00000000-0000-0000-0000-000000000000",
"overriddenProperties": null,
"parentObjectId": "00000000-0000-0000-0000-000000000000",
"persistent": false,
"physicsAngularDamping": 0.1,
"physicsDensity": 0.5,
"physicsFriction": 0.2,
"physicsGroup": 0,
"physicsKinematic": false,
"physicsLinearDamping": 0.1,
"physicsObject": false,
"physicsRestitution": 0.1,
"physicsSensor": false,
"physicsShape": 1,
"physicsShapePoints": null,
"physicsStartAwake": true,
"properties": null,
"solid": false,
"spriteId": "fc2b0f2f-0443-402a-acd7-0245abc009c2",
"visible": true
}
\ No newline at end of file
direction = irandom_range(0, 359);
image_angle = irandom_range(0, 359);
speed = 0.1;
\ No newline at end of file
move_wrap(true,true,sprite_width/2)
image_angle = 0;
{
"id": "5ca91d37-c118-4aff-ad6e-e3a03822f27a",
"modelName": "GMObject",
"mvc": "1.0",
"name": "obj_fix",
"eventList": [
{
"id": "5479652f-1057-45d6-8230-1fa2dbbca388",
"modelName": "GMEvent",
"mvc": "1.0",
"IsDnD": false,
"collisionObjectId": "00000000-0000-0000-0000-000000000000",
"enumb": 0,
"eventtype": 0,
"m_owner": "5ca91d37-c118-4aff-ad6e-e3a03822f27a"
},
{
"id": "6002ec75-7b87-414e-a110-edd3237988eb",
"modelName": "GMEvent",
"mvc": "1.0",
"IsDnD": false,
"collisionObjectId": "00000000-0000-0000-0000-000000000000",
"enumb": 0,
"eventtype": 3,
"m_owner": "5ca91d37-c118-4aff-ad6e-e3a03822f27a"
}
],
"maskSpriteId": "00000000-0000-0000-0000-000000000000",
"overriddenProperties": null,
"parentObjectId": "00000000-0000-0000-0000-000000000000",
"persistent": false,
"physicsAngularDamping": 0.1,
"physicsDensity": 0.5,
"physicsFriction": 0.2,
"physicsGroup": 0,
"physicsKinematic": false,
"physicsLinearDamping": 0.1,
"physicsObject": false,
"physicsRestitution": 0.1,
"physicsSensor": false,
"physicsShape": 1,
"physicsShapePoints": null,
"physicsStartAwake": true,
"properties": null,
"solid": false,
"spriteId": "732f668a-35c1-4c3c-a36c-373730343f2b",
"visible": true
}
\ No newline at end of file
if(room != rm_game){
exit;
}
if(choose(0, 1) == 0){
//go down side
var xx = choose(0, room_width);
var yy = irandom_range(room_height, 0);
} else {
//go down bottom
var xx = irandom_range(0, room_width);
var yy = choose( room_height, 0);
}
instance_create_layer(xx, yy, "Instances", obj_asteroid);
alarm[0] = 4*room_speed;
\ No newline at end of file
room_restart();
\ No newline at end of file
if(room != rm_game){
exit;
}
if(choose(0, 1) == 0){
//go down side
var xx = choose(0, room_width);
var yy = irandom_range(room_height, 0);
} else {
//go down bottom
var xx = irandom_range(0, room_width);
var yy = choose( room_height, 0);
}
choose(1, 2, 3);
switch(random_resource)
{
case 1:
instance_create_layer(xx, yy, "Instances", obj_oxygen);
break;
case 2:
instance_create_layer(xx, yy, "Instances", obj_water);
break;
case 3:
instance_create_layer(xx, yy, "Instances", obj_energy);
break;
case 4:
instance_create_layer(xx, yy, "Instances", obj_fix);
break;
};
alarm[0] = 8*room_speed;
\ No newline at end of file
lives = 3;
draw_set_font(fnt_text);
randomize();
\ No newline at end of file
switch(room){
case rm_game:
draw_set_halign(fa_center);
draw_text (250, 15,
@"OBJECTIVE:
SURVIVE"
);
draw_set_halign(fa_left);
draw_set_halign(fa_right);
draw_text ( 485, 15, "Lives: " +string(lives));
draw_set_halign(fa_right);
draw_sprite(spr_health_bar_bg, 1, 15, 15);
if (instance_exists(obj_ship)){
draw_sprite_ext(spr_health_bar_filling, 1, 15, 15, obj_ship.oxygen/100, 1, 0, c_white, 1)
}
draw_sprite(spr_health_bar_border, 1, 15, 15);
draw_sprite(spr_health_bar_bg, 1, 15, 40);
if (instance_exists(obj_ship)){
draw_sprite_ext(spr_water_bar_filling, 1, 15, 40, obj_ship.water/100, 1, 0, c_white, 1)
}
draw_sprite(spr_water_bar_border, 1, 15, 40);