Topic:   The iPhone Project   (Read 395122 times)


0 Members and 2 Guests are viewing this topic.

Gan


  • Administrator

  • ^ This guy is amazing.

  • *****


  • Posts: 4411
Re: The iPhone Project
« Reply #135 on: October 24, 2009, 06:07:33 PM »
The purple roofed house is at coordinate 6:1. (Xtile):(Ytile)
Go 6 to the right and 1 down, you hit the purple roofed house.
I think the order of the tiles may be confusing, this may be better:
Map 1.txt
Code: [Select]
MAP:1
0:0,B=T
1:0,B=T
2:0,B=T
3:0,B=T
4:0,B=T
5:0,B=T
6:0,B=T
7:0,B=T

0:1,B=T
1:1,B=T
2:1,B=T
3:1,B=T
4:1,B=T
6:1,B=T

0:2,B=T
1:2,B=T
2:2,B=T
3:2,B=T
7:2,B=T

0:3,B=T
3:3,B=T
7:3,B=T

5:4,B=T
7:4,B=T

0:5,B=T
1:5,B=T
7:5,B=T

0:6,B=T
3:6,B=T
4:6,B=T
5:6,B=T
6:6,B=T
7:6,B=T
You can arrange the tiles in any order as long as you don't change the actual coordinates of them.


-Gandolf
« Last Edit: October 24, 2009, 06:30:52 PM by Gandolf »

Silverwind


  • ^ This guy is amazing.

  • ****


  • Posts: 2805

  • For the glory of my maker
Re: The iPhone Project
« Reply #136 on: October 25, 2009, 04:18:29 AM »
Whoops, my mistake. I was reading it y:x. I'm used to doing it the other way with V6.

Looking good Gan, looking good.
I survived the spammage of 2007

Mystor


  • GMG-er

  • **


  • Posts: 696

  • I am the myst that consumes us all.
Re: The iPhone Project
« Reply #137 on: October 25, 2009, 12:56:12 PM »
Quote
Whoops, my mistake. I was reading it y:x. I'm used to doing it the other way with V6.

Looking good Gan, looking good.
tskTskTsk...
Its ALWAYS X,Y... What did they teach you in grade 7 math :P

Mist
PS Sorry, just teasing...
"I'll lie to him."
"And if that doesn't work?"
"Then I'll tell the truth. We're allowed to do that, in emergencies. We can't plan for everything, you know."
   -Colonel Graff, Ender&

Silverwind


  • ^ This guy is amazing.

  • ****


  • Posts: 2805

  • For the glory of my maker
Re: The iPhone Project
« Reply #138 on: October 25, 2009, 01:42:18 PM »
Hehehe... yeah, but in my defence I formatted the map key to resemble the room picture:

Code: [Select]
gridMap$ = new Array (gridSize);
gridMap$  [1] = " 00000010000000";
gridMap$  [2] = " 10000000000000";
gridMap$  [3] = " 00000011111001";
gridMap$  [4] = " 00010010001100";
gridMap$  [5] = " 10000010000100";
gridMap$  [6] = " 00000011090100";
gridMap$  [7] = " 00010001121100";
gridMap$  [8] = " 01000000090000";
gridMap$  [9] = " 00001000000000";
gridMap$ [10] = " 10000000000010";
gridMap$ [11] = " 00000000100000";
gridMap$ [12] = " 01001000001000";
gridMap$ [13] = " 00100001000001";
gridMap$ [14] = " 10000100000100";


At a glance you can see where the obstacles are. If I stored the values in columns rather than rows the obstacles wouldn't be aligned correctly.

- Trust Silver to do things better than the way they teach you to do it in schools.
« Last Edit: October 25, 2009, 01:46:04 PM by Silverwind »
I survived the spammage of 2007

Tireas Dragon


  • GMG Extraordinaire

  • ***


  • Posts: 1626

  • Trying to recover from my shattered screen.
Re: The iPhone Project
« Reply #139 on: October 25, 2009, 02:34:18 PM »
Quote
Hehehe... yeah, but in my defence I formatted the map key to resemble the room picture:

