This repository has been archived by the owner on Oct 8, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 0079d01
Showing
89 changed files
with
1,606 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
*.png binary | ||
*.jpg binary | ||
*.ttf binary | ||
*.scn binary | ||
*.ogg binary | ||
*.smp binary | ||
|
||
*.cfg text eol=lf | ||
*.gd text eol=lf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Temp files | ||
*~ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,116 @@ | ||
Title: | ||
8 bit Title or Theme | ||
|
||
Author: | ||
ShwiggityShwag | ||
|
||
URL: | ||
http://opengameart.org/content/8-bit-title-or-theme | ||
|
||
License(s): | ||
* CC-BY 3.0 ( http://creativecommons.org/licenses/by/3.0/legalcode ) | ||
|
||
Copyright/Attribution Notice: | ||
Just give me credit if it's not too much trouble :) | ||
|
||
File(s): | ||
* Loop_1.ogg | ||
|
||
---------------------------------------- | ||
|
||
Title: | ||
Retro Space BGM | ||
|
||
Author: | ||
Monster Logix Studio | ||
|
||
URL: | ||
http://opengameart.org/content/retro-space-bgm | ||
|
||
License(s): | ||
* CC0 ( http://creativecommons.org/publicdomain/zero/1.0/legalcode ) | ||
|
||
File(s): | ||
* ancientbgm.mp3 | ||
* introwavybgm.mp3 | ||
|
||
---------------------------------------- | ||
|
||
Title: | ||
3 Ping Pong Sounds 8 bit style | ||
|
||
Author: | ||
captaincrunch80 | ||
|
||
URL: | ||
http://opengameart.org/content/3-ping-pong-sounds-8-bit-style | ||
|
||
License(s): | ||
* CC0 ( http://creativecommons.org/publicdomain/zero/1.0/legalcode ) | ||
|
||
File(s): | ||
* sounds_ping_pong_8bit.zip | ||
|
||
---------------------------------------- | ||
|
||
Title: | ||
Arcade Pack | ||
|
||
Author: | ||
Buch | ||
|
||
URL: | ||
http://opengameart.org/content/arcade-pack | ||
|
||
License(s): | ||
* CC0 ( http://creativecommons.org/publicdomain/zero/1.0/legalcode ) | ||
|
||
SPECIAL ATTRIBUTION INSTRUCTIONS: | ||
NOT REQUIRED, though appreciated: credit me as Buch and link either back to my OGA profile page or to http://blog-buch.rhcloud.com | ||
|
||
File(s): | ||
* arcadArne_sheet.png | ||
|
||
---------------------------------------- | ||
|
||
Title: | ||
Ringmodulated voice saying "Yeah" | ||
|
||
Author: | ||
Arthur | ||
|
||
URL: | ||
http://opengameart.org/content/ringmodulated-voice-saying-yeah | ||
|
||
License(s): | ||
* CC-BY-SA 3.0 ( http://creativecommons.org/licenses/by-sa/3.0/legalcode ) | ||
* GPL 3.0 ( http://www.gnu.org/licenses/gpl-3.0.html ) | ||
* GPL 2.0 ( http://www.gnu.org/licenses/old-licenses/gpl-2.0.html ) | ||
|
||
File(s): | ||
* yeah_random_ringmodulator_chopped.wav | ||
|
||
---------------------------------------- | ||
|
||
Title: | ||
[LPC] Interface Items Contribution by Tempest in the Aether | ||
|
||
Author: | ||
Tempest in the Aether and Ryzom Core | ||
|
||
URL: | ||
http://opengameart.org/content/lpc-interface-items-contribution-by-tempest-in-the-aether | ||
|
||
License(s): | ||
* CC-BY-SA 3.0 ( http://creativecommons.org/licenses/by-sa/3.0/legalcode ) | ||
|
||
SPECIAL ATTRIBUTION INSTRUCTIONS: | ||
Credit Tempest in the Aether and Ryzom Core and post derivative works on opengameart.org | ||
|
||
File(s): | ||
* Tempest_In_The_Aether_Interface.7z | ||
* Tempest_In_The_Aether_Interface.zip | ||
|
||
---------------------------------------- | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
The MIT License (MIT) | ||
|
||
Copyright (c) 2015 George Marques | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# BlockPop | ||
|
||
A simple Breakout clone made with the [Godot Engine](http://www.godotengine.org). | ||
|
||
## Running | ||
|
||
If you have the [Godot Engine](http://www.godotengine.org), just download the repo and run the project inside the `game` folder with it. | ||
|
||
Otherwise you can download one of the [releases in this repo](https://github.com/vnen/blockpop/releases) and just run the binary. | ||
|
||
## License | ||
|
||
All the code in here is licensed with MIT. The assets have their own license, though. | ||
|
||
## Credits | ||
|
||
### Art | ||
|
||
* [__Arcade Pack__](http://opengameart.org/content/arcade-pack) by [Buch](http://opengameart.org/users/buch). | ||
* [__Interace items for Tempest in the Aether__](http://opengameart.org/content/lpc-interface-items-contribution-by-tempest-in-the-aether) by [Tempest in the Aether](http://tempestintheaether.org) and [Ryzom Core](http://www.ryzomcore.org). | ||
|
||
### Sound | ||
|
||
* [__8 bit theme__](http://opengameart.org/content/8-bit-title-or-theme) by [Shwiggity Shwag](http://opengameart.org/users/shwiggityshwag). | ||
* [__Retro Space BGM__](http://opengameart.org/content/retro-space-bgm) by [Monster Logix Studio](http://opengameart.org/users/monster-logix-studio). | ||
* [__3 Ping Pong Sounds 8 bit style__](http://opengameart.org/content/3-ping-pong-sounds-8-bit-style) by [captaincrunch80](http://opengameart.org/users/captaincrunch80). | ||
* [__Ringmodulated voice saying "Yeah"__](http://opengameart.org/content/ringmodulated-voice-saying-yeah) by [Arthur](http://opengameart.org/users/arthur). | ||
|
||
### Fonts | ||
|
||
* [__DejaVu fonts__](http://dejavu-fonts.org) that are released under a [free license](http://dejavu-fonts.org/wiki/License). |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
|
||
extends RigidBody2D | ||
|
||
export(float) var initial_speed = 150.0 | ||
export(float) var pad_acceleration = 1.02 | ||
export(float) var max_speed = 500.0 | ||
export(float) var min_speed = 100.0 | ||
export(float) var acceleration_factor = 1.2 | ||
|
||
var speed | ||
var initial_direction = Vector2(1, 1).normalized() | ||
var direction | ||
|
||
func _ready(): | ||
direction = initial_direction | ||
pass | ||
|
||
func start(): | ||
speed = 0 | ||
set_linear_velocity(direction * speed) | ||
set_process_input(true) | ||
|
||
func _input(event): | ||
if(speed == 0): | ||
if(event.is_pressed() and !event.is_echo() and event.is_action("start")): | ||
direction = initial_direction | ||
speed = initial_speed | ||
set_linear_velocity(speed * direction) | ||
|
||
func _integrate_forces(state): | ||
state.set_angular_velocity(0) | ||
|
||
if(speed == 0): | ||
reset_pos() | ||
if(!get_node("/root/level_manager").locked and state.get_contact_count() > 0): | ||
var body = state.get_contact_collider_object(0) | ||
if(body.is_in_group("bottom")): | ||
state.set_linear_velocity(Vector2(0, 0)) | ||
speed = 0 | ||
var lives = get_node("/root/score_manager").decrease_life() | ||
reset_pos() | ||
elif(body.is_in_group("brick")): | ||
body.destroy() | ||
call_deferred("on_destroy_brick") | ||
elif(body.is_in_group("pad")): | ||
var ball_pos = get_global_pos() | ||
var pad_pos = body.get_global_pos() | ||
var pad_to_ball = (ball_pos - pad_pos).normalized() | ||
speed *= pad_acceleration | ||
set_linear_velocity(pad_to_ball * speed) | ||
|
||
func on_destroy_brick(): | ||
if(get_tree().get_nodes_in_group("brick").size() == 0): | ||
speed = 0 | ||
get_node("/root/level_manager").advance() | ||
|
||
func reset_pos(): | ||
var start = get_tree().get_nodes_in_group("ball_start") | ||
if(start.size() == 0): | ||
return | ||
call_deferred("set_pos", start[0].get_global_pos()) | ||
|
||
func increase_speed(): | ||
if(speed != 0): | ||
speed = clamp(speed * acceleration_factor, min_speed, max_speed) | ||
update_velocity() | ||
|
||
func decrease_speed(): | ||
if(speed != 0): | ||
speed = clamp(speed / acceleration_factor, min_speed, max_speed) | ||
update_velocity() | ||
|
||
func update_velocity(): | ||
direction = get_linear_velocity().normalized() | ||
set_linear_velocity(direction * speed) |
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
gen_mipmaps=false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
|
||
extends StaticBody2D | ||
|
||
export(Color) var brick_color = Color(1, 1, 1) | ||
export(int) var brick_value = 100 | ||
# The higher this value the less likely to drop a powerup | ||
export(int, 0, 19) var min_drop = 0 | ||
|
||
var powerup = preload("res://powerups/powerup.scn") | ||
var powerups = [ | ||
{ "res": preload("res://powerups/effects/kill.gd"), "weight": 1 }, | ||
{ "res": preload("res://powerups/effects/life.gd"), "weight": 1 }, | ||
{ "res": preload("res://powerups/effects/fast.gd"), "weight": 4 }, | ||
{ "res": preload("res://powerups/effects/slow.gd"), "weight": 4 }, | ||
{ "res": preload("res://powerups/effects/plus.gd"), "weight": 6 }, | ||
{ "res": preload("res://powerups/effects/minus.gd"), "weight": 6 } | ||
] | ||
var total_weight = 0 | ||
|
||
func _ready(): | ||
modulate() | ||
powerups.sort_custom(self, "powerup_sorter") | ||
for pp in powerups: | ||
total_weight += pp.weight | ||
pp["range"] = total_weight | ||
|
||
func destroy(): | ||
randomize() | ||
var chance = randi() % 20 | ||
if(chance >= min_drop): | ||
drop_powerup() | ||
queue_free() | ||
get_node("/root/score_manager").add_score(brick_value) | ||
get_node("/root/sound_manager").play("brick") | ||
|
||
func drop_powerup(): | ||
var p = powerup.instance() | ||
var fx = pick_random_powerup() | ||
p.attach_effect(fx) | ||
var ball = get_tree().get_nodes_in_group("ball")[0] | ||
get_tree().get_current_scene().add_child(p) | ||
p.set_global_pos(get_global_pos()) | ||
p.set_linear_velocity(get_global_pos() - ball.get_global_pos()) | ||
|
||
func pick_random_powerup(): | ||
var chance = (randi() % total_weight) | ||
for pp in powerups: | ||
if(chance < pp["range"]): | ||
var instance = pp.res.new() | ||
instance.set("point_value", (10 - pp.weight) * 100) | ||
return instance | ||
|
||
func powerup_sorter(p1, p2): | ||
if(p1["weight"] < p2["weight"]): | ||
return true | ||
else: | ||
return false | ||
|
||
func modulate(): | ||
for sprite in get_node("sprites").get_children(): | ||
sprite.set_modulate(brick_color) |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
[application] | ||
|
||
name="BlockPop" | ||
main_scene="res://splash.scn" | ||
disable_stdout=false | ||
icon="res://blockpop.png" | ||
target_fps=60 | ||
|
||
[audio] | ||
|
||
output_latency=10 | ||
use_chorus_reverb=false | ||
stream_volume_scale=1.0 | ||
fx_volume_scale=0.5 | ||
|
||
[autoload] | ||
|
||
score_manager="res://scripts/score_manager.gd" | ||
sound_manager="res://sound_manager.scn" | ||
level_manager="res://scripts/level_manager.gd" | ||
scene_manager="res://scripts/scene_manager.gd" | ||
settings_manager="res://scripts/settings_manager.gd" | ||
savegame_manager="res://scripts/savegame_manager.gd" | ||
|
||
[display] | ||
|
||
emulate_touchscreen=false | ||
stretch_mode="viewport" | ||
stretch_aspect="keep_width" | ||
|
||
[image_loader] | ||
|
||
gen_mipmaps=false | ||
filter=false | ||
|
||
[input] | ||
|
||
ui_accept=[key(Return), key(Enter), key(Space), jbutton(0, 0)] | ||
ui_focus_next=[key(Tab)] | ||
ui_focus_prev=[key(Tab, S)] | ||
ui_left=[key(Left), jbutton(0, 14)] | ||
ui_right=[key(Right), jbutton(0, 15)] | ||
ui_up=[key(Up), jbutton(0, 12)] | ||
ui_down=[key(Down), jbutton(0, 13)] | ||
ui_page_up=[key(PageUp)] | ||
ui_page_down=[key(PageDown)] | ||
move_left=[key(Left)] | ||
move_right=[key(Right)] | ||
start=[key(Space)] | ||
pause=[key(Escape)] | ||
skip_level=[key(S)] | ||
increase_level=[key(W)] | ||
decrease_level=[key(Q)] | ||
save=[key(O)] | ||
|
||
[locale] | ||
|
||
fallback=" en" | ||
|
||
[rasterizer] | ||
|
||
use_pixel_snap=false | ||
|
||
[render] | ||
|
||
default_clear_color=#ff010101 |
Oops, something went wrong.