IPB

Welcome Guest ( Log In | Register )

10 Pages V  < 1 2 3 4 5 > »   
Reply to this topicStart new topic
> mordor like game for iPhone
Danjen
post May 15 2011, 07:45 PM
Post #41


Veteran
********

Group: Mordor MP Prog
Posts: 1,467
Joined: 25-May 07
From: Canada
Member No.: 3,498
referrer:Decklin's Domain



For the fog of war, just have each tile have an explored variable, that draws it if's true, and ignored if false.
Go to the top of the page
 
+Quote Post
rb10c
post May 15 2011, 07:48 PM
Post #42


Infiltrator
****

Group: Members Plus
Posts: 335
Joined: 8-October 07
From: London
Member No.: 3,954
referrer:i'm a DIEHARD FAN!!



ah, forgot doors, but that could be a condition, as opposed to a tileset.


--------------------
http://macjams.com/artist/rb10c - my music site!
mordor, my favourite game EVER!!

QUOTE (rb10c @ Feb 14 2011, 03:22 PM) *
Darn, I went off-topic on an off-topic topic. Who's going to go off topic on this off topic, off topic topic?
Go to the top of the page
 
+Quote Post
Danjen
post May 15 2011, 07:56 PM
Post #43


Veteran
********

Group: Mordor MP Prog
Posts: 1,467
Joined: 25-May 07
From: Canada
Member No.: 3,498
referrer:Decklin's Domain



@Korexus - I get what you're trying to say, but it's lost on me.

Also, here's a screenshot of what I've got so far... like I said I want it to be a puzzle game, but what you do is choose a color, and then pressing the arrow keys affects the gravity of all the blocks of that color (so red affects red, orange, purple, and white blocks).
Go to the top of the page
 
+Quote Post
smiley
post May 15 2011, 07:57 PM
Post #44


Explorer
***

Group: Members Plus
Posts: 117
Joined: 4-March 07
From: Copenhagen, Denmark
Member No.: 3,220
referrer:google



QUOTE (Danjen @ May 15 2011, 08:45 PM) *
For the fog of war, just have each tile have an explored variable, that draws it if's true, and ignored if false.


yes definately, but it is still (in my case ) 23 x 23 unique fog squares, that I need to store data for - times 9 levels.
I hope i can figure out something... less cumbersome. but I'm afraid theres no way around it.

QUOTE (rb10c)
ah, forgot doors, but that could be a condition, as opposed to a tileset.


it sure can.
Go to the top of the page
 
+Quote Post
rb10c
post May 15 2011, 08:00 PM
Post #45


Infiltrator
****

Group: Members Plus
Posts: 335
Joined: 8-October 07
From: London
Member No.: 3,954
referrer:i'm a DIEHARD FAN!!



I overlooked the situation. Looks fine? All i have is the icy level of Chip's Challenge in my head...


--------------------
http://macjams.com/artist/rb10c - my music site!
mordor, my favourite game EVER!!

QUOTE (rb10c @ Feb 14 2011, 03:22 PM) *
Darn, I went off-topic on an off-topic topic. Who's going to go off topic on this off topic, off topic topic?
Go to the top of the page
 
+Quote Post
smiley
post May 15 2011, 08:06 PM
Post #46


Explorer
***

Group: Members Plus
Posts: 117
Joined: 4-March 07
From: Copenhagen, Denmark
Member No.: 3,220
referrer:google



regarding fog of war again:

it is many times more data than i thought..
23 x 23 x 9 = 4761

and what is mordor ... 30 x 30 x 15 ??

I must be overcomplicating this issue.. not_ok.gif
Go to the top of the page
 
+Quote Post
Danjen
post May 15 2011, 08:10 PM
Post #47


Veteran
********

Group: Mordor MP Prog
Posts: 1,467
Joined: 25-May 07
From: Canada
Member No.: 3,498
referrer:Decklin's Domain



When programming, I like to remember KISS:

Keep it simple, stupid!
Go to the top of the page
 
+Quote Post
korexus
post May 16 2011, 06:19 AM
Post #48


Voyager
***

Group: Members Plus
Posts: 141
Joined: 24-October 07
From: Reading
Member No.: 4,011
referrer:Google Search



@Smiley. The simplest way I've found with fog of war is to keep track of the visited squares. That keeps the size smaller overall (although the upper limit is still the same).

The version I am / was / will be making is set outside and so has different terrain types for each square. At that point you're storing the information anyway so there's no overhead. Even without that though, if you bung the values into a database, 5,000 rows is nothing - so long as you follow the Mordor route of one map for all players anyway. Keeping individual fog of war for each player could grow quite quickly!

@ Danjen. Having seen your screenshot, my suggestion probably won't work for you. I was considering a Mordor-like picture where the inside of a square is unchanged by the area around it and only the edge needs changing. The extra detail you have in the middle of each square adds an additional complication, and the different colours make shifting the edges more difficult.

