blob: a3a4ff318ab97f2f130259ec1a88ea310c122b07 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
|
_ _ ___ ___ _ _ __ __ ____
| |_| | / _ \ / __\ | |/ / \ \ / / | _ \
| _ | | _ | | (__ | < \ \/ / | /
|_| |_| |_| |_| \___/ |_|\_\ \__/ |_|\_\
(everything is better with ascii-art)
hackvr... um. outputs commands to stdout based on keys pressed inside hackvr,
and inputs the same type of commands.
so do some plumbing and get a multiplayer game going?
I'm working on making hackvr work with different output and input types. Right now the only one
that works with everything is hackvr_x11. There's also a hackvr_fb that uses the linux framebuffer,
but it doesn't have mouse support and keyboard support is wonky due to me not thinging it through.
quick start:
You'll need to have the library and headers of libx11 installed for hackvr to build successfully.
Which usually means you will need the dev version of the libx11 (xlib) package for your distro.
To get that on debian:
apt-get install libx11-dev
If you want to build the GLut crap you'll need
freeglut3-dev
Although I haven't touched the non-x11 versions in a long time. Good luck.
Since I first wrote this README, I pushed a couple other libraries I've written into hackvr.
You'll need those too.
libidc (select() wrapper pretty much)
libhashtable (LIBrary for HASH TABLEs.)
You can usually get these libs from the same place you got hackvr.
where to find hackvr:
git://thebackupbox.net/hackvr
git://main.lv/hackvr
https://github.com/kkabrams/hackvr
where to find libidc:
git://thebackupbox.net/libidc
git://main.lv/libidc
https://github.com/kkabrams/libidc
where to find libhashtable:
git://thebackupbox.net/libhashtable
git://main.lv/libhashtable
https://github.com/kkabrams/libhashtable
I have a script that just runs make with PREFIX=$PREFIX prefix=$PREFIX so I end up with
everything installed under ~/.local/
After you have that installed you should be able to do these to get hackvr built:
make #BSD make doesn't do target specific variables. use GNUMake.
export PREFIX=$(HOME)/.local #the Makefiles are short, worth a read.
make install
The make install will create hackvr_headless, hackvr_x11, hackvr_fb.
If you didn't want to make install the libraries, there are variables you can set to
let the makefile know where they are:
LIBIDC_INCLUDE_PATH
LIBIDC_LIB_PATH
LIBHASHTABLE_INCLUDE_PATH
LIBHASHTABLE_LIB_PATH
They should be set to where the .h and .so are, and not a subdir like how $(PREFIX) is set
since the include and lib dirs don't exist inside the libs.
A few helper scripts are written in perl and python.
So you might want to install perl and python if you want to play with them.
They're pretty nifty.
what hackvr can do...
I dunno.
try cd tictactoe ; ./run
or... fiddle with the scripts laying around?
_ _
\O_o/
Red and Blue mode
You'll have to either enable this using a command sent to hackvr's stdin that
I don't even remember, or just enable it in config.h make clean then rebuild.
Be sure to have SPLIT_SCREEN set to 2 while you have RED_AND_BLUE set to 1.
Otherwise you'll just end up with one camera that is red. Three cameras will
draw a third view that is also red. (colors of views are picked by modulo two of
camera number atm)
left eye should have red over it.
right eye should have blue over it.
if your glasses are backwards you can either wear them upside down.
or just flip the value of CAMERA_SEPARATION in config.h before building.
or fiddle with it using the 'p' and 'l' keys while hackvr is running.
|