Author Topic: TinyCraft [Axe]  (Read 63042 times)

0 Members and 2 Guests are viewing this topic.

Offline saintrunner

  • Custom Spriter: You ask it! I'll Make it!
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1787
  • Rating: +115/-11
  • Flogging Molly
    • View Profile
    • Jonny K Music
Re: TinyCraft [Axe]
« Reply #105 on: January 07, 2012, 05:45:39 pm »
I think we are over complicating this. Could we just focus on getting any version we can out, as close to he original as we can and we'll go from there.
My Sprites Thread   :Updated often :) for your viewing pleasure

GAMES:

Offline Happybobjr

  • James Oldiges
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2325
  • Rating: +128/-20
  • Howdy :)
    • View Profile
Re: TinyCraft [Axe]
« Reply #106 on: January 07, 2012, 05:47:02 pm »
lol ya, but you should look over the source.  it is interesting and may help
School: East Central High School
 
Axe: 1.0.0
TI-84 +SE  ||| OS: 2.53 MP (patched) ||| Version: "M"
TI-Nspire    |||  Lent out, and never returned
____________________________________________________________

Offline leafy

  • CoT Emeritus
  • LV10 31337 u53r (Next: 2000)
  • *
  • Posts: 1554
  • Rating: +475/-97
  • Seizon senryakuuuu!
    • View Profile
    • keff.me
Re: TinyCraft [Axe]
« Reply #107 on: January 07, 2012, 05:48:28 pm »
Saintrunner we need a way to generate the maps, and since this is a sandbox game it'd be in our best interests to keep it as close to the original as possible.
In-progress: Graviter (...)

Offline annoyingcalc

  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1953
  • Rating: +140/-72
  • Found in Eclipse.exe
    • View Profile
Re: TinyCraft [Axe]
« Reply #108 on: January 07, 2012, 05:50:30 pm »
I highly doubt the mighty Notch himself would descend to speak with such lowly mortals as us, when there are so many other people who can probably solve our problems :P
eh? he spoke to SirCmpwn
"Hey Notch do you know Axe?"
no I mean what the code means
This used to contain a signature.

Offline saintrunner

  • Custom Spriter: You ask it! I'll Make it!
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1787
  • Rating: +115/-11
  • Flogging Molly
    • View Profile
    • Jonny K Music
Re: TinyCraft [Axe]
« Reply #109 on: January 07, 2012, 05:51:17 pm »
Thats what I said. to keep it as close to the original as possible. I was directing that towards all the confusion over making it 83+ compatible.

We need a Java and Axe Guru!

I think I know the one!

Binder News
My Sprites Thread   :Updated often :) for your viewing pleasure

GAMES:

Offline Happybobjr

  • James Oldiges
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2325
  • Rating: +128/-20
  • Howdy :)
    • View Profile
Re: TinyCraft [Axe]
« Reply #110 on: January 07, 2012, 05:52:59 pm »
Again, you should be able to read most of it with very rudimentary C knowledge.
The problem is the same with any other random source code.  We don't already know the intentions of the code.  And it is large. :P
But i think it is quite doable.
School: East Central High School
 
Axe: 1.0.0
TI-84 +SE  ||| OS: 2.53 MP (patched) ||| Version: "M"
TI-Nspire    |||  Lent out, and never returned
____________________________________________________________

Offline Blue Raven

  • LV3 Member (Next: 100)
  • ***
  • Posts: 73
  • Rating: +3/-0
  • Trust me. I'm the Doctor.
    • View Profile
Re: TinyCraft [Axe]
« Reply #111 on: January 07, 2012, 05:53:07 pm »
I'll look at that code. I did a little Java and I practise C for a while, maybe I'll could help.
Apprenez l'Axe ! | DropBox


Offline ZippyDee

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 729
  • Rating: +83/-8
  • Why not zoidberg?
    • View Profile
