Coder Social home page Coder Social logo

Comments (5)

franciscod avatar franciscod commented on April 29, 2024

Hello! A little progress here: https://github.com/franciscod/openage/commit/6b5ab1dc6b03e7c17c5099f8ebd7cb96f03b04d8

As far as I could tell, there is currently no way of saving to a file in the codebase. So, for now the numbering restarts on each run.

Also, when should we create the ~/.openage and ~/.openage/screenshot directories? Should the engine create them as needed on each screenshot, or fail silently?

edit: maybe a ScreenshotManager is too much? 😝

a few screenshots

from openage.

TheJJ avatar TheJJ commented on April 29, 2024

I lol'd at the screenshot πŸ˜„

I'd say a screenshot manager is just fine!
Next idea: You could check what files are there and chose the next free filename, when having many screenshots, this may fail though.
Better idea: Store the screenshot with the timestamp in the filename, openage_2014-10-30_14:18:20_xx.png. As people can take n screenshots per second, we still need a counter πŸ˜‰, but the number of existence checks should probably fall down to 0.

Don't worry about ~/.openage yet, some other subsystem will create it sooner or later, especially when #28 is finished.

from openage.

franciscod avatar franciscod commented on April 29, 2024

lol, lord gaben is praised 🌞

Yeah, I thought about the timestamp in the filename since that's what scrot and minecraft do, but since you stated _xxxx I went on that idea.

Should I also move the screenshot taking code (the SDL masking/copying and finally saving the PNG) to the ScreenshotManager?

from openage.

TheJJ avatar TheJJ commented on April 29, 2024

Yeah, will be a lot more modular that way.

from openage.

franciscod avatar franciscod commented on April 29, 2024

code moved: https://github.com/franciscod/openage/compare/screenshot

from openage.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.