Code: [Select]
gridMap$ = new Array (gridSize);
gridMap$  [1] = " 00000010000000";
gridMap$  [2] = " 10000000000000";
gridMap$  [3] = " 00000011111001";
gridMap$  [4] = " 00010010001100";
gridMap$  [5] = " 10000010000100";
gridMap$  [6] = " 00000011090100";
gridMap$  [7] = " 00010001121100";
gridMap$  [8] = " 01000000090000";
gridMap$  [9] = " 00001000000000";
gridMap$ [10] = " 10000000000010";
gridMap$ [11] = " 00000000100000";
gridMap$ [12] = " 01001000001000";
gridMap$ [13] = " 00100001000001";
gridMap$ [14] = " 10000100000100";
At a glance you can see where the obstacles are. If I stored the values in columns rather than rows the obstacles wouldn't be aligned correctly.

- Trust Silver to do things better than the way they teach you to do it in schools.
Looks similar to what I thought of doing a long time ago and still use.
http://www.gamemakersgarage.com/cgi-bin/yabb/YaBB.cgi?board=gametime;action=display;num=1214666852
I must be dreaming (wake up me wake up) How could this have happened. Tireas' cry when he found his computer fallen over in his chair with it's screen shattered.

Silverwind


  • ^ This guy is amazing.

  • ****


  • Posts: 2805

  • For the glory of my maker
Re: The iPhone Project
« Reply #140 on: October 25, 2009, 04:11:15 PM »
Yeah, that's exactly it. :) I'm using an array in JavaScript, but it's the same idea.

btw TD, you'd probably love JavaScript too. I started dabbling in it a few months back and it's really cool! Check out http://www.w3schools.com/JS/default.asp for great beginner to expert tutorials.
I survived the spammage of 2007

Gnome


  • GMG Extraordinaire

  • ***


  • Posts: 1073
Re: The iPhone Project
« Reply #141 on: October 25, 2009, 04:33:40 PM »
*Gnomes interest has been roused
This Cannot be, NOOOOOOOO!!!!

-Gnomes Cry when the McRib was discontinued again.

Mystor


  • GMG-er

  • **


  • Posts: 696

  • I am the myst that consumes us all.
Re: The iPhone Project
« Reply #142 on: October 25, 2009, 04:39:48 PM »
yea, JS is sweet, but not as awesome as Actionscript (In my opinion)
Only thing AS3 is missing is efficient 3d rendering.
and iPhone exporting :P

Mist
"I'll lie to him."
"And if that doesn't work?"
"Then I'll tell the truth. We're allowed to do that, in emergencies. We can't plan for everything, you know."
   -Colonel Graff, Ender&

WarHampster


  • GMG Extraordinaire

  • ***


  • Posts: 1501

  • The People's Moderator
    • Arcade of the Absurd
Re: The iPhone Project
« Reply #143 on: October 25, 2009, 04:48:43 PM »
Quote
*Gnomes interest has been roused


Sigged for great justice!

Silverwind


  • ^ This guy is amazing.

  • ****


  • Posts: 2805

  • For the glory of my maker
Re: The iPhone Project
« Reply #144 on: October 25, 2009, 05:00:42 PM »
Quote
yea, JS is sweet, but not as awesome as Actionscript (In my opinion)
Oh yeah, I meant to check that out. Can you post some syntax and stuff?
I survived the spammage of 2007

Mystor


  • GMG-er

  • **


  • Posts: 696

  • I am the myst that consumes us all.
Re: The iPhone Project
« Reply #145 on: October 25, 2009, 05:43:40 PM »
Quote
Oh yeah, I meant to check that out. Can you post some syntax and stuff?
Syntax is basically identical :P
AS1 was based off of JS (I think)

