Comments (11)
Thanks a lot man. It's a blocker for me :(
from cocossharp.
Here's a screenshot from my test:
Window and design resolution size are set to 2048x1536 (1024x768 * 2), but as you can see the real space is somewhat smaller. Mind the black space on the edge of the window.
The repo is here: https://github.com/vancura/fracthor/commit/6dccc3fb441618a2c2ff51a917b7e7843f7e5b16
from cocossharp.
This is the same thing in Nexus 4 in Android Simulator. Screen height shouldn't be 1185px.
from cocossharp.
@vancura Can you verify the change committed to see if that fixes this issues. Fingers crossed.
from cocossharp.
No, it didn't help, I nearly had a fix when I found out this method of Monogame's Viewport.
There's a lot of floats involved and vector.z
is never exactly 1, but it's very very close. It can't be 1, as it's used for 3D projection. Well, 3D projection. The rounding problem could be seen only when CCCameraProjection.Projection3D
is used (not 2D).
I don't think we can do anything with that. It's deep in MonoGame and that's how MonoGame works. Wondering how other games do it, if they just gave up on edge to edge rendering.
@kjpou1: I guess you should revert your commit, as we don't know if it doesn't have any other issues.
from cocossharp.
That reminds me: we removed 2D projection, right? :(
from cocossharp.
@kjpou1: maybe leave the commit there. It's better at least on Nexus 7 in landscape.
from cocossharp.
@kjpou1: I'll take a look at this -- still think it's related to numerical rounding issues from our side. I would prefer to revert this commit for now. I remember when toying around and taking the ceiling or floor of certain values I observed an "improved" bounds calculation but this was just by luck of the particular design resolution I had chosen. When I tried a variety of different resolutions I didn't consistently observe an improvement. So I think we need to find a robust solution to this.
@vancura No, 2D projection is still around but is set at the CCCamera level. We might add a CCLayer constructor so that you can do something like new CCLayer(CCCameraProjection proj)
if you think that will make things easier. But either way, we definitely want a fix for the 3D case.
from cocossharp.
@vancura The latest commit (30ce711) has taken a stab at addressing the issue. Please let me know how it goes.
from cocossharp.
@rtabbara: Amazing! It really works! Thanks so much!
from cocossharp.
No problem, glad it works.
from cocossharp.
Related Issues (20)
- NullReferenceException when creating CCSpriteSheet HOT 2
- Does android project build with Visual Studio 2017? HOT 1
- CCLabel is blur when zoom up. HOT 1
- Feature Request
- Missing Xam.Forms/CocosSharpView.cs HOT 2
- CCColor4B(byte,byte,byte) - System.NotImplementedException: The method or operation is not implemented. HOT 1
- Creating CCLabel for the first time on Android takes 10 seconds
- Should I call the dispose for every CCNode object?
- Calling SetTileGID or ExtractTile on CCTileMapLayer causes app to hang
- CocosSharp Templates extension is not compatible with Visual Studio 2017
- Calling RunActionAsync more than once on an object doesn't return
- CCMotionStreak not visible over a CCSprite
- CCTexture2D load from file will alway be CCSurfaceFormat:Color
- Missing library and crash when using 64-bit architecture. HOT 2
- Cannot create object that requires a file or use Cocossharp related functions outside thread that Cocossharp is running on.
- Cocossharp freezes when the applcation returns from sleep. HOT 9
- Memory leak using CCLabel
- Is this project dead? HOT 2
- Unresponsive/blank CocosSharpView when returning from sleep on Android
- Officially deprecate this library, point to SkiaSharp as an alternative
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cocossharp.