Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length

 
Advanced search

1066248 Posts in 43516 Topics- by 35539 Members - Latest Member: atrifox

November 24, 2014, 02:24:40 PM
TIGSource ForumsFeedbackDevLogsSubterrane [formerly Mining Game]
Pages: [1] 2 3 ... 28
Print
Author Topic: Subterrane [formerly Mining Game]  (Read 45759 times)
Ashkin
Level 10
*****


meow


View Profile
« on: September 01, 2011, 12:36:34 AM »

« Last Edit: April 06, 2012, 09:44:28 PM by Ashkin » Logged
ink.inc
Guest
« Reply #1 on: September 01, 2011, 12:42:25 AM »

 Gentleman Tophat smiley approves.
Logged
xsx
Level 0
**

Indie Developer

xsx@ngi.it
View Profile WWW Email
« Reply #2 on: September 01, 2011, 01:10:18 AM »

hmm, nice caves!
Logged

working hard!
Ashkin
Level 10
*****


meow


View Profile
« Reply #3 on: September 01, 2011, 02:17:08 AM »

   LOG 1ST SEPTEMBER 2011
Okay so today, just like yesterday, I attempted to get some optimization done. My current problem is that when I create an 800*800 tile map, it also creates thousands of mushrooms.
That's fine, aside from the fact that each one has a light object attached, which, for some reason, seems to take up a lot of CPU when they're all added together.
I tried switching them off completely while they're outside the focus, but it's not really helping.
I've got no idea what to do to make it faster, but I'll give up on it for tonight.
I hope I get this optimization out of the way soon. It's great seeing the end result, but I'm afraid I'll lose steam if I keep going like this.
Logged
namragog
Guest
« Reply #4 on: September 01, 2011, 05:37:10 AM »

 Hand Thumbs Up Left
Logged
saint11
Level 2
**


11


View Profile WWW Email
« Reply #5 on: September 01, 2011, 06:24:20 AM »

Hey this is awesome   Hand Thumbs Up Right  I love tiny games about exploring procedural caves
Logged

JasonPickering
Level 10
*****



View Profile WWW Email
« Reply #6 on: September 01, 2011, 07:48:25 AM »

Couple Questions:
1. what are you making this with? are you using flashpunk, flixel, or just regular old flash?
2. what it the purpose of the mushrooms? could there be one object and then the mushrooms are all displayed using a tilemap?
Logged

Ashkin
Level 10
*****


meow


View Profile
« Reply #7 on: September 01, 2011, 11:46:40 AM »

Couple Questions:
1. what are you making this with? are you using flashpunk, flixel, or just regular old flash?
2. what it the purpose of the mushrooms? could there be one object and then the mushrooms are all displayed using a tilemap?
1. I'm using Flixel to develop this.
2. I guess I could actually display them as tilemap objects but the mushrooms aren't the real problem here, it's the lightsources that they use. See John Sandoval's light tutorial for GM to see the theory on how I'm doing it, or just look at this code:
Mushroom class:
Code:
package Helpers.CaveGen
{
import org.flixel.FlxPoint;
import org.flixel.FlxSprite;
import org.flixel.FlxU;
import org.flixel.FlxG;
/**
* ...
* @author Ashkin
*/
public class Mushroom extends FlxSprite
{
[Embed(source = 'mushrooms.png')] public var ImgMushrooms:Class;

public var infocus:Boolean = false;
public var light:Light;
public var removed:Boolean = false;

public function Mushroom(X:int, Y:int)
{
super(X, Y);
loadGraphic(ImgMushrooms, true, true);

addAnimation("1", [0], 10, true);
addAnimation("2", [1], 10, true);
addAnimation("3", [2], 10, true);
addAnimation("4", [3], 10, true);

var random:int = Math.round(Math.random() * 3);

if (random == 0)
{
play("1");
}
if (random == 1)
{
play("2");
}
if (random == 2)
{
play("3");
}
if (random == 3)
{
play("4");
}

var random2:int = Math.round(Math.random());
if (random2 == 0)
{
facing = LEFT;
}
if (random2 == 1)
{
facing == RIGHT;
}

light = new Light(this, CaveGen.darkness, 100, 0xBAFFFF, 0.5);
light.on = true;
CaveGen.lights.add(light);

CaveGen.mushrooms.add(this);
}

override public function update():void
{
super.update();
}

override public function destroy():void
{
CaveGen.mushrooms.remove(this);
super.destroy();
}
}

}
Light class:
Code:
package Helpers.CaveGen
{
import org.flixel.FlxSprite;
import org.flixel.FlxG;
/**
* ...
* @author Ashkin
*/
public class Light extends FlxSprite
{
[Embed(source = 'light.png')] public var ImgLight:Class;

public var darkness:FlxSprite;
public var object:FlxSprite;
public var flickeramount:int = 100;
public var on:Boolean = false;

public function Light(_object:FlxSprite, _darkness:FlxSprite, _flickeramount:int = 100, tint:int = 0xFFFFFF, size:Number = 1):void
{
super(0, 0, ImgLight);

object = _object;

flickeramount = _flickeramount;

color = tint;

scale.x = size;
scale.y = size;

darkness = _darkness;
blend = "screen";
}

override public function update():void
{
if (on)
{
super.update();
}
}

override public function draw():void
{
if (on && Math.random()*100 <= flickeramount)
{
darkness.stamp(this, object.getScreenXY(null, CaveGen.camera).x - width/2, object.getScreenXY(null, CaveGen.camera).y - height/2);
}
}
}

}
Excuse the messy code.
Logged
CK
Level 9
****



