Jumbofile Posted December 15, 2014 Author Share Posted December 15, 2014 How would I make it for the camera in EO3.0 zoom in 2x so I dont have to resize all of my graphics? Link to comment Share on other sites More sharing options...
Officer Johnson Posted December 15, 2014 Share Posted December 15, 2014 hmm i dont get it? Link to comment Share on other sites More sharing options...
Jumbofile Posted December 15, 2014 Author Share Posted December 15, 2014 I need to make the camera zoom in so it gives the illusion of every tile being 64x64 Link to comment Share on other sites More sharing options...
Lavos Posted December 15, 2014 Share Posted December 15, 2014 other than scaling, i don't think its possible in any EO engines on DX8\. I've done this before and it requires everything to be rendered in 3d space(or matrix?) onto a surface and used the camera for zoom control. Link to comment Share on other sites More sharing options...
Ezemel Posted December 15, 2014 Share Posted December 15, 2014 It's possible lol, Thomas [deathbeam] did that for me a few years ago. Link to comment Share on other sites More sharing options...
hisherwin Posted December 15, 2014 Share Posted December 15, 2014 Possible.. already done this before..Look on this codeCall RenderTexture(Texture, X, Y, StartingXofThePicture, StartingYofThePicture, (Here is the code on scalling the graphics X), (Here is the code on scalling the graphics Y), SizeOfTheGraphicsX, SizeOfTheGraphicsY)But this method may fail.. i forgot what i did before that's why i can't tell you what to change. Link to comment Share on other sites More sharing options...
Rob Janes Posted December 15, 2014 Share Posted December 15, 2014 SherwiN is right, it's not really a "zoom" you simply render the texture into a larger surface size than the images actual dimensions.If you look at your Sub DrawMapTIle you'll findRenderTexture Tex_Tileset(.layer(I).Tileset), ConvertMapX(X * PIC_X), ConvertMapY(Y * PIC_Y), .layer(I).X * 32, .layer(I).Y * 32, 32, 32, 32, 32, -1Without testing it, this "should" work RenderTexture Tex_Tileset(.layer(I).Tileset), ConvertMapX(X * PIC_X), ConvertMapY(Y * PIC_Y), .layer(I).X * 32, .layer(I).Y * 32, 64, 64, 32, 32, -1Render Texture uses the variables (ByRef TextureRec As DX8TextureRec, ByVal dX As Single, ByVal dY As Single, ByVal sx As Single, ByVal sy As Single, ByVal dWidth As Single, ByVal dHeight As Single, ByVal sWidth As Single, ByVal sHeight As Single, Optional color As Long = -1, Optional ByVal Degrees As Single = 0), so you want to change the Destination With and Destination Height (dWidth and dHeight) Link to comment Share on other sites More sharing options...
Jumbofile Posted December 16, 2014 Author Share Posted December 16, 2014 Thanks for the help everyone, Rob, using the code you gave me I got this.![](http://eclipseorigins.com/community/filehost/1fc33a7715916072c858d2f4387b0d2b.png)This is what I'm aiming to do (edited in paint lol)![](http://eclipseorigins.com/community/filehost/5398bfaa6bfc988e16be35fdd0834b31.png) Link to comment Share on other sites More sharing options...
hisherwin Posted December 16, 2014 Share Posted December 16, 2014 > SherwiN is right, it's not really a "zoom" you simply render the texture into a larger surface size than the images actual dimensions.> > > > If you look at your Sub DrawMapTIle you'll find> > > > RenderTexture Tex_Tileset(.layer(I).Tileset), ConvertMapX(X * PIC_X), ConvertMapY(Y * PIC_Y), .layer(I).X * 32, .layer(I).Y * 32, 32, 32, 32, 32, -1> > > > Without testing it, this "should" work RenderTexture Tex_Tileset(.layer(I).Tileset), ConvertMapX(X * PIC_X), ConvertMapY(Y * PIC_Y), .layer(I).X * 32, .layer(I).Y * 32, 64, 64, 32, 32, -1> > > > Render Texture uses the variables (ByRef TextureRec As DX8TextureRec, ByVal dX As Single, ByVal dY As Single, ByVal sx As Single, ByVal sy As Single, ByVal dWidth As Single, ByVal dHeight As Single, ByVal sWidth As Single, ByVal sHeight As Single, Optional color As Long = -1, Optional ByVal Degrees As Single = 0), so you want to change the Destination With and Destination Height (dWidth and dHeight)"Should" is "Shouldn't"scalling the image on that code might cover the relative graphics, I'm not good on english so i'll explain it graphicallyfor example this is the image tileset you are using , Normal size (32x32)![](http://eclipseorigins.com/community/filehost/bc6e0d47dfbb35000eea6aa1e11d7e16.png)here's what you expected because of the logic on rendering![](http://eclipseorigins.com/community/filehost/54658f77112e71e93edca2911765cabc.png)but this is what the engine will show you![](http://eclipseorigins.com/community/filehost/c88c0e3a3631a5532fb7706d4a297e6f.png)i don't know how to fix this but i have my own method of scalling.. i mean zooming.. Link to comment Share on other sites More sharing options...
Rob Janes Posted December 16, 2014 Share Posted December 16, 2014 You'd have the Tweak places where it calls "RenderTexture" to adjust the destination width and height to 64x64 in other places as well, not just in DrawMapTile, it was just an example.I'm not entirely sure I follow your issue though Sherwin? I've never run into an issue where rendering into a source plane 2x the size has given me the artefact border unless I'm trying to stretch an that wasn't initially to the power of 2, or putting it into a surface that isn't to a power of 2? Link to comment Share on other sites More sharing options...
hisherwin Posted December 16, 2014 Share Posted December 16, 2014 > You'd have the Tweak places where it calls "RenderTexture" to adjust the destination width and height to 64x64 in other places as well, not just in DrawMapTile, it was just an example.> > > > I'm not entirely sure I follow your issue though Sherwin? I've never run into an issue where rendering into a source plane 2x the size has given me the artefact border unless I'm trying to stretch an that wasn't initially to the power of 2, or putting it into a surface that isn't to a power of 2?Try the zooming using RenderTexture scalling image only at tilesets.. you'll get the problemdon't add anything else. just double the scale size Link to comment Share on other sites More sharing options...
Jumbofile Posted December 17, 2014 Author Share Posted December 17, 2014 This is way out of my programming ability, one of you mind helping me out? Link to comment Share on other sites More sharing options...
Jumbofile Posted December 24, 2014 Author Share Posted December 24, 2014 Bump Link to comment Share on other sites More sharing options...
Helladen Posted December 25, 2014 Share Posted December 25, 2014 The camera will stretch for you, all you need to do is change the minimum values usually MAX_MAPX and MAX_MAPY. You then change the surface size in InitDX8 to be a different size than the form to the ratio you want to scale. For example, if your form size is 1024x768, you want to set your game's resolution to half that in InitDX8\. By doing this, it will force the textures to 2x size making the game more zoomed in. I may have it backwards though.This is one of the harder aspects of programming, you're gonna have to work hard to figure it out. There's a lot of things that can cause it not to stretch the game such as if you use a picScreen and not the actual form, this may have side effects. I only use picScreen cause I would have to redo my engine's entire pictures from scratch and reorganize everything. Rather, I will just do it for 1.3.0.People aren't gonna code your game for you. :( Link to comment Share on other sites More sharing options...
hisherwin Posted December 25, 2014 Share Posted December 25, 2014 > People aren't gonna code your game for you. :(Aha.. you got that right~People won't work without motivation (unless it's Santa) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now