2D Scrolling Engine Question

Member
Posts: 145
Joined: 2002.06
Post: #16
Quote:Originally posted by Frank C.
Me too - My basic thinking is too approach it using common terrain texturing techniques. e.g. Use relatively low-res textures for overall colour (or even just vertex colours, or a combination of the two) then overlay tiled groups of detail textures...
You're still thinking about a grid of pixels though.

My idea is like this: the world is composed of layers of polygons with textures on them. This way you can (for example, in a side scroller) have ground that goes up and down very flexibaly. In an overhead-view RPG it means you could have castle and town layouts that don't stick to 90∞ corners.

"He who breaks a thing to find out what it is, has left the path of wisdom."
- Gandalf the Gray-Hat

Bring Alistair Cooke's America to DVD!
Quote this message in a reply
KidTsunami
Unregistered
 
Post: #17
Ok, I'm really new to textures and openGL in general. I understand how an orthographic projection would work to make a 2D game, but I am confused about your textured approach.

I am visualizing polygons and textures but do not understand how you could make a detailed looking castle without using sprites (or grids of pixels).

BTW, I'm planning on using an overhead RPG perspective.

You might have to really spell this out for me, I'm pretty darn green. Blush
Quote this message in a reply
Member
Posts: 145
Joined: 2002.06
Post: #18
Quote:Originally posted by KidTsunami
Ok, I'm really new to textures and openGL in general. I understand how an orthographic projection would work to make a 2D game, but I am confused about your textured approach.

I am visualizing polygons and textures but do not understand how you could make a detailed looking castle without using sprites (or grids of pixels).

BTW, I'm planning on using an overhead RPG perspective.

You might have to really spell this out for me, I'm pretty darn green. Blush
You would still have "sprites" but they wouldn't be aligned or positioned on any grid like in a classic tile-based game. Instead you could lay out the tiles any way you wanted.
(it might be useful to have some sort of macro in the editor to create mini-tile-grids that can be oritned/scaled/distorted).

After my last final (tomorrow afternoon) I might make a mockup in photoshop.

"He who breaks a thing to find out what it is, has left the path of wisdom."
- Gandalf the Gray-Hat

Bring Alistair Cooke's America to DVD!
Quote this message in a reply
quillbit
Unregistered
 
Post: #19
KidT, inio's talking about what's effectively a 3-D engine that looks 2-D: basically, you slap a bunch of textured polys onto a terrain and then change state and trigger events according to pxiel-level collisions (e.g., bounding box or point-in-poly). It gives you some flexibility, but also introduces a bunch of headaches at the same time, which is probably why we don't see more of it. Most of the benefits accrue to games using a pure top-down viewpoint (since rotating an isometric character wouldn't do much good!), but there are some interesting possibilities for games with a fixed-sprite view, such as allowing zooming in and out.
Quote this message in a reply
KidTsunami
Unregistered
 
Post: #20
Quote:Originally posted by ChrisD
You can simply use a linked list of all the sprite in a level.
each sprite has a x, z coordinate.

Once per frame you make a smaller linked list of all the sprites in the active region...
AKA what you actually want to move or what the camera is looking at.

In PM this was a linked list for all the sprites in the level and a rectangle that was moved across the level.

A linked list of all the active sprites was built is the sprite had any part inside the rectangle.


Quote:You would still have "sprites" but they wouldn't be aligned or positioned on any grid like in a classic tile-based game. Instead you could lay out the tiles any way you wanted.
(it might be useful to have some sort of macro in the editor to create mini-tile-grids that can be oritned/scaled/distorted).


So, are you and Chris D talking about the same thing? Also what would be your choice of collision detection for this scenario. And yes, a mock up would be very much appreciated.

Good luck on your finals! Ninja

Hey Quillbit, thanks I think I understand now, but I still wanna see a mock up, just to get a solid visualization. I think I thought of this earlier but didn't understand the actual terms and everything. I have thought about the use of rotation of an isometric sprite being useless except maybe in the cases involving like balls (ie Cannonballs) rolling.
Quote this message in a reply
Member
Posts: 110
Joined: 2002.04
Post: #21
Quote:Originally posted by KidTsunami
Chris, I get what you're saying, but what are the exact advantages of this. Is it just so you can have trees and other objects represented as sprites off of a grid pattern?


Yes!

- Mac Lead ZeniMax Online Studios
- Owner Plaid World Studios
- Resume: http://www.chrisdillman.com
Quote this message in a reply
KidTsunami
Unregistered
 
Post: #22
Great, well then I'll plan on using that. I think I'll stick to having the actual terrain layer as a grid. But all the other objects in the world, I'll store in a linked list or something similar. Thanks. What would be the best way to work the collision detection in this situation. And connected to that, how do you go about pixel perfect collision in opengl?
Quote this message in a reply
Luminary
Posts: 5,143
Joined: 2002.04
Post: #23
OpenGL doesn't help you with collision detection, particularly not pixel-perfect collision detection. That's something you'll have to do for yourself.
Quote this message in a reply
KidTsunami
Unregistered
 
Post: #24
Well then would the way to go just be using rect shaped collision boxes? I know if I keep the terrain itself on a grid I can use that for a grid based collision system with everything else being Sprites with their own special collision boxes. Is that the way to go or am I missing something? Wacko
Quote this message in a reply
Member
Posts: 110
Joined: 2002.04
Post: #25
Quote:Originally posted by KidTsunami
Well then would the way to go just be using rect shaped collision boxes? I know if I keep the terrain itself on a grid I can use that for a grid based collision system with everything else being Sprites with their own special collision boxes. Is that the way to go or am I missing something? Wacko


Yeah you can do polygon level hit detection...
with your rotated sprites/tiles.

a little different from the rect detection but close.

Might even be able t use build in mac quickdraw or some other tool box routines to do it easily.

- Mac Lead ZeniMax Online Studios
- Owner Plaid World Studios
- Resume: http://www.chrisdillman.com
Quote this message in a reply
KidTsunami
Unregistered
 
Post: #26
Ok this question is going in a generally different direction. I was wondering how I go from an SDL_Surface to a GLvoid, so that I can draw my sprites using glDrawPixels, or should I be going about this another way. Just pointing me to a tutorial is also cool. Sleep time...Bored (I'd say thats more of a sleepy smiley than a bored smiley, but thats just me)
Quote this message in a reply
Member
Posts: 145
Joined: 2002.06
Post: #27
Quote:Originally posted by inio
After my last final (tomorrow afternoon) I might make a mockup in photoshop.

This is done really quick. I'll be out of town tomorow but might add more if people don't "get it" on monday:

[Image: vectorsprite.gif]
top: rendered image; bottom: quads used to draw (weird things inside domes are extra faces I used to generate the dots randomly, ignore them.

Here's the complete set of sprites used:
[Image: vectorsprites.gif]

"He who breaks a thing to find out what it is, has left the path of wisdom."
- Gandalf the Gray-Hat

Bring Alistair Cooke's America to DVD!
Quote this message in a reply
KidTsunami
Unregistered
 
Post: #28
I was thinking I would have a basic terrain layer that would be on a grid, and then an object layer that wouldn't be on a grid and would consist of things like houses (which would themselves be made out of tiles for "changeability"). And I'd have other layers that would be derived off of those two. How does that sound? Is that logical, and still take advantage of not using grids?
Quote this message in a reply
Post Reply