View Profile WWW
« Reply #8 on: September 01, 2011, 02:58:15 PM »

The WIP explosion felt good.  The smoke particles should be nice Smiley Hand Thumbs Up Right
Logged

Ashkin
Level 10
*****


meow


View Profile
« Reply #9 on: September 01, 2011, 10:57:34 PM »

   LOG 2ND SEPTEMBER 2011
I'm still struggling with optimization. Haven't got anything else done because of it, and I'm getting tired of getting nowhere. Perhaps I'll have to consult someone for help on the issues.
Also, I made a banner to put in my sig. Since the game is so simple and I have so little creativity, maybe I should just stick with Mining Game as a title. Unless anyone else has suggestions.
Logged
Pishtaco
Level 10
*****



View Profile WWW
« Reply #10 on: September 01, 2011, 11:26:51 PM »

Also, I made a banner to put in my sig. Since the game is so simple and I have so little creativity, maybe I should just stick with Mining Game as a title. Unless anyone else has suggestions.

Unaccompanied Miner?

Logged

Ashkin
Level 10
*****


meow


View Profile
« Reply #11 on: September 02, 2011, 12:53:40 AM »

   LOG 2ND SEPTEMBER 2011- THE SEQUEL
Hooray! I fixed the speed issue, and, as usual, the solution was stupidly obvious. 800*800 tile maps and greater are now possible at this point!
Onwards to progress!
Also, I made a banner to put in my sig. Since the game is so simple and I have so little creativity, maybe I should just stick with Mining Game as a title. Unless anyone else has suggestions.
Unaccompanied Miner?
Hm. Not exactly catchy, and 'unaccompanied' seems too clunky for a title. I might not even put miner in the title, as that's a little... obvious.
Logged
starsrift
Level 10
*****


Apparently I am a ruiner of worlds. Ooops.


View Profile WWW
« Reply #12 on: September 02, 2011, 03:26:01 AM »

You should edit the first post to include the controls.

/ also I'm fond of "Ashkin's Mining Game", idk.
Logged

"Vigorous writing is concise." - William Strunk, Jr.
As is coding.

I take life with a grain of salt.
And a slice of lime, plus a shot of tequila.
JoGribbs
Guest
« Reply #13 on: September 02, 2011, 05:08:03 AM »

Wall Coins
I Wish I Wasn't Going To Die Down Here
Dirt Muncher
Dirty Sally
There is a Lot of Dirt Down Here
Coal and Gold
Mine Smells like Money
Miney Mines
The Mine That Time Forgot
The Mine That I Forgot
If You Like Mines...
Mine Me and Don't Stop
Bury Me With My Gold Coins
Mining: It's Crazy!
Mining: It's not Crazy
Logged
Droqen
Level 10
*****

aka nick fury


View Profile WWW Email
« Reply #14 on: September 02, 2011, 05:13:35 AM »

