Re: Uh... yet Game Programming... or Is there a way to build tilemap graphics in Rev?

2004-01-12 Thread Alex Rice
On Jan 12, 2004, at 10:47 AM, Richard Gaskin wrote:
In my tests here I've found that for operations involving sequential 
access
of all items in a list/elements in an array, stepping the rough each 
line is
about 20% faster than stepping through each array element.
Thanks it's good to know that

But for random access arrays are several times faster than line chunks.
This makes sense- I think Rev's arrays are really what's called in 
other programming languages: hashtable or dictionary or shelve.

Alex Rice <[EMAIL PROTECTED]> | Mindlube Software | 


what a waste of thumbs that are opposable
to make machines that are disposable  -Ani DiFranco
___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Uh... yet Game Programming... or Is there a way to build tilemap graphics in Rev?

2004-01-12 Thread Richard Gaskin
Alex Rice wrote:

> I bet you could gain some speed by moving that field lookup into a
> custom property. Field accesses are slower than custom property
> accesses. 

...by about an order of magnitude, depending on what's in the field.
 
> It would be interesting to know if 2D arrays would be faster than
> item/line chunking.

In my tests here I've found that for operations involving sequential access
of all items in a list/elements in an array, stepping the rough each line is
about 20% faster than stepping through each array element.

But for random access arrays are several times faster than line chunks.
 
-- 
 Richard Gaskin 
 Fourth World Media Corporation
 ___
 [EMAIL PROTECTED]   http://www.FourthWorld.com

___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Uh... yet Game Programming... or Is there a way to build tilemap graphics in Rev?

2004-01-09 Thread Alex Rice
On Jan 9, 2004, at 5:53 AM, Dave Beck wrote:

Also, I found it helpful to keep a separate 'lookup' field of
button ids, again each line representing a row of the grid and each 
item
representing a column. When you need set the button's icon at (2,4), 
you can
lookup the button's ID from item 2 of line 4 of your lookup field. 
Probably
both these fields could be replaced by arrays (perhaps with a speed 
bonus?),
but I have had some trouble with two dimensional arrays in the past and
opted to steer clear.
I bet you could gain some speed by moving that field lookup into a 
custom property. Field accesses are slower than custom property 
accesses. You could continue to use item and line chunking instead of 
2D arrays.

It would be interesting to know if 2D arrays would be faster than 
item/line chunking. I am guessing not.

 Just my 2-sense. Good luck!
Thanks for the info & looking forward to checking out this Rev game.

Alex Rice <[EMAIL PROTECTED]> | Mindlube Software | 


what a waste of thumbs that are opposable
to make machines that are disposable  -Ani DiFranco
___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Uh... yet Game Programming... or Is there a way to build tilemap graphics in Rev?

2004-01-09 Thread Dave Beck


I wrote a game that uses a rev app as a level editor. I used the same
tilemap approach that is being discussed, with a grid of buttons which take
on different images depending on what is being 'painted' on the level. There
are close to 600 buttons in all and the speed is remarkable. Painting
objects takes place in real time. Entire levels load in a few seconds on my
400 Mhz G4. I don't know about scrolling though..

Both the game and the level editor are available at:

http://www.crystalpiersw.com

There are both Macintosh and Windows versions, but you need to register to
use the Macintosh world editor (soon to be changed). Windows users can
already use the world editor without registering.

