Comments (3)
Procedural generation of ships and having them duke it out sounds awesome. I'd be happy to collaborate on this. I'm also in the process of understanding the code, so for the moment I'm starting with the mission setup part of the program and slowly switching them over to Lua script.
from liberation-circuit.
I don't know anything about Lua, but this sounds like a good idea.
The first part - allowing the game to be started from the command line - shouldn't be too hard. It should be possible to accept command-line input and feed it directly into the custom game setup functions. I don't know anything about accepting or processing command-line input, unfortunately.
The second part - keeping detailed records of the game - might be a bit more complicated. With 60 frames per second and dozens of processes buzzing around, that's a lot of data to keep track of and the game might be complex enough that that kind of quantitative information would be difficult to get anything useful out of. It's an interesting idea, though!
from liberation-circuit.
I don't know anything about Lua, but this sounds like a good idea.
I've been using Lua for over 15 years as my main programming language, happy to help with my accumulated knowledge. ^,^
I don't know anything about accepting or processing command-line input, unfortunately.
For command line arguments, that's the main( int argc, char **argv )
part – an array of strings and how many there are. The hardest problem is usually passing the information around (through multiple layers of init code), not parsing it. Here, it looks like passing argc
/argv
once to init_at_startup
is enough – it can then process that after initializing defaults and reading the init file. (Though maybe a different order may be better, so that when the user is asking for --help
(or /?
), it doesn't even boot allegro and just prints out a list of known options.)
For non-interactive games, one could also read match descriptions from stdin (one line per game), that might save on boot/shutdown times and cut down the number of needed command line options.
The second part - keeping detailed records of the game - might be a bit more complicated. With 60 frames per second and dozens of processes buzzing around […]
When the game is running non-interactively and you only care about the log, it doesn't matter if it's stuttering / lagging. (Unless that affects the game logic, but that would mean it would break on very old / slow computers already. That'd be fixable, though.) If logging is conditional, when disabled the cost should only be a few conditional jumps (that are easy to predict for the CPU because that flag is either constantly on or constantly off). So I don't think this will be a problem.
(Also, I think I read somewhere (manual?) that the user code gets run about 4 times per second per process or something like that? So there's actually only 4 ticks per second that matter to AI (probably), plus events as they occur.)
(Another approach would be to have a completely different mode (maybe even as a separate executable) that doesn't do graphics at all and just writes logs as fast as it can. But that's more work and it may not be necessary…)
from liberation-circuit.
Related Issues (20)
- [Suggestion] Allow more than 9 templates HOT 1
- [Suggestion] More fleshed out debugger HOT 2
- [Suggestion] Adjust size for Retina screen? HOT 7
- should data wells be visible through the fog-of-war? HOT 2
- Small fonts on Hi DPI screens are very hard to read HOT 4
- Add support for system wide installation HOT 9
- Syntax errors for binary operations HOT 4
- Wiki and other questions HOT 5
- Running from an explorer where the selected folder is not locked results in game not correctly detecting it's own root folder HOT 5
- Some GUI issues HOT 11
- Spikes in static unit are never fired HOT 2
- mac build doesn't work HOT 5
- Strategy Guide or Design Tips Needed! HOT 2
- fix indentation HOT 8
- enable mission scripting with LuaJIT
- Feature request: options screen
- Multiple definition of 'vertex_list', 'font', 'mstring', 'tone' HOT 1
- Windows Build Not Starting
- Error when build component breaks HOT 2
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 liberation-circuit.