Page 2 of 3
Re: Rotate graphics 45 degrees to be upright?
Posted: Sat Oct 27, 2012 2:22 pm
by Kalos Dragon
I've played around with the rotate patch. It works very well, albeit slightly slow presently.
There are issues with:
-Mouse alignment with object about to be dragged
-Object being dragged reverts to the original, non-rotated display.
Re: Rotate graphics 45 degrees to be upright?
Posted: Sat Oct 27, 2012 3:46 pm
by William
Sadly I haven't been getting this to work yet. As one who remembers getting Ultima 7 to run in dos before the days of Exult, I like to think I should be able to figure this patch out, but apparently I can't.
I have:
-Moved your .exe into the same folder as the usual exult.exe
-Copied bgdefaultkeys.txt, renamed it my_keys.txt, and added the new line at the end of it
-Edited the exult.cfg to read (my exult program is found at C:\exult
c:\exult\my_keys.txt
I run the rotate.exe, change to the proper video options, then start a new game.
So far I haven't gotten it to rotate. What am I doing wrong?
Thanks!
Re: Rotate graphics 45 degrees to be upright?
Posted: Sat Oct 27, 2012 5:24 pm
by Dominus
Did you hit q? And are you using the right exult.cfg?
Re: Rotate graphics 45 degrees to be upright?
Posted: Sat Oct 27, 2012 6:44 pm
by Kalos Dragon
You need to modify the my_keys.txt to include "q" as a hotkey.
Quoted from cma:
Create a custom key binding and map a key for toggling rotation
- copy bgdefaultkeys.txt in Excult directory and name it my_keys.txt
- edit my_keys.txt and add a new line at the end like this:
Q toggle_rotate_world # hit Q for toggling rotation
Re: Rotate graphics 45 degrees to be upright?
Posted: Sat Oct 27, 2012 7:11 pm
by William
Wow thanks for the quick responses!
Uh oh, what is the right exult.cfg? I'm using the exult.cfg file that is in the same directory as the exult.exe file. I am hitting q, and I did modify the my_keys to include the new line with the q.
Re: Rotate graphics 45 degrees to be upright?
Posted: Sat Oct 27, 2012 7:20 pm
by William
Aha, I found it! I wasn't aware that the exult.cfg in the Exult folder was not the real one! Thanks for the help!
Re: Rotate graphics 45 degrees to be upright?
Posted: Fri Nov 02, 2012 3:53 am
by Kalos Dragon
Yeah, Exult does that for some reason.
I gotta call shenanigans on it.
C'est la vie.
Re: Rotate graphics 45 degrees to be upright?
Posted: Fri Nov 02, 2012 4:21 am
by Dominus
Yeah, Exult does that for some reason.
because with modern Windows OS you are by default not allowed to write to files in c:/program files. You'd still have an exult.cfg but the actual file being used would be even more annoyingly in a different folder in the user folder....
Re: Rotate graphics 45 degrees to be upright?
Posted: Fri Nov 02, 2012 5:58 pm
by Kalos Dragon
Ah, the perils of installing to C:\Program Files\, as opposed to, I don't know, C:\Games\.
However, we digress from the actual topic.
CMA, how goes thy work, good sir?
Shirley thou hast progressed with the Ultima 7 upright world patch.
What say thee?
Re: Rotate graphics 45 degrees to be upright?
Posted: Fri Nov 02, 2012 6:15 pm
by Smoke
I'm sorry, I didn't read this entire topic, but, the solution to this is simple, assuming you use a matrix.
You just setup up your rendering to use a matrix, apply a rotation to matrix for the world, objects, etc, excluding UI, and other things you don't want rotated.
Seriously, use a matrix, it's the EASIEST way to handle rendering, they can be a pain to setup, and get right, but, once implemented, you can zoom\rotate\move any object however you want with little trouble.
Re: Rotate graphics 45 degrees to be upright?
Posted: Fri Nov 02, 2012 7:00 pm
by Nanihikaru
Works! it also made the game look like Ultima 8!
except it's too slow on my laptop makes it hard to play.
I wonder if is possible to pre-render all world tiles 45' and modify the game view port and render to accommodate the new coordinate system.
Re: Rotate graphics 45 degrees to be upright?
Posted: Fri Nov 02, 2012 7:43 pm
by Smoke
There doesn't seem to be an "edit" button. ?
Anyways, I just wanted to add that the majority of games use a matrix for handling rendering, and since the matrix does all the math for you, it will likely make the game run better, or at least feel better\smoother. (Google should get you sorted, search for: SDL Camera Matrix 2D)
Aside from the rotation fix being applied, I'd also love to see zooming implemented into the camera.
@Nanihikaru, what I've suggested should fix that problem, however, during a quick search, I read that SDL doesn't support hardware transforms, there seems to be a better version of SDL(or something similar?) which does, however, it may not be as portable. (I don't really know this API that well, I generally use DX myself, so, just, research it a bit I'm sure you guys will find all you need via Google.)
Re: Rotate graphics 45 degrees to be upright?
Posted: Sat Nov 03, 2012 12:05 am
by marzo
@Smoke: there is a difference between not wanting to read the whole thread and not wanting to put the slightest bit of effort in attempting to get updated in the topic; the post right above yours asks about the status of a patch -- which would imply to anyone with the least bit of coding experience to suspect that someone has solved the problem. Which is the case here: just a few page up presses from your post was a set of screenshots of a working demo, as well as source code patches.
And yes, we know about matrices. They are useful, yes, but not as "magical" as you may have been led to believe.
But enough of grumbling; the rotated graphics are really beautiful! The non-isometric nature of the end graphics actually makes them look more realistic than a normal isometric perspective does, at least to my eyes.
Re: Rotate graphics 45 degrees to be upright?
Posted: Sat Nov 03, 2012 12:34 pm
by Smoke
"not wanting to put the slightest bit of effort in attempting to get updated in the topic"
I read the topic(mostly), and I saw the patch.
But, I think you're killing performance, and likely causing bugs by doing it that way, so, I offered another option.
Regardless, I was completely up to date, you assume too much.
------------
"post right above yours asks about the status of a patch... which would imply to anyone with the least bit of coding experience..."
I posted before him, originally, but yeah, I should have skipped ahead into the future, and saw his post, then went back into the past, and warned myself about making that post...
Seriously, you should get up to date on the topic, you must not have the least bit of 'coding' experience. (Do you see how ridiculous that sounds?)
-----
"And yes, we know about matrices. They are useful, yes, but not as "magical" as you may have been led to believe."
I don't think you do, and I wasn't led to believe anything, I know.
--
"But enough of grumbling"
kthxbye?
Re: Rotate graphics 45 degrees to be upright?
Posted: Sat Nov 03, 2012 12:43 pm
by Dominus
You wrote yourself you didn't read the whole thread.
Marzo was refering to the post directly above your 1st post.
Before arguing for matrices please take a look at our code and see if that is even applicable. Same for zooming...
Enough arguing about it, if you want to really help, please first look at the code and give practical advice instead of theoretical.
Btw, no edit possibility of topics because we like to keep the forum as simple as possible.
Re: Rotate graphics 45 degrees to be upright?
Posted: Sun Nov 04, 2012 1:07 am
by Smoke
"Before arguing for matrices please take a look at our code and see if that is even applicable. Same for zooming..."
I don't need to see your code to make this determination.
It's a basic and fundamental aspect of rendering that applies to every single graphics API that I've ever used, and imagine has ever existed.
As for practical advice, it was already given, you've simply refused to hear it.
Anyways, I suggest researching basic rendering principles, particularly matrices, and their usage in terms of transformations. (ie, rotation, etc,.)
Re: Rotate graphics 45 degrees to be upright?
Posted: Sun Nov 04, 2012 3:51 am
by Dominus
Enough arguing about it, if you want to really help, please first look at the code and give practical advice instead of theoretical.
As long as you have no idea about SDL or our code all you are giving is useless theoretical advice and wisecracking.
Wouldn't you look foolish to begin with if we were already using matices?
Or if we weren't would you volunteer to rewrite our rendering code to use them, testing the whole game that your new code doesn't break anything?
I guess not as you only like to give theoretical advice. Thanks but no thanks.
If you like to discuss this further, please start your own thread but be gone from this one. I'll see to it that this thread keeps clean from now on.
Edit: seriously, reread what I wrote. NO MORE of this in this thread. I WILL keep this thread clean from now on.
If you open a new thread be aware that in theory world peace could be achieved by killing all humans. But that is just not practical. Applying this to your matrix stuff. Yes, in theory matrices would help, it's just not practical to rewrite everything at this stage. You are welcome to hand in patches - that would be practical. Theories are nice I'd just like you to prove it. Until then consider yourself ignored (unless it really concerns the topic of this thread again). Also see
https://dl.dropbox.com/u/29229104/picdu ... erenet.jpg
Re: Rotate graphics 45 degrees to be upright?
Posted: Sun Nov 04, 2012 2:06 pm
by Ugh...
No matter how many times I repeat all steps and double-check each one, I can't get the rotation to work. And I know that Exult-rotate-v2.exe is loading the right keys file, as if I erase one of the default key bindings from the same file I added the key for toggle_rotate_world to, it stops working in-game. WTF?
Re: Rotate graphics 45 degrees to be upright?
Posted: Sun Nov 04, 2012 10:17 pm
by Mimu
Hmm. If you try editing your video settings in-game, and switch the scaler to something other than 2xSaI, then close the menu and press Q, there should be a message saying "Rotate: needs 2xSaI scaler". If you don't get that message, then I would guess maybe the Q keybinding isn't working for whatever reason...
Re: Rotate graphics 45 degrees to be upright?
Posted: Mon Nov 05, 2012 12:46 am
by cma
Responding to Kalos Dragon's post
"There are issues with:
-Mouse alignment with object about to be dragged
-Object being dragged reverts to the original, non-rotated display."
Mouse alignment turn out to be a tough problem. Mouse positions are rotated for finding object in rotated world. I cannot make the mouse works well with all the objects on screen. objects close to the center of the screen seems to align better. I did some adjustments anyway, try this windows executable and see whether the alignment improved.
https://www.dropbox.com/s/etua8zt990ybm ... te-0.3.exe
To rotate the object being dragged it need to be upscale first otherwise the graphics will look crappy. Unfortunately, dragged objects is painted on top of the gump (to support dragging object to character inventory) which does not upscale until all the non-rotate shape are all painted. This require quite a bit of code changes. I need to give it some more thought.
Re: Rotate graphics 45 degrees to be upright?
Posted: Tue Nov 13, 2012 12:34 pm
by Guesto
Looks awesome, keep it up
Re: Rotate graphics 45 degrees to be upright?
Posted: Sat Nov 17, 2012 7:57 pm
by TDI
Awesome. I can't wait for this to make it's way into the official snapshots. Then it will really be time to replay U7 again.
Re: Rotate graphics 45 degrees to be upright?
Posted: Wed Dec 05, 2012 1:01 pm
by voskat
This doesn't work with Exult 1.5.0 then?
Re: Rotate graphics 45 degrees to be upright?
Posted: Wed Dec 05, 2012 1:28 pm
by Dominus
No, it doesn't work with SVN.
Re: Rotate graphics 45 degrees to be upright?
Posted: Thu Dec 13, 2012 10:24 pm
by Elrond Hubbard
Sometimes people ask "Why do we need Exult, can't you just run Ultima 7 in Dosbox?"
Exult Rotate is an example of something you can only do with an open-source reimplementation of the Ultima 7 engine.
Re: Rotate graphics 45 degrees to be upright?
Posted: Thu Dec 27, 2012 5:10 am
by Kalos Dragon
So, what's going on with this? Any News?
Re: Rotate graphics 45 degrees to be upright?
Posted: Mon Jan 14, 2013 7:48 am
by Kalos Dragon
Really? Nothing?
Thou surely must be kidding!
Re: Rotate graphics 45 degrees to be upright?
Posted: Mon Jan 14, 2013 10:59 am
by paulo
There are lots of other things happening with exult right now, but this patch is not one of them, unless there is a surprise merge request.
Re: Rotate graphics 45 degrees to be upright?
Posted: Mon Jan 14, 2013 11:51 am
by Dominus
Someone would need to take a look how cleanly it merges AND fix the dependency on a certain scaler.
Re: Rotate graphics 45 degrees to be upright?
Posted: Mon Jan 14, 2013 3:26 pm
by marzo
I got some time after I fix the blacksmith schedule, so I may take a look at those points. Is there a patch available for v3? I only see the exe for it, and patches and exes for v2.
Re: Rotate graphics 45 degrees to be upright?
Posted: Tue Jan 15, 2013 1:11 am
by cma
@Kalos Dragon: sorry for my absent of response. I started looking at the dragging shape not being rotated issue after new year's day. I think i may have a workaround , still trying get the code working.
@Geometrodynamic Dragon: I did not post the v0.3 patch, there wasn;t much change from v2 anyway. Let me try merge this patch with 1.5 CVS snapshot source. Hopefully I can create a 1.5.x patch sooner. I never work with the CVS source before, so I have no idea when the patch will be ready.
Re: Rotate graphics 45 degrees to be upright?
Posted: Wed Jan 16, 2013 5:08 am
by cma
Here is a patch against Excult 1.5 SVN snapshot.
https://www.dropbox.com/s/kancv33s31x85 ... v0.3.patch
It should work the same as the old 1.4.9-rc9-rotate-v0.3.patch except I enabled a few more scalers. The following scalers should work, finger crossed
- Point (2x, 3x , etc),
- Scale2x
- 2xSaI, Super 2xSaI
- Super Eagle
Re: Rotate graphics 45 degrees to be upright?
Posted: Wed Jan 16, 2013 10:22 am
by Dominus
Thanks a lot.
I had some errors applying the patch:
in gamewin.h
#include "objs/flags.h"
#include "shapes/vgafile.h"
This wasn't a problem before because gamewin.h wasn't included in imagewin.cc before.
(most likely the imagewin/makefile.am just needs "-I$(srcdir)/../shapes -I$(srcdir)/../objs" to AM_CPPFLAGS)
Then this:
Code: Select all
drag.cc:233:9: error: no matching member function for call to 'paint'
gwin->paint(gwin->clip_to_win(rrect));
~~~~~~^~~~~
./gamewin.h:446:7: note: candidate function not viable: no known conversion from
'Rectangle' to 'Rectangle &' for 1st argument;
void paint(Rectangle& r)
^
./gamewin.h:445:7: note: candidate function not viable: requires 4 arguments,
but 1 was provided
void paint(int x, int y, int w, int h);
^
./gamewin.h:448:7: note: candidate function not viable: requires 0 arguments,
but 1 was provided
void paint(); // Paint whole image.
^
1 error generated.
I "resolved" this by replacing
gwin->paint(gwin->clip_to_win(rrect));
with just
gwin->clip_to_win(rrect);
which is probably wrong though...
I made a snapshot for OS X with this patch and the rotate key 'Q' already assigned.
http://dl.dropbox.com/u/7737184/Exult-snapshot.dmg
Strangeness I found:
- when you drag an object, the object is still left painted at its original point until you let go of the object at its new point (could very well be related to my "fix" above)
- teleport cheat alt+t is not using the new rotated coordinates
Re: Rotate graphics 45 degrees to be upright?
Posted: Thu Jan 17, 2013 2:33 am
by cma
Try change this:
gwin->paint(gwin->clip_to_win(rrect));
to:
Rectangle crect = gwin->clip_to_win(rrect);
gwin->paint(crect);
insteads and see whether it helps.
For the Alt-t cheat. look inside cheat.cc and add new code after the call to screen_to_game
void Cheat::cursor_teleport (void) const {
if (!enabled) return;
int x, y;
SDL_GetMouseState(&x, &y);
gwin->get_win()->screen_to_game(x,y,gwin->get_fastmouse(),x,y);
(new) if (gwin->rotate) gwin->map_to_rotated_map(x,y); // convert to rotated world
I did not try the cheat keys so assume they do not (yet) work for rotated world. I will update the v0.3 patch to include above changes.
Re: Rotate graphics 45 degrees to be upright?
Posted: Thu Jan 17, 2013 7:58 pm
by Dominus
I didn't try anything new out except for getting your last v3 patch and with that all my problems (except for the makefile.am one) are solved.
No compile problem, no dragging ghost on original spot and teleport cheat worked fine, too.
Thanks a lot.
Same snapshot for OS X at
http://dl.dropbox.com/u/7737184/Exult-snapshot.dmg (still uploading, though)
Re: Rotate graphics 45 degrees to be upright?
Posted: Sat Jan 26, 2013 2:02 pm
by Kalos Dragon
Well ain't that a thing.
Is this truly to be merged into the main project?
It shows that there's still plenty of room for innovation in this old game.
Have a beer on me.
Re: Rotate graphics 45 degrees to be upright?
Posted: Tue Feb 05, 2013 9:41 pm
by Maenad
This looks absolutely amazing, but I appear to be screwing something up.
I have the exult-1.5-rotate-v0.3.patch file in the patch folder.
I've set the location to the folder it's in.
I've directed to my_keys and added the Q toggle_rotate_world line.
The cfg file I'm using is in appdata\local.
I'm using the Exult 1.5.x binary Snapshot for Windows (I'm running 64 bit Win7).
Nothing happens when I press Q. What am I missing?
Long version of file locations for reference:
C:\Users\Me\AppData\Local\Exult\exult.cfg now has:
C:\UC\Ultima7\patch
C:\Users\Me\Desktop\Games\Exult\my_keys.txt
and C:\Users\Me\Desktop\Games\Exult\my_keys now has:
Q toggle_rotate_world
Re: Rotate graphics 45 degrees to be upright?
Posted: Wed Feb 06, 2013 6:13 am
by Dominus
You use the exe instead of the exult.exe. The patch file is for compiling exult with the changes in the patch, NOT for using it as a mod/patch
Re: Rotate graphics 45 degrees to be upright?
Posted: Wed Feb 06, 2013 5:49 pm
by Maenad
Thanks. I thought that might be the case, but the .exe didn't work for me so I was trying everything.
Running the Exult-rotate-0.3.exe file instead of exult.exe (with it in the same folder) just gives me the message that it's not compatible with my version of windows, and to check whether I need a 32 or 64 bit version.
I tried it with both the 1.5 and the 1.4.9 snapshots just in case it worked with one and not the other, but got the same error.
Re: Rotate graphics 45 degrees to be upright?
Posted: Wed Feb 06, 2013 6:07 pm
by Dominus
Ah, the v3 compiled version of this patch is for the 1.4.9 rc1 version of Exult.
(And the v3 PATCH file is actually for the source code of the snapshot
)
Re: Rotate graphics 45 degrees to be upright?
Posted: Wed Feb 06, 2013 8:45 pm
by Maenad
As a last ditch effort, I just uninstalled and reinstalled, and now it works. Thanks, and sorry to be a bother!
P.S. This is excellent.
Re: Rotate graphics 45 degrees to be upright?
Posted: Sun Apr 07, 2013 3:27 pm
by Demorde
I am attempting to apply the .3 patch to the current svn build (from the downloads page) on Arch Linux 64, but it will not successfully apply. As you can see from the output (
http://pastebin.com/raw.php?i=JCQshAWz ) there are a number of hunks that fail and I am not really qualified to fiddle with it to get it to apply correctly.
Any suggestions?
Re: Rotate graphics 45 degrees to be upright?
Posted: Thu May 23, 2013 9:47 pm
by Moorkh
I believe I have a similar problem as stated. I have installed the 1.49rc1 version of exult and have downloaded the 0.3 version (non-1.5) of this mod.
I have not used any patch as I don't think I need to, this already being 0.3.
I have inserted the changes in "my_keys" and exult.cfg.
Yet, when I try to start exult-rotate, I get that error mistake about the version not being compatible to my version of windows (7 64bit) even though vanilla exult works just fine. Any ideas?
Re: Rotate graphics 45 degrees to be upright?
Posted: Fri May 24, 2013 7:35 am
by Dominus
Similar problem to which post?
Re: Rotate graphics 45 degrees to be upright?
Posted: Fri May 24, 2013 7:30 pm
by Moorkh
To Maenad's. Concerning the error I get when starting exult-rotate-03.exe.
Re-installing didn't do anything for me, though, and I had installed exult freshly in the first place.
Re: Rotate graphics 45 degrees to be upright?
Posted: Sun Jun 02, 2013 11:58 pm
by lexicon
For me, 'exult-1.5-rotate-v0.3.patch' is not working properly
So I just use exult 1.49rc1 and 0.3. This works fine.
All you need is
Get exult 1.49rc1 and rotate 0.3
Edit exult.cfg and .txt
Start game with Exult-rotate-0.3.exe
And turn on your 'cheat' option in exult (in game)
Then press the proper key 'q'
Re: Rotate graphics 45 degrees to be upright?
Posted: Mon Jun 03, 2013 3:26 am
by Dominus
Moorkh, redownload v3, perhaps that download was incomplete.
Re: Rotate graphics 45 degrees to be upright?
Posted: Sun Jun 09, 2013 6:41 pm
by Moorkh
Redownloading helped some, thanks - the game now loads.
However, pressing Q still doesn't do anything. I checked that all my paths are correct, and the line in my_keys.txt is exactly as supposed to. Still nothing. There's something about modifying the "correct" exult.cfg, but I didn't quite catch that.
Re: Rotate graphics 45 degrees to be upright?
Posted: Sun Jun 09, 2013 6:59 pm
by Dominus
Great that it now runs at least
see
http://exult.info/faq.php#where_cfg for the right cfg to edit
Re: Rotate graphics 45 degrees to be upright?
Posted: Wed Jun 12, 2013 11:37 pm
by Torgus Dragon
Just to be clear the game is not easily completeable with this mod correct?