Would it be possible for you to rotate and colour blocks on the fly? If so I think you could make do with 6 blocks (0 edges, 1 edge, 2 adjacent edges, 2 opposite edges, 3 edges and 4 edges). Otherwise you may be best placing blocks as you have them, then overlaying joining images where necessary. That will minimise the number of images, but will increase the complexity of coding.


korexus.
Go to the top of the page
 
+Quote Post
Danjen
post May 16 2011, 06:05 PM
Post #49


Veteran
********

Group: Mordor MP Prog
Posts: 1,467
Joined: 25-May 07
From: Canada
Member No.: 3,498
referrer:Decklin's Domain



I have it set up so that I could do the graphics in photoshop or something, with nice detailed textures or what not, and have the walls "snap" together to form a contiguous entity. Unfortunately, game maker is kinda iffy about coloring on the fly (I seem to lose a bit of color detail if I do), but rotation shouldn't be a problem.

I've figured that if I do a little math:
CODE
wallSum = (north * 1) + (east * 2) + (south * 4) + (west * 8)

I can then use that logic to generate a number from 0 to 15, exactly corresponding to the wall image index. The problem comes with adding the corner squares ... that pushes the combinations up to either 32 (too small) or 64 (too much).

I'm not too worried about it at this point... it's just one of those graphical polishes, but it would be nice to have at the end.
Go to the top of the page
 
+Quote Post
rb10c
post May 16 2011, 06:28 PM
Post #50


Infiltrator
****

Group: Members Plus
Posts: 335
Joined: 8-October 07
From: London
Member No.: 3,954
referrer:i'm a DIEHARD FAN!!



Well, what mordor done was have a "map explored" file, (probably having 0 for unexplored, 1 for recently explored and 2 for explored) and a separate map file. In the whole mordor game, there are 13500 cells (30*30*15) and the "map explored" gives a 0, 1, or 2. So, 1, 1, 1 - 0 from which, the application references what map square and its condition. Size wise, ~12 bytes per column, 13500 column, go figure. Thats 158kb to my maths, MDATA8 is 135 kb... hmm... I forget if that is even the map file.
Unless its 1/1/1/0, then it's 8 bytes per column, totaling to 105kb plus formatting.

Why did I do sll this maths? I should be revising for my exams!

This post has been edited by rb10c: May 16 2011, 06:31 PM


--------------------
http://macjams.com/artist/rb10c - my music site!
mordor, my favourite game EVER!!

QUOTE (rb10c @ Feb 14 2011, 03:22 PM) *
Darn, I went off-topic on an off-topic topic. Who's going to go off topic on this off topic, off topic topic?
Go to the top of the page
 
+Quote Post
korexus
post May 16 2011, 08:41 PM
Post #51


Voyager
***

Group: Members Plus
Posts: 141
Joined: 24-October 07
From: Reading
Member No.: 4,011
referrer:Google Search



