|
||
|
|
#1 (permalink) |
|
Forum Novice
Join Date: Jan 2004
Posts: 143
|
Why does no one post here? I use the SDK everyday for making my own UO client... Anyone want to know something? How about a tutorial on displaing the UO game screen?
![]() Here is something I did in 40 mins with the SDK as of Feb 24, 2006. The names are people around me at the time. I logged into UO with UOLight and then used the Ultima SDK to do a printing of the map. Yes it sucks but hey it took 40 mins. Update: Spent 30 mins more and realized the map is actually a gride twisted to the size. Here is UO at sat view. ![]() Fun with the SDK? Note: I didnt figure out how the Z axies work yet, I thought it would be increasing the actual X (screen X) but nope, so if you know, knowing is half the battle. |
|
|
|
|
|
#2 (permalink) | |
|
Forum Novice
Join Date: Jan 2004
Posts: 143
|
Quote:
Holy shit, sounds like people are scared of posting work or saying anything about work incase they said someone stold it. Sounds gay TBH. ***Discalimer**** I could care less |
|
|
|
|
|
|
#4 (permalink) |
|
Forum Novice
Join Date: Jan 2004
Posts: 143
|
I started reworking the code to display in a box pattern rather then a giant sidways box. The land tiles run off a double loop, which should be changed to run off a single loop, THEN be changed to run of DirectX or OpenGL, since its a lot faster.
Include the Ultima.dll in your app, run that code in main or a function and it will output a large land tile map of UO. if you wanted to add static tiles. you need to run the loop after it. To get the ID you subtract by 0x4000 HuedTile[] htile = tlm.GetStaticTiles(x, y); short trueID = htile[0].ID - 0x4000; Also make sure you check the .length is > 0 before doing that. But it needs to be put in a single loop and not doubles like below. RHYMES LOLOLOL Code:
TileMatrix tlm = new TileMatrix(0, 0, Map.Felucca.Width, Map.Felucca.Height);
int size = 50;
Bitmap FInalBMp = new Bitmap(44*size, 44*size);
Graphics newBmpGraphics = Graphics.FromImage(FInalBMp);
int TrueX = 0;
int TrueY = 0;
int PlayPosX = 1416 - size/2;
int PlayPosY = 1674 - size/2;
int IncY = 0;
//Grid A Land Tiles
for (int y = 0; y < size; y++)
{
for (int x = 0; x < size; x++)
{
Tile tle1 = tlm.GetLandTile(PlayPosX + x, PlayPosY + IncY);
newBmpGraphics.DrawImage(Art.GetLand(tle1.ID), new Point(TrueX, TrueY));
TrueX += 44;
IncY--;
}
TrueX = 0;
IncY = 0;
TrueY += 44;
PlayPosX++;
PlayPosY++;
}
//Grid B Land Tiles
TrueX = -22;
TrueY = 22;
PlayPosX = 1416 - size / 2;
PlayPosY = (1674 + 1) - size / 2;
IncY = 0;
for (int y = 0; y < size; y++)
{
for (int x = 0; x < size; x++)
{
Tile tle1 = tlm.GetLandTile(PlayPosX + x, PlayPosY + IncY);
newBmpGraphics.DrawImage(Art.GetLand(tle1.ID), new Point(TrueX, TrueY));
TrueX += 44;
IncY--;
}
TrueX = -22;
IncY = 0;
TrueY += 44;
PlayPosY++;
PlayPosX++;
}
FInalBMp.Save("Map.bmp");
|
|
|
|
|
|
#5 (permalink) |
|
Forum Expert
Join Date: Dec 2005
Posts: 553
|
Code:
using System;
using System.Collections.Generic;
using System.Windows.Forms;
using System.Drawing;
using Ultima;
namespace WindowsApplication1
{
static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
TileMatrix tlm = new TileMatrix(0, 0, Map.Felucca.Width, Map.Felucca.Height);
int size = 50;
Bitmap FinalBMP = new Bitmap(44 * size, 44 * size);
Graphics newBmpGraphics = Graphics.FromImage(FinalBMP);
int TrueX = 0;
int TrueY = 0;
int PlayPosX = 1416 - size / 2;
int PlayPosY = 1674 - size / 2;
int IncY = 0;
//Grid A Land Tiles
for (int y = 0; y < size; y++)
{
for (int x = 0; x < size; x++)
{
Tile tle1 = tlm.GetLandTile(PlayPosX + x, PlayPosY + IncY);
newBmpGraphics.DrawImage(Art.GetLand(tle1.ID), new Point(TrueX, TrueY));
TrueX += 44;
IncY--;
}
TrueX = 0;
IncY = 0;
TrueY += 44;
PlayPosX++;
PlayPosY++;
}
//Grid B Land Tiles
TrueX = -22;
TrueY = 22;
PlayPosX = 1416 - size / 2;
PlayPosY = (1674 + 1) - size / 2;
IncY = 0;
for (int y = 0; y < size; y++)
{
for (int x = 0; x < size; x++)
{
Tile tle1 = tlm.GetLandTile(PlayPosX + x, PlayPosY + IncY);
newBmpGraphics.DrawImage(Art.GetLand(tle1.ID), new Point(TrueX, TrueY));
TrueX += 44;
IncY--;
}
TrueX = -22;
IncY = 0;
TrueY += 44;
PlayPosY++;
PlayPosX++;
}
FinalBMP.Save("Map.bmp");
}
}
}
![]() Where's the roofs? -2x
__________________
"On principle, having read your previous posts, I'm neg-repping you. Yer a frackin' waste of space." |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|