Um, I think I have some code posted earlier on or something like that
Quote
Code: [Select]
stop();
//loadTileBitmapData
var sourceTiles:tileMapBitmap=new tileMapBitmap(1,1);
//renderMap Variable Definitions
var rowCtr:Number=0;
var colCtr:Number=0;
var mapRows:Number=7;
var mapCols:Number=9;
var tileNum:int=0;
var destY:int=0;
var destX:int=0;
var sourceX:int=0;
var sourceY:int=0;
var sourceRect:Rectangle=null;
var destPoint:Point=null;
var screenBitmapData=new BitmapData((44*9)+1,(44*7)+1,false,0x000000);
var displayData=new Bitmap(screenBitmapData);
stage.addChild(displayData);
displayData.x=5;
displayData.y=5;
/************
* Tile Maps *
************/
var tileMap1:Array = new Array();
tileMap1.push(new Array(0,0,0,0,9,253,0,0,0));
tileMap1.push(new Array(0,0,0,0,19,0,0,0,0));
tileMap1.push(new Array(0,32,0,0,19,32,0,0,0));
tileMap1.push(new Array(0,0,0,0,19,0,0,0,0));
tileMap1.push(new Array(0,0,0,32,19,0,0,32,0));
tileMap1.push(new Array(0,0,0,0,19,0,0,0,0));
tileMap1.push(new Array(161,161,161,161,162,161,161,161,161));
var colMap1:Array = new Array();
colMap1.push(new Array(0,0,0,0,0,0,0,0,0));
colMap1.push(new Array(0,0,0,0,0,0,0,0,0));
colMap1.push(new Array(0,0,0,0,0,0,0,0,0));
colMap1.push(new Array(0,0,0,0,0,0,0,0,0));
colMap1.push(new Array(0,0,0,0,0,0,0,0,0));
colMap1.push(new Array(0,0,0,0,0,0,0,0,0));
colMap1.push(new Array(0,0,0,0,0,0,0,0,0));
function renderMap(tileArray) {
stage.removeChild(displayData);
//using the data in the array add to screenBitmapData
screenBitmapData=new BitmapData((44*9)+1,(44*7)+1,false,0x000000);

//screenBitmapData.copyPixels(tilesBitmapData,new Rectangle(0,0,32,32), new Point(0,0));
for (rowCtr=0; rowCtr<mapRows; rowCtr++) {

for (colCtr=0; colCtr<mapCols; colCtr++) {
tileNum=int(tileArray[rowCtr][colCtr]);
destY=rowCtr*44;
destX=colCtr*44;
sourceX=(tileNum % 10)*44;
sourceY=(Math.floor(tileNum/10))*44;
sourceRect=new Rectangle(sourceX,sourceY,45,45);
destPoint=new Point(destX,destY);
screenBitmapData.copyPixels(sourceTiles,sourceRect,destPoint);
}

}

displayData=new Bitmap(screenBitmapData);
stage.addChild(displayData);
displayData.x=5;
displayData.y=5;
}
renderMap(tileMap1);
Mist
"I'll lie to him."
"And if that doesn't work?"
"Then I'll tell the truth. We're allowed to do that, in emergencies. We can't plan for everything, you know."
   -Colonel Graff, Ender&

Gan


  • Administrator

  • ^ This guy is amazing.

  • *****


  • Posts: 4411
Re: The iPhone Project
« Reply #146 on: October 26, 2009, 04:48:30 PM »
Updated Todo List:
Quote
- Add Gnome's + Silver's interfaces in.
- Finish Nav system.
- Make some more maps to explore.
- Add in NSTimer to control Npcs, animation, ect..
- Make an NPC.
- Make a smart NPC.
- Add a talk feature.
- Revamp and make all interfaces match.
- Able to pick up/use/equip/destroy items.
- Inventory system.
- Make a shop menu.
- Add a level system.
- Finish toggle button/stats showing on the gameplay interface.
- Make the ability to battle. (Any ideas of how the battle engine should be set up from you guys?)
- Add music/sound system.
- Add automatic save game feature.
I tried putting them in the same order I plan on making them.
Anything I missed, any comments?


-Gandalf
« Last Edit: October 26, 2009, 04:48:52 PM by Gandolf »

Gan


  • Administrator

  • ^ This guy is amazing.

  • *****


  • Posts: 4411
Re: The iPhone Project
« Reply #147 on: October 28, 2009, 01:00:39 PM »
I'm now commensing on the next programming stage:
NPCs.
I have a basic idea of how I'm going to do this, but I think I'll check out Silver's Quest of Magic open source to see if I can find any pointers before I get started.


-Gandolf

Silverwind


  • ^ This guy is amazing.

  • ****


  • Posts: 2805

  • For the glory of my maker
Re: The iPhone Project
« Reply #148 on: October 28, 2009, 01:07:15 PM »
When I rewrote V6 in JavaScript I wrote a quick list to help me remember what order to do things in. It's self explanatory, but I find it helpful. My NPC's AI was really simple, so the list was like:

  • Check which directions the NPC can move in.
  • Move the NPC in an available direction.
  • Check for collision with player.
And so on.
I survived the spammage of 2007

Tireas Dragon


  • GMG Extraordinaire

  • ***


  • Posts: 1626

  • Trying to recover from my shattered screen.
Re: The iPhone Project
« Reply #149 on: October 28, 2009, 02:43:03 PM »
What about move in direction man is?
I must be dreaming (wake up me wake up) How could this have happened. Tireas' cry when he found his computer fallen over in his chair with it's screen shattered.