• Content Count

  • Joined

  • Last visited

About mightymarcus

  • Rank
    Advanced Member
  • Birthday 10/10/1975

Profile Information

  • Gender
  • Location
  • Interests
    coding, game development, retro games, playing guitar, jamming

Contact Methods

  • Twitter

Recent Profile Visitors

1224 profile views
  1. Yes, I will do. I'll try to recreate the problem in the playground and show you exactly what I mean (over the weekend). Thank you.
  2. > But when the game will be popular - chance online 0 player will be very small. That's the reason for the bots. It has to become popular for now. When I play a multiplayer-game and there are no oponents - not even bots - chances are high that I never retry. But when I see: ah, it's a new game and look, there are some players sometimes (replays?). So I'll practice in the meantime and check out the controls, before I play against human oponents. But that are only my thoughts. Maybe I am absolutely wrong.
  3. It's bundled with the Radeon Drivers and is called ReLive. And yes, it's very good. Better as you can see here (Youtube messed the video a little bit up). Last time I recorded the desktop and then I was looking the video. I got to the toilet, came back ... and wtf? Why can't I click? What is wrong here? Uhhh ... it's not the actual desktop. It is the video ...
  4. 2) May be bots? I would do that. You always have to offer a single player option, in my opinion. Should not be too hard to manage. Graphics are nice. And the multiplayer aspect too. Could really be a nice casual game.
  5. I am the Boss! 113 Score in the first round.
  6. Hm. Just for the record: Very small textures and anisotopicFilteringLevel = 1 generally produces screen tearing, when the camera is moving very slow. I made the (non-tiled) background a high constrast, and it can be seen, that it's tearing the same like the tiled foreground.
  7. I have a big problem with screen tearing. Please have a look at the video. I am sorry I can't provide a playground for this (yeah I could maybe), because I am using a port of babylonjs together with the haxe language/compiler. I read much information about the problem in OpenGL forums too, but I did not get a solution. So maybe some 3D WebGL / OpenGL ES Guru knows, how to fix the problem. As you can see in the video, the mesh with the bricks and ladders is flickering and tearing like hell. The mesh is merged together from single meshes (planes) and a sprite atlas is used, so that I can take one material/texture for the whole level-mesh (the foreground). To get the well known sprite art or retro effect, I use Texture.NEAREST_SAMPLINGMODE texture.anisotropicFilteringLevel = 1 texture.wrapU = texture.wrapV = Texture.CLAMP_ADDRESSMODE I tried to adjust the uvs (read about pixels and texels), but I don't get it right. I think that the UVs are not correct and when the camera moves, the drawn texture tile is snapping between two pixels all the time, and that causes the bad tearing effect. But I don't know. Since I am using Babylonjs/Babylonhx, I am asking here for the first place. It's strange too, that it looks like the lines are jumping up and down. And maybe the uvs are right, but the screen tearing is a evil, that comes with the NEAREST_SAMPLINGMODE or the disabled anisotropicFiltering? Btw. I disabled mipmaps too. Hm. It would be easier to just scale the Textures up hm and use another sampling mode? Because now I get it, that not using mipmaps is a bad idea, because I have a little 3D stuff in there, like the sides and the floor. Yeah I know, there is another topic to this topic. But I didn't find the answer there. Yeah, that's great. I think I have the right solution now. Upscaled textures. But to be honest and just to learn how to do it right, is there another way how I can do this? Merging planes with different uvs together and using a very small texture (one tile = 32px) without having artefacts?
  8. Thanks for your different opinions. I decided to not make games as a service, because I am not good enough and because I don't want to because it's too personal for me. It's for me the difference let's say between writing a song out of my heart and writing a song for a cornflakes TV spot. Contract working with web-programming or developing a mobile-app for someone is another story.
  9. General question about gamedev: Do you think it is a good idea to develop a game for somebody who tells you exactly what he wants to have? Somebody asked me to code a game for him, and I would get payed. But I really don't know if this is a good idea. I make games primarily for my own fun and excitement, and for me it is art. A game is no website or some tool somebody wants to have. And even if I were free to do what I want, why should I sell my work instead of trying to sell the game for myself? But maybe if it's just a small advertising game and I could earn some money ... the question is how much? And how much work it is? Even a small game is not done in a week. Do somebody here have some experience with making games as a service? What do you think about it? Would you do that? Or would you rather keep your focus on making your own games and try to publish them? I don't like the idea, but I could need some money. As I think the man is not really a gamedev hero, I expect that I should make a flappy bird clone, match 3 clone, simple platformer with collecting coins or something like that. And he wants that for mobile (android). Thanks for your thoughts.
  10. I have a simple question about culling of meshes to find out whats the best strategy to keep the performance high. What is the better approach: 1. merge static meshes to a single terrain-mesh. I guess the culling doesn't cull triangles but the whole mesh. So a part of the big terrain-mesh is always on screen, this means that the complete terrain-mesh will always be drawn, even if we see just a small part of the mesh, right? There isn't something like faces culling? 2. merge static meshes to multiple terrain-meshes. This way the amount of drawcalls is reduced too, but only the parts of the terrain are drawn that are on screen. E.g. I split up the terrain into 4 - 8 single meshes. I guess it's 2. Can someone enlighten me? I make a game with a top down view, where the player can see just only a small part of the terrain at once, so I don't want the whole geometry to be drawn in every frame. I am attaching terrain and decorations like trees and some other stuff to a single mesh and wonder if that's a overkill, if the mesh gets a high vertices count and will always be drawn completely. Thanks.
  11. Oh man oh man. I'm such a noob. And is was so easy ... After drawing the text I had to GL.bindTexture the texture that was bound before I bount the sprite sheet. I thought BJS would do this in every render call itself. That was all ... Now I only have to find out what textureID was bound before the text drawing ...
  12. Look at this. FakeTexture is almost empty, I deleted almost the entire code an there is no image loaded. But with that it works. That's the ugliest "workaround" of all time I think.. public static function update() { for (props in _textsToDraw) { // :( var texture = new FakeTexture("ugly", Engine3D.fakeScene); texture.dispose(); var instance:TextRenderer = props.instance; instance._drawText(cast props.text, cast props.posX, cast props.posY); } _textsToDraw.splice(0, _textsToDraw.length); }
  13. I am very new to OpenGL and to get into it I started coding a little GUI on top of BJS. Before the scene.render() I draw some textured triangles (a spritesheet with a font) to a framebuffer object that is connected to a BJS-Texture which I use on a regular BJS Plane Mesh. It all works as desired, when I draw to the texture before the first scene.render() call. But when I want to update the text (drawing again to the texture) on the next scene.render() call it gives me: There is no texture bound to the unit 0. The strange thing is, when I create a new Texture that is not connected to anything, just creating it, it works. And it has to be a texture that was not loaded before (is not in the cache). public static function update() { for (props in _textsToDraw) { var texture = new Texture("textures/" + _textures[_texturenum], Gfx.scene); var instance:TextRenderer = props.instance; instance._drawText(cast props.text, cast props.posX, cast props.posY); _texturenum++; } _textsToDraw.splice(0, _textsToDraw.length); } So I think on the scene.render() function it happens something like that the texture with the font is overriden or is changing somehow. I really can't tell. Because I am just starting with OpenGL/WebGL I have not really the idea of changing states and what exactly happens "inside" BJS. Maybe someone can give me a pointer how I could solve this problem with the "disappearing" texture. Once again what happens: 1. Drawing to the framebuffer that is connected to the BJs Texture. 2. first scene.render(); call OK. The texture is updated with the text. 3. Drawing to the framebuffer again 4. scene.render() There is no texture bound to the unit 0 (it has to be the font texture, becaus when I just draw the background which has no texture it works) But doing 1. Drawing to the framebuffer that is connected to the BJs Texture. 2. first scene.render(); call OK. The texture is updated with the text. 3. creating a temporary BJS Texture before drawing to the framebuffer 4. scene.render() 5. It is working ... This is the relevant code that renders the buffers.. function _render() { GL.enable(GL.BLEND); GL.blendFunc(GL.SRC_ALPHA, GL.ONE_MINUS_SRC_ALPHA); GL.viewport(0, 0, 512, 512); GL.clearColor(0.0, 0.0, 0.0, 1.0); GL.colorMask(true, true, true, true); GL.disable(GL.DEPTH_TEST); GL.disable(GL.CULL_FACE); GL.clear(GL.COLOR_BUFFER_BIT); //GL.blendEquation(GL.FUNC_ADD); GL.bindFramebuffer(GL.FRAMEBUFFER, _textureFramebuffer); _drawBackground(); _drawContent(); GL.bindFramebuffer(GL.FRAMEBUFFER, null); GL.useProgram(null); GL.enable(GL.DEPTH_TEST); GL.enable(GL.CULL_FACE); } function _drawContent() { GL.useProgram(_textContentProgram); var matrix = Matrix4.createOrtho(0, 512, 512, 0, -1000, 1000); GL.uniformMatrix4fv(_textContentMatrixUniform, false, matrix); GL.uniform4fv(_textContentTextColorUniform, new Float32Array([_textColor.r, _textColor.g, _textColor.b, _textColor.a])); GL.activeTexture(GL.TEXTURE0); GL.bindTexture (GL.TEXTURE_2D, _fontTexture); GL.bindBuffer(GL.ARRAY_BUFFER, _contentVertexBuffer); GL.enableVertexAttribArray(_textContentVertexAttr); GL.enableVertexAttribArray(_textContentTextureAttr); GL.vertexAttribPointer (_textContentVertexAttr, 3, GL.FLOAT, false, 5 * Float32Array.BYTES_PER_ELEMENT, 0); GL.vertexAttribPointer (_textContentTextureAttr, 2, GL.FLOAT, false, 5 * Float32Array.BYTES_PER_ELEMENT, 3 * Float32Array.BYTES_PER_ELEMENT); GL.drawArrays(GL.TRIANGLES, 0, _numVertices); GL.disableVertexAttribArray(_textContentVertexAttr); GL.disableVertexAttribArray(_textContentTextureAttr); //GL.activeTexture(GL.TEXTURE0 ); GL.bindTexture(GL.TEXTURE_2D, null); }
  14. I've always wondered why all the textures are upside down. Since I'm quite new to 3D stuff and OpenGL/WebGL I thought this is expected behaviour of OpenGL. And I read it is. Hm.