Re: TinyCraft [Axe]
« Reply #112 on: January 07, 2012, 05:59:41 pm »
Well one thing that I noticed is the createAndValidateTopMap() routine in the LevelGen class:
Code: [Select]
public static byte[][] createAndValidateTopMap(int w, int h) {
int attempt = 0;
do {
byte[][] result = createTopMap(w, h);

int[] count = new int[256];

for (int i = 0; i < w * h; i++) {
count[result[0][i] & 0xff]++;
}
if (count[Tile.rock.id & 0xff] < 100) continue;
if (count[Tile.sand.id & 0xff] < 100) continue;
if (count[Tile.grass.id & 0xff] < 100) continue;
if (count[Tile.tree.id & 0xff] < 100) continue;
if (count[Tile.stairsDown.id & 0xff] < 2) continue;

return result;

} while (true);
}

The map must contain at least 100 rock, sand, grass, and tree tiles, and at least 2 stairs, otherwise it generates an entirely new map and tests again. Note that result contains two arrays. result[0] is an array of map tiles, and result[1] is an array of level data (objects and whatnot, I guess).

Looking at this, I don't know how slow it might be to generate such a map on the calc...I guess it depends on the rest of the level generation algorithm to see how likely a valid map is to occur.
« Last Edit: January 07, 2012, 06:00:17 pm by ZippyDee »
There's something about Tuesday...


Pushpins 'n' stuff...


Offline saintrunner

  • Custom Spriter: You ask it! I'll Make it!
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1787
  • Rating: +115/-11
  • Flogging Molly
    • View Profile
    • Jonny K Music
Re: TinyCraft [Axe]
« Reply #113 on: January 07, 2012, 06:04:11 pm »
I think an easier way to do this (since we are really just copying the idea) is to have all the maps and surrounding maps predefined. This is easier to code, and we can implement a save feature
My Sprites Thread   :Updated often :) for your viewing pleasure

GAMES:

Offline ZippyDee

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 729
  • Rating: +83/-8
  • Why not zoidberg?
    • View Profile
Re: TinyCraft [Axe]
« Reply #114 on: January 07, 2012, 06:09:40 pm »
No, that would take away any sort of replay value. It removes the interesting aspect of a sandbox game like that.
There's something about Tuesday...


Pushpins 'n' stuff...


Offline annoyingcalc

  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1953
  • Rating: +140/-72
  • Found in Eclipse.exe
    • View Profile
Re: TinyCraft [Axe]
« Reply #115 on: January 07, 2012, 06:11:34 pm »
it would be a good idea for beta but final release I dont think that would work
This used to contain a signature.

Offline saintrunner

  • Custom Spriter: You ask it! I'll Make it!
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1787
  • Rating: +115/-11
  • Flogging Molly
    • View Profile
    • Jonny K Music
Re: TinyCraft [Axe]
« Reply #116 on: January 07, 2012, 06:13:07 pm »
Yeah, at least we could get all the stuff in, and worry about the map generation later
My Sprites Thread   :Updated often :) for your viewing pleasure

GAMES:

Offline BlakPilar

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 734
  • Rating: +44/-1
    • View Profile
Re: TinyCraft [Axe]
« Reply #117 on: January 07, 2012, 06:14:15 pm »
ZippyDee is right (in my opinion). If you had pre-defined maps, after one play-through it would get quite boring. Besides, most sandbox games do have random levels. I don't know what createTopMap looks like, but the validation wouldn't be hard at all.
« Last Edit: January 07, 2012, 06:14:28 pm by BlakPilar »

Offline leafy

  • CoT Emeritus
  • LV10 31337 u53r (Next: 2000)
  • *
  • Posts: 1554
  • Rating: +475/-97
  • Seizon senryakuuuu!
    • View Profile
    • keff.me
Re: TinyCraft [Axe]
« Reply #118 on: January 07, 2012, 06:15:28 pm »
I'm more concerned about how it generates areas and pieces them together (so you don't have scattered desert in the middle of a forest, etc.)
In-progress: Graviter (...)

Offline BlakPilar

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 734
  • Rating: +44/-1
    • View Profile
Re: TinyCraft [Axe]
« Reply #119 on: January 07, 2012, 06:17:33 pm »
That's always a good thing too. It would also be good to make sure only certain biomes are placed near each other (but you all probably knew that already).