PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

creating auto worlds

recently (well over the past year) I created 2 games using pocketc, squish and P (Squish 2) these games involve a player pushing objects around the screen to get gems. objects interreact with one another etc. (www.ozcreations.com.au/p.htm), anyhow in these games the playing area is a 15 x 15 grid, I'm looking into creating a world of say 50 x 50 that you scroll around, and levels are automatically created, e.g the computer places walls, then doors, and keys to suit etc, the question is can it be done, simply, and does anyone have any ideas how ? or am I going to have to create large "worlds" myself.... (bugger) BTW I'm not going to be using pocketC for this one :)

-brendan
THANK GOD you wont use PocketC!!!
Well they did that in Diablo, random scrolling worlds. You would have to program an extensive ... thingamajigga that would think of where things go and how close/far they should be from one another and make walls in lines so they don't work wrong.

NOTE: I am sleep walking. If what I say makes little or no sense, then thank you.
filrv · 28 Jan 2002, 16:13 UTC — Scrolling Maps
We are currently working on a Game, which will involve very large maps, and will be scrolling them. We are going to be using the the link below as the map editor.

http://www.cs.kun.nl/is/ts/

From there to get their maps into the game as well as the tiles is very easy. Also redrawing can be quick, if you build the map into a memory buffer and only redraw it when you need a new tile on each edge of the map. That way, you can just copy the map into the buffer and have a nice fast scrolling game.

If you need any help, the code we have will be finished sometime during the week and we would be willing to help you out.

Phil Harvey
filrv@ra-dev.com
brendan · 28 Jan 2002, 21:28 UTC — wicked!!
man, don't ya just wish someone would make a site that has links to all these groovie little utils....

I really love to see some std c++ libs for use with this package.... :)

-brendan
filrv · 28 Jan 2002, 22:08 UTC — Map Editor
Yep, just found that make editor randomly. but is useful and will be fully working like I said this week.

Phil Harvey
filrv@ra-dev.com
brendan · 28 Jan 2002, 22:20 UTC — Sounds Good!!
Cool!!, guess I'll have to get my head around this program....
filrv · 29 Jan 2002, 22:43 UTC — Map Editor
Ok I have now completed the first pass of the code for the Map Engine. It works on my slightly changed version of EasyCE 1.6.

It uses the Map Editor I recommended above. A PC demo can be downloaded from http://www.ra-dev.com/scroll.zip

Now, basically I have to optimize it so that it does not redraw the whole background every go. Simple to do and just updates a region of the edges when it needs to. Should be able to get it going at a nice Frame rate easily on the PocketPC.

Phil Havey
filrv@ra-dev.com
www.ra-dev.com
filrv · 30 Jan 2002, 01:06 UTC — Map Editor
Another good thing about the map editor is that it allows for sprite animation to be built up in it. Which makes playing back animations simple.

Again, this also works already in the engine.

Phil Harvey
filrv@ra-dev.com
www.ra-dev.com
brendan · 30 Jan 2002, 05:11 UTC — Cool
Seems to work fine, I'll just have to wait and see I guess, I've been playing around with the generated code a bit as well.....i've got a 2-d scroller happn'in over a 50x50 play area (12x16 visable) of 20x20px blocks..... I convert the bmp file it generate to a .tga etc.
brendan · 31 Jan 2002, 04:55 UTC — Question
I've a question, I've been playing around with the tile studio program a bit, and I understand basically how it works etc, I'm assuming that one must create the game physics and define (program) how objects interreact etc ?

-brendan
filrv · 31 Jan 2002, 15:43 UTC — re: Question
Yes, you have to deal with the control of all game objects. The editor is basically there to lay stuff out.

Phil Harvey
filrv@ra-dev.com
www.ra-dev.com
brendan · 31 Jan 2002, 22:10 UTC — OK
so this includes creating the code for animations etc?

next question, if one was to create a "50 x 50 level" consisting of 20px x 20px tiles, but only wanted the player to move say 2px at a time how do you place the player into the level information, or would you keep that seperate?, and if so how can you do basic comparisions to check if the player is going to hit stuff etc, for example if the player can only be in one of the 50 x 50 squares then you can do a check for making the player fall by:

if (levledata[player.locy + 1][player.locx] != solidground) player.locy++;


but this can't be done if the player is in a 1000 x 1000 "grid", I'm new to the platform level thingy, so any help, code would be much appreciated.
brendan · 31 Jan 2002, 22:25 UTC — Another Q
I've another Q, :)

you said to create the screen into a memory block, and then copy part of it to the screen buffer, I've done the calculations and for a 500x500 tile level using 20x20px tiles, I need 100000000 x 16bits locations or about 1.5MB (if my calcs are correct) now thats a lot of mem, just for one level) the code I've got working at the moment just draws the part of the level direct to the screen buffer, providing I seperate the trans stuff from the "full blocks" so I'm not doing lots of "if" statments it runs at about 25f/s with the screen conpletly covered with tiles, and drawing a Background screen. or should I go with the membuffer thingy ?

-brendan
filrv · 01 Feb 2002, 01:22 UTC — Question
No, I only keep the map size +2 in each direction stored in memory. Therefore, the map may only be say 300 * 400 in size. When you then move over an edge, move the map and redraw the side of it. Keeps it small and efficent

Also, for your earlier question, you now now the offset into the world from the origin of the map, and hence can place the player with no problems.

At the moment I have the engine running at 50fps, with a second parrallex layer. Which will be used for the anims and stuff. Runs nicely.


Phil

filrv@ra-dev.com
www.ra-dev.com
The player placment is fine, If the player does not move in increments of the tile sizes, but say 1/4 tile sizes etc, then how do you perform a calc to see if a player has reached a boundry etc ?


-brendan