I had a little plan out of a database schema for a Mordor game on my way into work. (It's the kind of thing I do, I know it's not normal but I'm OK with that. tongue.gif ) I doubt the model I came up with would match the one DA used, but that was never really my aim. I got it down to 8 bytes per row by using, among other things, a set datatype for walls much as you suggest, Danjen, and joining lair information and stuff about pits and teleporters into separate tables. Further efficiencies could have been made by not using multiples of 8 bits for all entries, which I believe is the case in Mordor.

Anyway, having looked at the puzzle screenshot, I think you can do away with corner pieces without reducing the quality of the final image. - As rb10c suggested, draw pieces (3, 6, 9, 12), (7, 11, 13, 14) and 15 with the corners on those images instead of on the neighbours and the problem goes away. If colouring on the fly is not as pretty, at least making several copies of the same files should be easier than making lots of different files...

korexus.

This post has been edited by korexus: May 16 2011, 08:45 PM
Go to the top of the page
 
+Quote Post
Danjen
post May 16 2011, 10:52 PM
Post #52


Veteran
********

Group: Mordor MP Prog
Posts: 1,467
Joined: 25-May 07
From: Canada
Member No.: 3,498
referrer:Decklin's Domain



Radiant (the guy that made Subterra and Leylines on the caravel forums) offered this insight:

QUOTE
QUOTE
Danjen02 wrote:
I'm curious how these were programmed. They change appearance based on how many adjacent rivers there are, so there must be a large number of combinations, and I was wondering what the most efficient way to implement something like this was.


Simply by checking the six adjacent squares, and drawing up to six partially-overlapping patches of water.


Edit: So I'd just have to edit the code slightly to include 9 options for drawing, plus the base.

QUOTE
When programming, I like to remember KISS:

Keep it simple, stupid!


Foot, mouth. Mouth, foot.
Go to the top of the page
 
+Quote Post
korexus
post May 17 2011, 06:14 AM
Post #53


Voyager
***

Group: Members Plus
Posts: 141
Joined: 24-October 07
From: Reading
Member No.: 4,011
referrer:Google Search



QUOTE (korexus @ May 16 2011, 07:19 AM) *
Otherwise you may be best placing blocks as you have them, then overlaying joining images where necessary. That will minimise the number of images, but will increase the complexity of coding.


wink.gif


By my count you only need 3 overlapping images. A horizontal bar for joining vertical blocks, a vertical bar for joining horizontal blocks and a small square to fill in corners when you have both. Symmetry and repeated use of these tiles should do the trick after that.


korexus.

This post has been edited by korexus: May 17 2011, 06:17 AM
Go to the top of the page
 
+Quote Post
Danjen
post May 17 2011, 10:09 PM
Post #54


Veteran
********

Group: Mordor MP Prog
Posts: 1,467
Joined: 25-May 07
From: Canada
Member No.: 3,498
referrer:Decklin's Domain



I just took the easy way out and had 9 images per sprite - the base tile, and then one for each corner and side. But the good news is that it works now!
Go to the top of the page
 
+Quote Post
smiley
post May 21 2011, 11:31 PM
Post #55


Explorer
***

Group: Members Plus
Posts: 117
Joined: 4-March 07
From: Copenhagen, Denmark
Member No.: 3,220
referrer:google



you are right korexus, its not that much data to store after all.
alot of code to type though ! typing.gif



sweet peas Dan, yours is working too, all that coding progress cool.gif

Go to the top of the page
 
+Quote Post
Danjen
post May 22 2011, 12:17 AM
Post #56


Veteran
********

Group: Mordor MP Prog
Posts: 1,467
Joined: 25-May 07
From: Canada
Member No.: 3,498
referrer:Decklin's Domain



I've gotten further than I usually do. But I always seem to lose interest one way or another.

Totally diggin' that map interface, by the way!
Go to the top of the page
 
+Quote Post
korexus
post May 22 2011, 01:48 PM
Post #57


Voyager
***

Group: Members Plus
Posts: 141
Joined: 24-October 07
From: Reading
Member No.: 4,011
referrer:Google Search



QUOTE (smiley @ May 22 2011, 12:31 AM) *
you are right korexus, its not that much data to store after all.
alot of code to type though ! typing.gif


Is it possible to do dynamically? Three routes I can think of are
* Manually enter the information into the database and have the maps drawn from that.
* Create the map and write a script to create the database values by inspection of the image.
* Have a random map which is generated as the player explores.

I went with the third option. If you want the same map for all players of the game then that's no good. The second option would definitely save you time if you made enough maps, but I don't know how many that would be, so you may be stuck with the first one. If so, I'd advise doing the data entry little and often so you don't get bored out of your mind!


korexus.
Go to the top of the page
 
+Quote Post
Danjen
post May 22 2011, 07:12 PM
Post #58


Veteran
********

Group: Mordor MP Prog
Posts: 1,467
Joined: 25-May 07
From: Canada
Member No.: 3,498
referrer:Decklin's Domain



Dynamic/random map generation is something I have yet to do.

If it were a roguelike game, my understanding would be to start with large rooms, make 3 or so for a floor, and make few connecting hallways and stuff that go to smaller rooms, then add secret doors and items and stuff.
Go to the top of the page
 
+Quote Post
smiley
post May 23 2011, 08:31 PM
Post #59


Explorer
***

Group: Members Plus
Posts: 117
Joined: 4-March 07
From: Copenhagen, Denmark
Member No.: 3,220
referrer:google



QUOTE (korexus @ May 22 2011, 03:48 PM) *
Is it possible to do dynamically? Three routes I can think of are


I guess its possible, with the right conditions.

it would be interesting to see, good idea, and a hard challenge!
Go to the top of the page
 
+Quote Post
aardless
post May 28 2011, 08:29 PM
Post #60


Goblin Shaman at work (used to be: on strike...)
**********

Group: Admin
Posts: 5,406
Joined: 27-September 04
From: Somewhere on level 3, staring at the light
Member No.: 18
referrer::yahoo:



QUOTE (Danjen @ May 15 2011, 09:53 AM) *
I am also working on something, although not an rpg or anything.

I've hit a problem with coding my walls... it's a 2d puzzle game, but what I want the walls to do is combine like in the image below. I realize that I have to check the nearby cells for what walls to use, but by my math, there's 54 different wall combinations! I'm looking for the most efficient way to have them work.



The way I'd do it:
-assign -1 to sides that have a wall, and 1 to walls that don't (or vice-versa, doesn't matter).
-Multiply right side of square 1 with left side of square 2.
-If result is -1 draw wall, else do nothing


--------------------
If money doesn't grow on trees, why is it that banks have branches? - sig of a guy on a chinese forum

Most off-topic topics are off-topic - fart642000
Go to the top of the page
 
+Quote Post

10 Pages V  < 1 2 3 4 5 > » 
Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



Lo-Fi Version Time is now: 22nd September 2019 - 11:50 PM
Bridged By IpbWiki: Integration Of Invision Power Board and MediaWiki © GlobalSoft
Copyrights and Credits