I found that it is imperative for decent performance to NOT keep the
information about what is in what position in the buttons themselves. For
instance, to query what is in grid pos (2,4), you should NOT have to find
the button at (2,4), and then access some custom property of that button (or
the button's name or icon) to determine what occupies that grid spot. A much
faster approach is to keep a behind-the-scenes field of what is where, each
line representing a row of the grid and each item representing a column.
When you need to find out what is at pos (2,4), inspect item 2 of line 4 of
your field. Also, I found it helpful to keep a separate 'lookup' field of
button ids, again each line representing a row of the grid and each item
representing a column. When you need set the button's icon at (2,4), you can
lookup the button's ID from item 2 of line 4 of your lookup field. Probably
both these fields could be replaced by arrays (perhaps with a speed bonus?),
but I have had some trouble with two dimensional arrays in the past and
opted to steer clear.

Abstracting the logic that keeps track of what is where in the level as well
as giving the right icons to the right buttons into a 'brick wall' library
was also helpful.

>From what I've seen I think a scrolling game could be feasible using the
button-grid approach but speed would definately be a problem it it wasn't
structured correctly. All game logic should take place 'behind the scenes'
and should NOT depend on getting or storing information in the buttons
themselves. Just my 2-sense. Good luck!

Dave

___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Uh... yet Game Programming... or Is there a way to build tilemap graphics in Rev?

2004-01-09 Thread Dar Scott
On Thursday, January 8, 2004, at 11:52 PM, Alex Rice wrote:

Dar- why would you use a button instead of an image, if there is only 
1 instance of a particular tile? Just curious about game dev 
advantages of buttons, other than the ability to kind of clone an 
image by referencing it.
I was thinking of multiple instances for background.  I (some time ago) 
saw Cold Stone (or something) and it was big on tiling little pictures 
to made a big world.

A Myst or Manhole game might be fun, too.  Different style.

Dar Scott

___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Uh... yet Game Programming... or Is there a way to build tilemap graphics in Rev?

2004-01-08 Thread Alex Rice
On Jan 8, 2004, at 11:43 PM, Alex Rice wrote:
 then you would need to write an import script to set the tiles 
one-per-card. The write a command for navigating up down left right, 
through the cards.
Except that would be more myst-like than tiled or side-scrolling.

Any type of scrolling I guess would be done with the move command 
referring to buttons or images.

Dar- why would you use a button instead of an image, if there is only 1 
instance of a particular tile? Just curious about game dev advantages 
of buttons, other than the ability to kind of clone an image by 
referencing it.



Alex Rice <[EMAIL PROTECTED]> | Mindlube Software | 


what a waste of thumbs that are opposable
to make machines that are disposable  -Ani DiFranco
___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Uh... yet Game Programming... or Is there a way to build tilemap graphics in Rev?

2004-01-08 Thread Alex Rice
On Jan 8, 2004, at 11:12 PM, Andre Garzia wrote:

Any info is greatelly apreciated since I've got no info. I just don't 
want to set a background and fly buttons in it... I would like a 
canvas where I could draw...
I'm kind of where you are: thinking about how to attack game 
development in Rev. Some thoughts.

You don't want to create game art in Rev, do you? The drawing tools are 
not sufficient for that kind of thing. I am just crazy about 
Expression3 and LivingCels by creaturehouse.com

I guess you slice up your artwork into tiles using a graphics app, then 
you would need to write an import script to set the tiles one-per-card. 
The write a command for navigating up down left right, through the 
cards.

For sprites- use button, image, graphic, player objects.
Check out the Rev docs for:
- Animation Builder
- How to: animate a sprite
- TD for move: move object {[from startLoc] to endLoc|to 
pointList|rel[ative] motion}  [in time] [without {messages | waiting}]
- Animated GIF 89a's.
- .mov/.avi

Seems like any conceivable game that does not require a full-blown 3D 
engine could be written in Rev. For 3D-isometric, Rev should be fine. 
(However, if you want to go full 3D- there was an announcement recently 
about an OpenGL view + dev environment based on Rev.)

Alex Rice <[EMAIL PROTECTED]> | Mindlube Software | 


what a waste of thumbs that are opposable
to make machines that are disposable  -Ani DiFranco
___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Uh... yet Game Programming... or Is there a way to build tilemap graphics in Rev?

2004-01-08 Thread Dar Scott
On Thursday, January 8, 2004, at 11:12 PM, Andre Garzia wrote:

Any info is greatelly apreciated since I've got no info. I just don't 
want to set a background and fly buttons in it... I would like a 
canvas where I could draw... :-D
Use buttons for the tile and have them refer to background pieces.  
Images, buttons and any control, actually, can be moved with 'move'.  
If you can make a gif, that might work for different character 
orientation.  If not you might try buttons and changing the icon.  Or 
you might make a group and then blend between images.

Just some food for thought.

Dar Scott

___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution