Anybody tried Visual Studio 2005?

Hi all,

I found it’s somehow very interesting. :slight_smile:

At least, now Windows & Windows Mobile program can be developed in the same
IDE…

I’ve tried the Express Version of VS2005, which can be download for free.

With windows SDK installed, it can be used to develop native code.

I haven’t tried to compile the SDL itself,

but succeed with several typical small SDL examples, like ‘DrawSquare’,
‘DisplayBMP’…

I used those SDL library files of VC6 directly in VS2005, and they worked.

Maybe, it’s easier to create a Windows Mobile version of SDL I think…–



Zeng, Ming
NIKHEF, Kruislaan 409
1098 SJ Amsterdam - The Netherlands
email: mingz at nikhef.nl
Tel. 31 (0)20 592 2147
Mobile 31 (0)6 4351 5283



Hi all,

I found it’s somehow very interesting. :slight_smile:

At least, now Windows & Windows Mobile program can be developed in the same
IDE…

I’ve tried the Express Version of VS2005, which can be download for free.

With windows SDK installed, it can be used to develop native code.

I haven’t tried to compile the SDL itself,

but succeed with several typical small SDL examples, like ‘DrawSquare’,
‘DisplayBMP’…

I used those SDL library files of VC6 directly in VS2005, and they worked.

Maybe, it’s easier to create a Windows Mobile version of SDL I think…–



Zeng, Ming
NIKHEF, Kruislaan 409
1098 SJ Amsterdam - The Netherlands
email: mingz at nikhef.nl
Tel. 31 (0)20 592 2147
Mobile 31 (0)6 4351 5283



Hi there,

Apologies for this post as it’s not strictly an SDL
question but I’d be grateful for any help anybody
could provide. I’ve been trying to adapt the SDL
Raycasting code at:

http://www.student.kuleuven.ac.be/~m0216922/CG/raycasting.html

I’ve been trying to get it to work with a different
format of wall data but despite several attempts I’m
still having problems. Basically the data I’m wanting
to use (from an old 8bit CRPG) has 4 independent walls
for each square on the grid so instead of standing in
open squares and looking towards solid wall blocks you
can actually be inside each block looking outwards
towards 0 - 4 walls for each cell. The screenshots of
the current display might make this clearer at:

http://wateraxe.demon.nl/alternatereality/

Apart from loading in the map data from a file the
only part of the code I’ve really changed is the line
that checks for a ray hitting a wall. I’ve divided it
up into 4 quadrants to try and determine which of the
4 walls has been hit and should be tested - E.g.
north, south, west or east.

So the original code…

if (worldMap[mapX][mapY] > 0) hit = 1;

…has become (just NW in the example below):

// northwest quadrant
if ( ( stepX == -1 ) && (stepY == 1) )
{
if (side == 0) // x
{
if (worldMap[mapX-stepX][mapY-stepY].west > 1)
hit = 1;
}
else // y
{
if (worldMap[mapX-stepX][mapY-stepY].north > 1)
hit = 1;
}
}

I was hoping somebody might be familiar with Lode’s
tutorial and might be able to offer some assistance.

The full code and files are at:

http://wateraxe.demon.nl/alternatereality/AR_RayCaster.zip

I’d appreciate any help or suggestions anybody might
have. I’d also be interested in any other SDL
raycasting examples anybody might be able to point me
to.

Many thanks,

Guilherme___________________________________________________________
WIN ONE OF THREE YAHOO! VESPAS - Enter now! - http://uk.cars.yahoo.com/features/competitions/vespa.html

Guilherme De Sousa wrote:

I’ve been trying to adapt the SDL Raycasting code at:
http://www.student.kuleuven.ac.be/~m0216922/CG/raycasting.html
[snip]
I’ve been trying to get it to work with a different format of wall
data but despite several attempts I’m still having problems.

Interesting subject actually, however, you forgot to mention what problems
exactly you are having. You dont expect people to really write the entire
code for you? :wink:

-Alex.

— Alex Volkov wrote:

Guilherme De Sousa wrote:

I’ve been trying to adapt the SDL Raycasting code
at:

http://www.student.kuleuven.ac.be/~m0216922/CG/raycasting.html

[snip]

I’ve been trying to get it to work with a
different format of wall
data but despite several attempts I’m still having
problems.

Interesting subject actually, however, you forgot to
mention what problems
exactly you are having.

Sorry. The actual problem is that the view is
initially blank. Rotating you can see 2 wall sections.
Moving forward reveals more walls some of which appear
to be only half their width, others seem to flick in
and out of view. The walls that do appear don’t really
seem to match the map. What I thought I might do was
create a very small, simple map of my own as it might
be easier to step through things that way.

You dont expect people to
really write the entire code for you? :wink:

No but I was hoping somebody might be able to tell me
that the approach (checking each quadrant) is ok or
maybe see that I’m making a false assumption.

Thanks,

Guilherme___________________________________________________________
To help you stay safe and secure online, we’ve developed the all new Yahoo! Security Centre. http://uk.security.yahoo.com

Guilherme De Sousa wrote:

The actual problem is that the view is initially blank.
Rotating you can see 2 wall sections.

Probably a camera/FOV vector initialization problem somewhere.

Moving forward reveals more walls some of which appear to be
only half their width, others seem to flick in and out of view.
The walls that do appear don’t really seem to match the map.

Some screenshots and the actual map used would help, but also see below.

What I thought I might do was create a very small, simple map
of my own as it might be easier to step through things that way.

You should absolutely do that, especially since you are working with
unfamiliar code.

No but I was hoping somebody might be able to tell me that the
approach (checking each quadrant) is ok or maybe see that I’m making
a false assumption.

The approach you have chosen may not work very well. It will make all your
walls paper-thick, which depending on your exact map layouts may or may
not work. With the algorithm presented, you will need to make many tweaks in
order to give your walls some thickness. In fact, I think it will be so many
tweaks it will kill the intended performance.
Instead, I think you should convert your game map to the format used by the
algorithm, where each square has the exact size of your wall thickness. So
one game square (as in your screenshot) becomes many engine squares, not
just 1. And by also adding your approach to this, you can give each wall
section (engine square) a different texture on each side.

It’s also worth mentioning that the raycasting tutorial in question is
incomplete for your purposes. It has no partially obscuring sections
handling (like an open door or that arch in your AR screenshot).

Also, can you walk freely in this game or is the movement purely room by
room with orthogonal-only turning? You may not even need the raycasting
technique if it’s the latter. You could also generate the map for the
algorithm dynamically, depending on what room you are in to keep it small.

-Alex.

Alex,

Thanks for your suggestions and comments.

— Alex Volkov wrote:

Some screenshots and the actual map used would help,
but also see below.

I can provide these but the screenshots are so varied
I don’t know if they’ll be helpful.

Instead, I think you should convert your game map to
the format used by the
algorithm, where each square has the exact size of
your wall thickness. So
one game square (as in your screenshot) becomes many
engine squares, not
just 1. And by also adding your approach to this,
you can give each wall
section (engine square) a different texture on each
side.

I’ve considered this before and now that you’ve raised
it again I’m tempted to do this. The original game
does feature the paper thin walls so I was trying to
remain faithful to the original game. While I’ve been
looking at raycasting I’ve been giving a lot of
thought about how faithful I need to or should aim to
make this port and this is one example where I might
be making things more difficult for myself needlessly.

It’s also worth mentioning that the raycasting
tutorial in question is
incomplete for your purposes. It has no partially
obscuring sections
handling (like an open door or that arch in your AR
screenshot).

My current demo code displays these so it would be a
shame to leave them out but they aren’t essential.

Also, can you walk freely in this game or is the
movement purely room by
room with orthogonal-only turning? You may not even
need the raycasting
technique if it’s the latter.

In the original game you can move smoothly forward and
backward but you are restricted to 90 degree turns. I
believe the original game used mip-mapping with a
routine to scale and rotate a rectangle. My current
demo code limits you to 90 degree turns and “skips” a
whole square when you move forward or backward.

You could also
generate the map for the
algorithm dynamically, depending on what room you
are in to keep it small.

-Alex.

That’s a good idea. The original game’s first level
was split into 4 parts each 32x32 squares and these
were loaded into memory as needed. I’d merged these
into a single 64x64 level but there are effectively 4
mini levels still there. They are joined together by 2
"teleport" squares at the edges of each map section.

Many thanks,

Guilherme___________________________________________________________
Yahoo! Model Search 2005 - Find the next catwalk superstars - http://uk.news.yahoo.com/hot/model-search/