MY MINE IS MINE

(looks nice nice. :3)


(( what's mine is mine ))


(((  TOO MANY PUNS   )))
Logged

Ashkin
Level 10
*****


meow


View Profile
« Reply #15 on: September 02, 2011, 02:16:37 PM »

Wall Coins
I Wish I Wasn't Going To Die Down Here
Dirt Muncher
Dirty Sally
There is a Lot of Dirt Down Here
Coal and Gold
Mine Smells like Money
Miney Mines
The Mine That Time Forgot
The Mine That I Forgot
If You Like Mines...
Mine Me and Don't Stop
Bury Me With My Gold Coins
Mining: It's Crazy!
Mining: It's not Crazy
MY MINE IS MINE

(looks nice nice. :3)


(( what's mine is mine ))


(((  TOO MANY PUNS   )))
You are wonderful and nothing hurts

Actually, I Wish I Wasn't Going To Die Down Here doesn't sound bad. A bit of a mouthful though. IWIWGTDDH.
Logged
Ashkin
Level 10
*****


meow


View Profile
« Reply #16 on: September 03, 2011, 01:31:39 AM »

   LOG 3RD SEPTEMBER 2011 DAY 15
Today I finished implementing the UI.

From top to bottom, left to right:
Score (total gold collected)
Time
Energy
Bombs
Bullets
Power light (Turns off when you run out of energy)
Comments on how I may improve it?
Right now I'm tweaking the code for spawning caverns. I'm probably going to go for a number of small caverns, some medium ones, and one or two large ones, as opposed to the current system of having a number of large ones in predetermined locations evenly spread throughout the map.
Logged
baconman
Level 10
*****


Design Guru


View Profile Email
« Reply #17 on: September 03, 2011, 08:36:55 AM »

I'd go for a tighter spread that randomizes between the small and medium ones. The "large ones" will occur naturally when they coincide; and limiting the mushroom lights per cave to like, one or two, should prevent them from clustering like they were, too. Wink

Also, since I'm guessing battery power is a rough equal of a timer, I'd go with the title "Gold Rush." Perhaps consider including some DigDug-style hazards and enemies as well? Maybe some scattered extra batteries, as well.
Logged

Droqen
Level 10
*****

aka nick fury


View Profile WWW Email
« Reply #18 on: September 03, 2011, 09:06:13 AM »

you should call it


CAVER N

(note the space)


EDIT!!!

Maybe 'Robot Caver N' because you're a robot and you're in a cavern and you're a caver and it's your cavern obviously so it's a Robot Cavern and you're a Robot Caver named/tagged/identified as N
yaayyy

I tried playing this game again and it didn't work >:
« Last Edit: September 03, 2011, 11:46:02 AM by Droqen » Logged

Ashkin
Level 10
*****


meow


View Profile
« Reply #19 on: September 03, 2011, 11:41:46 AM »

I'd go for a tighter spread that randomizes between the small and medium ones. The "large ones" will occur naturally when they coincide; and limiting the mushroom lights per cave to like, one or two, should prevent them from clustering like they were, too. Wink
Personally, I quite like the clustering of mushrooms, I don't mind it at all. I like your idea for cave generation, though- I've already had smaller caverns connect to create larger ones several times. I'll have to implement it today.
Also, since I'm guessing battery power is a rough equal of a timer, I'd go with the title "Gold Rush." Perhaps consider including some DigDug-style hazards and enemies as well? Maybe some scattered extra batteries, as well.
I'm trying to avoid adding enemies for now. It's not the kind of atmosphere I want, although I have considered beasts and creatures crawling around in the darkness deep underground, waiting for a robot to drain energy from. Batteries will be found inside chests, to add a risk/reward gambling system- Stay down and hope you find more batteries, or escape to the surface before you shut down? When you shut down underground, you'll still get your gold, but it will have something like 5000 points subtracted from it.
As for the name Gold Rush, it's pretty nice. I like the pun, but I feel that Gold Rush has already been used too many times in games.
you should call it


CAVER N

(note the space)
The robot is a Caver, and his service tag is N? As well as cavern when put together? Sounds nice.
All of these titles sound great Smiley
Logged
Pages: [1] 2 3 ... 28
Print
Jump to:  

Theme orange-lt created by panic