Jump to content
  • Advertisement

Lode

Member
  • Content Count

    4724
  • Joined

  • Last visited

Community Reputation

1003 Excellent

About Lode

  • Rank
    GDNet+

Personal Information

  • Role
    Programmer
  • Interests
    Programming

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Hi, I'd like to present LogicEmu, a new logic circuit emulator working in the browser: http://lodev.org/logicemu/ It's somewhat different from most logic circuit emulators, because it's cell based and internally with 2D ASCII diagrams, and it comes with a huge ton of circuits prebuilt which can be immediately selected from dropdowns to try out all kinds of cool stuff! How is it related to gamedev? It's an educational game, it's also vaguely like minecraft redstone, and may be useful for developing/testing/verifying such circuitry engines in games. It's open source on github to see how it works. Please let me know any feedback. Suggestions, bugs, overall impressions, critique, ... are all super welcome Thanks!
  2. OffscreenCanvas looks not well supported, only experimental in some browsers. Everything is red here: https://caniuse.com/#feat=offscreencanvas Do you mean this one by off-screen canvas, or does any regular canvas that is not visible work?
  3. What I was avoiding by doing the visibility hidden swapping, was redrawing of the lines. I will try it out with 1 big canvas and redrawing everything per frame (or even only the parts that changed, but that could very well be everything). I just will need to use blitting or copying then I guess, because I also already know the amount of lineTo moveTo etc.. to redraw everything per frame will be too slow. So I hope the copying will be fast.
  4. No screenshot, but I can describe: Imagine a grid of 100x100 tiles (it can be bigger, e.g., 150x400 should also work), forming a diagram. The diagram is a big line drawing formed by those tiles. Each tile has one of a few possible types, but its look depends on the neighbors. Examples: -there could be arrows or lines pointing at any combination of 0 to 8 neighbors --> that alone gives already 3 to the power of 8 combinations -there can be border around the tile, or on any subset of its 4 sides -it might have a special background color -it might have a letter on it So the above gives a combinatory explosion of what a tile could look like. If there were only 100 or so different looks, I would use 100 premade textures. But that's not how it is, the tiles need to be created when loading the map and they could in theory all look slightly different (in practice many may look the same due to regularities in maps but it's hard to guess which before starting to draw them). So for the same reason as 100 premade textures is not possible, I think having a few hidden ones as a buffer is difficult for the same reason. Depending on what happens, it is possible that almost every tile needs to be updated to the other one in a single frame. So each map tile has two possible looks (usually) and the updates per frame is that some change to the other look (and it is currently smart enough to only flip those that changed, but if I would instead go to a different type of rendering where everything is redrawn per frame then that doesn't matter of course) I will try if copying parts of a few pre-made ones existing out of only parts of a tile (like 1 of the 8 arrows, ...) will work, and if that will be fast enough every frame. Thanks for the suggestions! P.S. no matter how horrible it sounds, chrome can do it fast! I only discovered that it can be slow when trying it in firefox
  5. The difficulty is this: Each tile is not a nice predefined bitmap image, but a line drawing that depends on the environment. So I can't really use a set of textures, the texture is created with line drawings on the fly (what a tile looks like depends on neighbors etc..., like there may be connecting lines or arrows to neighbors, so it would be too much textures to have them for every possible combination) beginPath, lineTo and moveTo also seem pretty slow. So I need some fast way to draw the two line drawings of every world tile, and then once I have those I could indeed do the bitBlt. The two different line drawings per tile to toggle to are usually just a color change, but sometimes also a shape change or a letter character change. Any suggestion for how to create, for example, 100x100 such little individual line drawings fast?
  6. Hello, I'm working on a tile based engine in HTML5+canvas. I currently made every single tile in the world its own little canvas. The reason is, I make two canvases per tile, and depending on state display one of the other. This allows fast switching between the two with style.display.visiblity. However, while that actual showing and swapping visibility goes fast, what goes slow is creating them at the start of the game, in Firefox at least. In Chrome, this all goes super fast. In firefox, simply creating a couple of thousand canvases, especially calling getContext('2d') on each of them, goes super slow. Is there any alternative better way to have a 2D tile based engine where each tile can efficiently swap between two different graphics? Thanks!
  7. When I signed up for GDNet+, I subscribed for the webspace at a cool URL (gamedev.net), and also because gamedev helped teach me how to program, which is now my job.
  8. Lode

    Working With Unicode in the Windows API

    According to Wikipedia, UTF-16 is also variable length and thus not necessarily two bytes per glyph: some glyphs are more bytes than two in UTF-16. In the article here is mentioned that the unicode of Windows uses two bytes per glyph. Does it also support the glyphs of UTF-16 with more than two bytes, or does Windows only support the two byte glyphs? There are more than 65536 glyphs in Unicode.
  9. Lode

    Oh teh joy of running an MMORPG

    If I understand this well, the user could find the password because data parts of buffers were filled with old data. Interesting to learn from such mistakes.
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!