Compare commits
8 Commits
Author | SHA1 | Date |
---|---|---|
Dan Ballard | bed5abd516 | |
Dan Ballard | 1225f74d5e | |
Dan Ballard | bd956d3f70 | |
Dan Ballard | 0eb076b6ae | |
Dan Ballard | ecc21c65a6 | |
Dan Ballard | 9ada3c27c4 | |
Dan Ballard | da55695e13 | |
Dan Ballard | fc4d2559fa |
|
@ -0,0 +1,20 @@
|
|||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2011 Dan Ballard
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
this software and associated documentation files (the "Software"), to deal in
|
||||
the Software without restriction, including without limitation the rights to
|
||||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
@ -0,0 +1,30 @@
|
|||
flight-sim is a simple space flight simulator written in Lisp (tested only in SBCL) with cl-opengl and sdl.
|
||||
Right now it's mostly still in tech demo stage
|
||||
|
||||
So far the controls are simple.
|
||||
|
||||
A - Forward acceleration
|
||||
|
||||
Requires:
|
||||
ASDF
|
||||
cl-opengl
|
||||
cl-glu
|
||||
lispbuilder-sdl
|
||||
|
||||
To try:
|
||||
$ sh run.sh
|
||||
|
||||
# Media
|
||||
|
||||
Youtube video:
|
||||
|
||||
<https://www.youtube.com/watch?v=8Y6zutbYWvg>
|
||||
|
||||
The ship sitting in space with a field of diamonds:
|
||||
|
||||
![The ship sitting in space with a field of diamonds](https://raw.github.com/dballard/flight-sim/master/img/screenshot01.png "The ship sitting in space with a field of diamonds")
|
||||
|
||||
The ship firing its main thruster:
|
||||
|
||||
![The ship firing its main thruster](https://raw.github.com/dballard/flight-sim/master/img/screenshot02.png "The ship firing its main thruster")
|
||||
|
|
@ -153,15 +153,15 @@
|
|||
|
||||
(defun populate-world ()
|
||||
(setf *world*
|
||||
(make-array 101 :initial-contents
|
||||
(loop for i from 0 to 100 collecting
|
||||
(make-array 201 :initial-contents
|
||||
(loop for i from 0 to 200 collecting
|
||||
(let ((e (make-instance 'game-object
|
||||
:model (make-instance 'model
|
||||
:vertices (vertices *diamond-model*)
|
||||
:faces (faces *diamond-model*))
|
||||
|
||||
:body (make-instance 'body
|
||||
:coords (vector (- (random 75) 37) (- (random 75) 37) (- (random 200) ))
|
||||
:coords (vector (- (random 75) 37) (- (random 75) 37) (- (random 400) ))
|
||||
:angles (vector (random 360) (random 360) (random 360))))))
|
||||
(setf (colors (model e)) (make-2d-array 3 3 `((,(random 255) ,(random 255) ,(random 255)) (,(random 255) ,(random 255) ,(random 255)) (,(random 255) ,(random 255) ,(random 255)))))
|
||||
(setf (face-colors (model e)) (make-2d-array 8 3 '((0 1 1) (0 1 1) (0 1 1) (0 1 1) (1 2 1) (1 2 1) (1 2 1) (1 2 1))))
|
||||
|
@ -229,4 +229,4 @@
|
|||
#+(and sbcl (not sb-thread)) (restartable
|
||||
(sb-sys:serve-all-events 0))
|
||||
(restartable (sim-step))))))
|
||||
;(draw)))))
|
||||
;(draw)))))
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 14 KiB |
Binary file not shown.
After Width: | Height: | Size: 14 KiB |
Loading…
Reference in New Issue