Giter Site home page Giter Site logo

davexunit / guile-2d Goto Github PK

View Code? Open in Web Editor NEW
67.0 67.0 8.0 2.23 MB

2D game programming library for GNU Guile - *OBSOLETE - try my new library named Chickadee*

Home Page: https://dthompson.us/projects/chickadee.html

License: GNU Lesser General Public License v3.0

Scheme 99.69% Shell 0.31%

guile-2d's People

Contributors

davexunit avatar xodene avatar zan-xhipe avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

guile-2d's Issues

file 2d/gl.scm missing

when trying to install make is giving this error
make: *** No rule to make target '2d/gl.go', needed by 'all-am'. Stop.

there is no 2d/gl.scm
there is however a 2d/wrappers/gl.scm

The example in Readme doesn't work

when trying to run the simple example provided in the readme I get the following error

;;; /home/zan-xhipe/build/guile-2d/examples/square-man.scm:22:21: warning: datum (quote escape) cannot be meaningfully compared using eqv?' in clause ((any-equal? key (quote escape) (quote q)) (close-window) (quit)) of case expression (case key ((any-equal? key (quote escape) (quote q)) (close-window) (quit))) ;;; /home/zan-xhipe/build/guile-2d/examples/square-man.scm:22:29: warning: datum (quote q) cannot be meaningfully compared usingeqv?' in clause ((any-equal? key (quote escape) (quote q)) (close-window) (quit)) of case expression (case key ((any-equal? key (quote escape) (quote q)) (close-window) (quit)))
Backtrace:
In ice-9/boot-9.scm:
157: 9 [catch #t #<catch-closure 9ee1370> ...]
In unknown file:
?: 8 [apply-smob/1 #<catch-closure 9ee1370>]
In ice-9/boot-9.scm:
63: 7 [call-with-prompt prompt0 ...]
In ice-9/eval.scm:
432: 6 [eval # #]
In ice-9/boot-9.scm:
2320: 5 [save-module-excursion #<procedure 9efadc0 at ice-9/boot-9.scm:3961:3 ()>]
3968: 4 [#<procedure 9efadc0 at ice-9/boot-9.scm:3961:3 ()>]
1645: 3 [%start-stack load-stack ...]
1650: 2 [#<procedure 9efedc8 ()>]
In unknown file:
?: 1 [primitive-load "/home/zan-xhipe/build/guile-2d/examples/square-man.scm"]
?: 0 [add-hook! # #<procedure a5ea0c0 at ice-9/eval.scm:416:20 (a)> #]

ERROR: In procedure add-hook!:
ERROR: In procedure add-hook!: Wrong type argument in position 2: #<procedure a5ea0c0 at ice-9/eval.scm:416:20 (a)>

Need collision detection and response system

Most games require some form of collision detection. I would like to propose a system similar to what I have in https://github.com/blob626/square-man.

At the moment it uses a grid for spatial partitioning. This could easily be changed. It supports handling the start of a collision, a continuing collision, and the end of a collision. At the moment it just uses the sprite's size to check for collision. (I didn't notice rect.scm until today. I'm going to change square-mans collisions to bounding boxes now)

I would be happy to work on this if you think its needed, but I'm just not sure how the user should interact with the collision system. Ideally they should just define the collision response handler, and give that to the scene. At the moment though they also need to define dimensions for the grid, how to get objects that can collide, and how to get objects sprites. Some of this will probably fall away once there is a scene graph and/or if a different spatial partitioning is used. (but grid is easy and for the type of game square-man is going to be, good enough)

Sprite batch draws parts of other sprites

when trying to draw sprites using with-sprite-batch I get strange issues were it seems to draw parts of other sprite.

(define (render)
  (with-sprite-batch
   *batch*
   (for-each
    (lambda (sprite) (draw-entity sprite))
    (append (list *player*)
        *bullets*
        *enemies*))))

'bullets' is a list that the bullets are added to when they are fired
'enemies' is a list that enemies get added to when they are spawned

full code can be found at https://github.com/blob626/square-man/tree/sprite-batch

I have three different textures, bullet.png (form the examples), player.png (64x64 yellow square), and enemy.png (64x64 red square).

when shooting bullets the bullet sprite appears but it sees to be above a portion of player sprite, so its aa yellow square the size of the bullet sprite with the bullet sprite on top of it. these little yellow squares move with the bullet but sometuimes seem to stay in one place. after a while. only some shots will have this effect, others will appear as expected.

The enemy move across the screen from right to left, it sees to be shadowed by some player sprite, if an enemy has been spawned all the squares made by the bullets will become red and any further bullets fired will be red with the same yellow shadow as the enemy.

sprite-batch-bug01
sprite-batch-bug02
sprite-batch-bug03

This is probably because the number of sprites changes as you shoot and spawn enemies, so either I shouldn't be allowed to do that, in which case something should be said about it. If so then is there a suggestion for a better way to do (adding sprites dynamically, such as shooting and spawning enemies)

Segfaut in ftglSetFontFaceSize

FTGL warning: NULL pointer in ftglSetFontFaceSize Segmentation fault

Possible cause:

(define (fps-text) (make-textbox (load-font "fonts/Boxy-Bold.tff" 48) "noice stuff" (vector2 15 15) white 'left 200))

Dependencies installation docs are missing

I've tried to run examples but my complete lack of experience with guile prevented me from installing the dependencies (guile-sdl and guile-figl).

Can I have an example or a link to the manual?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.