GithubHelp home page GithubHelp logo

Comments (8)

tehKaiN avatar tehKaiN commented on August 27, 2024

Okay, let's assume we're talking about Ami & SDL targets. Look at keyboard processing.

Most functions are multiplatform, 'cuz whole logic is done by ACE. There is only one function which is platform dependent - processing. So we could implement both versions in one file using ifdef (having huge mess from ifdefed includes I guess), or create separate files for this one function - one for Ami, one for SDL.

If having such small and multiple files is not a problem then let's think about file structure. Where should platform-depenedent implementation be stored?

  • src/ace/managers/key_platformName.c
  • src/ace/managers/platformName/key.c
  • src/ace/platformName/managers/key.c

I guess third option is best with addition of "common" platform.

Including .h should be done without platform dir, so they will look the same as right now. However, headers may differ between platforms, so there is a need to store them in platform-dependent way too. So here appears this mess, which doesn't really look good but it would work:

  • include/ace/[baseIncludeFiles]
  • include/ace/amiga/[amiIncludeFiles] - included by baseIncludeFiles with platform ifdef
  • include/ace/sdl/[sdlIncludeFiles] - ditto.

from ace.

tehKaiN avatar tehKaiN commented on August 27, 2024

I'll write it down so it won't be omitted during dev. For coding game servers, there is need for headless target, which doesn't have any of gfx/audio/input stuff - I guess it will only use common stuff.

from ace.

SamuraiCrow avatar SamuraiCrow commented on August 27, 2024

All the low-level stuff is hardware specific anyway. To make it cross-platform or even support RTG would need a higher level engine on top of it.

from ace.

tehKaiN avatar tehKaiN commented on August 27, 2024

I'm rather thinking that other platforms should work on a subset of ACE, e.g. no copper, no sprites. So having a multiplatform code would require to write chipset-heavy ACE code and portable one (simple buffer, blitter and nothing else).

from ace.

SamuraiCrow avatar SamuraiCrow commented on August 27, 2024

Many platforms have no support for palette graphics at all. They have to be implemented with shaders or slow emulation code.

from ace.

tehKaiN avatar tehKaiN commented on August 27, 2024

I don't know how to exactly solve palette problem on other platforms yet. I think it'll become clearer when time comes to do first game port. I'm a bit of a shader guy, so I'm not afraid of writing it that way. Perhaps most games could get away with conditionally-enabled code which wouldn't use palette stuff at all, just plain blits. That's also what I meant when specifying that ports would have to use subset of ACE - I just don't know where the line will be drawn.

from ace.

tehKaiN avatar tehKaiN commented on August 27, 2024

Regarding paths, the most feasible option is src/ace/platformName/managers/key.c since it allows for easily wildcarding .c files for building:

  • for Amiga it will be src/ace/amiga/managers/key.c and src/ace/common/managers/key.c GLOBbed by common and amiga
  • for sdl it will be src/ace/sdl/managers/key.c and src/ace/common/managers/key.c. GLOBbed by common and sdl

Also I'm assigning it higher priority since Project R3D is about to release their Bridge Strike on other platforms and I don't like to fall behind in competition. ;)

from ace.

tehKaiN avatar tehKaiN commented on August 27, 2024

There is a work-in-progress SDL port, which aims to be a second-class citizen in ACE's codebase. It's experimental, very incomplete, and the first working merged part will completely lack copper emulation as well as other hardware emulation-related features. It's aimed to port https://github.com/Last-Minute-Creations/chaosArena without drastic changes, since that's most probably the simplest complete ACE game. Then ports of more complex stuff will follow: https://github.com/approxit/impsbru, https://github.com/Last-Minute-Creations/germz, https://github.com/Last-Minute-Creations/AMIner .

from ace.

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.