Comments (8)
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 ifdefinclude/ace/sdl/[sdlIncludeFiles]
- ditto.
from ace.
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.
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.
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.
Many platforms have no support for palette graphics at all. They have to be implemented with shaders or slow emulation code.
from ace.
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.
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
andsrc/ace/common/managers/key.c
GLOBbed bycommon
andamiga
- for sdl it will be
src/ace/sdl/managers/key.c
andsrc/ace/common/managers/key.c
. GLOBbed bycommon
andsdl
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.
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)
- CDTV interrupt 2 issue HOT 4
- Wrong tag in simplebuffer? HOT 8
- Tilebuffer may benefit from a cache HOT 1
- VBR code is dangerous on CPU with data cache HOT 1
- need documentation / doxygen HOT 13
- Logging to file doesn't work anymore
- Add official support for building libace.a
- Rework blitter functions arguments HOT 3
- How to handle extra functionality? HOT 9
- Add DutchRetroGuy's audio mixer integration
- font_conv not converting some chars correctly HOT 1
- font_conv vector size issue HOT 1
- Add ACE-specific assert implementation HOT 1
- Optimize font-drawing
- Error building Tools on Linux HOT 5
- Building the Tools on Kubuntu Part 2 HOT 3
- Add support for 4bpp sprites HOT 1
- autotools build help, not finding a library containing viewCreate HOT 3
- cmake windows error CMAKE_ASM_COMPILER is not a full path to an existing compiler tool HOT 3
- static builds of ACE ignore its build flags HOT 1
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 ace.