how to add controls for a game using batch files? - batch-file

I am attempting to make a platform game using batch files. I know this seems like a waste of time and there are better tools out there but I just wanted try it out. How do you set up controls so my character moves, jump, gravity and collision? Here's a link to a vid that shows a platform game made in batch file: http://www.youtube.com/watch?v=O_Egqa0Gqhc

You could start with reading Batch Minesweeper and pacman to learn a bit about batch gaming.
But to handle the arrow keys you need always an external program, as choice can't handle them.
With choice you could use "normal" letters, so you could use ASDW to move instead of the arrow keys, but choice is not available in XP.
And you should know how to start and communicate between multiple batch processes.

What you can do is try useing the bscript engine that way you will already the stuff that you need to make ur game but, consider the manual is extreme not like hugh extreme ment a bit confusing and take time to settle . Considering theyre trying to make the engine very fliud in batch script which is hugh lol

Related

Implementing a simple code in Microsemis Soft Console

I would like to get into the field of FPGAs a bit. I currently have a PolarFire Everest Dev Board and would like to try something small on it for testing purposes. My current level is very low, i.e. complete beginner. My first working project was a counter that counts binary to 15 and outputs it via the LEDs of the board. Now I wanted to play with RISC-V. Unfortunately I can't find anything on the internet that meets my expectations and almost nothing is "beginner friendly". My current goal is actually just to implement something on the level of a Hello World program in C via the SoftConsole. Unfortunately I have no idea how to go about it. Can anyone help me or recommend a good entry on the internet? Most of the stuff is either unusable, requires licenses I can't get, or is simply no longer available (which happens to me quite often with PDFs from Microsemi).
Since I don't really know what I could do with it to start with, I don't have any code yet that I would like to include. The plan would actually be to create something where I also get feedback via the board that something has been done. Later when I have more understanding SRAMs should be managed with it.

How to program NAO robot in python using the DCM module

I'm working with the NAO robot on generating walkings.
I have used the function angleInterpolation() and it worked well for offline trajectories, but now I need to use the dcm module to send the joints trajectories in real time but when I do it it's like the movement of the joints is very rigid (very different from angleInterpolation). Has anyone worked in NAO robot, specifically with the dcm module that could help me?
I'm programming in python.
(Sorry for my bad English).
I have try using dcm.setAlias() and a time delay to do it.
The movement are more rigid because angleInterpolation() generate splines, while dcm handle direct position (=>linear). If it's what you need, you need to modify your order to damp start and stop.
Btw working with dcm is more dangerous, as there's less protections. Another alternative is using ALMotion.setAngles functions family.

how to get added content of a file since last modification

I'm working on a project in golang that needs to index recently added file content (using framework called bleve), and I'm looking for a solution to get content of a file since last modification. My current work-around is to record the last indexed position of each file, and during indexing process later on I only retrieve file content starting from the previous recorded position.
So I wonder if there's any library or built-in functionality for this? (doesn't need to be restricted to go, any language could work)
I'll really appreciate it if anyone has a better idea than my work-around as well!
Thanks
It depends on how the files change.
If the files are append-only, then you only need to record the last offset where you stopped indexing, and start from there.
If the changes can happen anywhere, and the changes are mostly replacing old bytes with new bytes (like changing pixels of an image), then perhaps you can consider computing checksum for small chucks, and only index those chunks that has different checksums.
You can check out crypto package in Go standard library for computing hashes.
If the changes are line insertion/deletion to text files (like changes to source code), then maybe a diff algorithm can help you find the differences. Something like https://github.com/octavore/delta.
If you're running in a Unix-like system, you could just use tail. If you specify to follow the file, the process will keep waiting after reaching end of file. You can invoke this in your program with os/exec and pipe the Stdout to your program. Your program can then read from it periodically or with blocking.
The only way I can think of to do this natively in Go is like how you described. There's also a library that tries to emulate tail in Go here: https://github.com/hpcloud/tail

How to continually hold a keyboard key or mouse key using at least batch files?

In my fascination of the knowledge i learned about jscript (see here and here and here) to press keyboard keys and mouse keys within a batch file. However i want to take this to a more practical application.
There are certain games, such as minecraft, that require constant feedback that a button is being pressed. With the current links i provided, there does not seem to be any way of having the buttons pressed down for an extended period of time as to simulate movement or something within a game.
I get that it would be easier to install software to do this automatically but at the same time it is much more efficient to manipulate what is already installed on ones computers as it saves a significant amount of memory and processing power when compared to getting additional software. I do not care what language or how deep the programming must go, all i ask is that i can easily manipulate it through batch files like i could do with the SendKeys method in jscript.
Dug this out of the grave recently...
http://www.vbforums.com/showthread.php?705791-SendKeys-Hold-Down-a-Key
Here, users are using a VB script to hold a key down. However i do not have the time to verse myself in this yet, nor how to properly manipulate it into a batch script
ARG, its for html pages. JavaScript also follows suite with keydown,keypress,and keyup responses to handle user input, but never actually get the thing to be imitated on the local system. If only the games I want to play (tf2 in this case) could handle an environment in Linux then I could use xdotool. In this case I may just give up and revert to using a program that can do this faster than I can. If that's the case, can anyone give me some pointers? I know of autolt and hotkeys, but can they do what I desire?

Change soundcard sample rate from command prompt (or macro)

I have a situation where I often need to change the sample rate of my sound card. I need to be able to do this quickly. Now I have to go in to the soundcard settings and then the Advanced tab and switch.
My first idea was to write a C# or C++ program to do this, but I want to see if there are any simpler way to do this.
Is is possible to do this via the command prompt (and then put it in a bat-file)?
Or could I map a macro to do this?
If the steps you have to perform are always the same* and you don't find any other more elegant solution, you could automate the clicking/typing tasks with AutoHotkey: http://www.autohotkey.com/
* Dynamic content like InputBoxes for the SampleRate are easily possible.

Resources