Coder Social home page Coder Social logo

ebiten.org's Introduction

ebiten.org

This repository manages the old website ebiten.org. All the pages redirect to the new sites ebitengine.org.

Generating

Edit HTML files under contents and run:

go run gen.go

Test on your local machine

go run server.go ./_site

Validate your changes by opening http://127.0.0.1:8000.

ebiten.org's People

Contributors

antoniomo avatar cia-rana avatar dependabot[bot] avatar hajimehoshi avatar jacobsalmela avatar jmingtan avatar kisunji avatar majorika avatar miniscruff avatar selfmadesystem avatar sionleroux avatar tadd avatar themowski avatar yeoji 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

ebiten.org's Issues

Update Wasm

Some FPS drops were pointed out:

https://dstoiko.github.io/posts/go-pong-wasm/

So I checked the examples on the website and noticed the same frame drops especially when maintaining a key pressed on the keyboard. It’s not a critical issue but needs to be investigated further… Maybe in another post when I get some time to debug!

but hajimehoshi/ebiten#1175 should improve the situation.

Dual monitor setups on Windows with different windows scaling

When you're running an app produced on windows when you have 2 different scaling options the game resizes based on what the active window is rather than what desktop it's on.

image

image

2021-10-09.10-47-25.mp4

See video.. All I'm doing is switching window (not ebiten related either). Between display 1 and 2.

It seems it's basing it's internal scaling based on what the active window is. I don't often program using windows api so I can't tell you what the solution is. But some testing with another app shows that: https://docs.microsoft.com/en-us/windows/win32/winmsg/wm-windowposchanged is triggered with SWP_NOSIZE when I move a window between the two. (But not my field.)

Left boundary line is not drawn

I tried to draw a border. But the left line doesn't want to be drawn:) I think it's a bug.

package main

import (
	"github.com/hajimehoshi/ebiten/v2"
	"github.com/hajimehoshi/ebiten/v2/ebitenutil"
	"image/color"
	"log"
)

const screenWidth = 1024
const screenHeight = 768

type Game struct {
}

func (g *Game) Update() error {
	return nil
}

func (g *Game) Draw(screen *ebiten.Image) {
	leftX := float64(screen.Bounds().Min.X)
	rightX := float64(screen.Bounds().Max.X)
	topY := float64(screen.Bounds().Min.Y)
	bottomY := float64(screen.Bounds().Max.Y)

	ebitenutil.DrawLine(screen, leftX, topY, leftX, bottomY, color.White) //Left - is not drawn

	ebitenutil.DrawLine(screen, leftX, topY, rightX, topY, color.White)       //Top
	ebitenutil.DrawLine(screen, rightX, topY, rightX, bottomY, color.White)   //Right
	ebitenutil.DrawLine(screen, rightX, bottomY, leftX, bottomY, color.White) //Bottom
}

func (g *Game) Layout(outsideWidth, outsideHeight int) (int, int) {
	return screenWidth, screenHeight
}

func main() {
	ebiten.SetWindowSize(screenWidth, screenHeight)
	ebiten.SetWindowTitle("Hello, World!")
	if err := ebiten.RunGame(&Game{}); err != nil {
		log.Fatal(err)
	}
}

Add message about first compilation time

From the installation page:

go run -tags=example ./examples/rotate

The command is very long and at start i though there was some problem because nothing happened. Maybe we can add a warning about this, something like "As the first compiling takes a little long time, you may wait a while." or similar.

Install instructions don't work

https://ebiten.org/documents/install.html

Following the instructions on this page using go1.16 windows/amd64 to install Ebiten doesn't work.
Trying to execute the following command
go run -tags=example github.com/hajimehoshi/ebiten/v2/examples/rotate

Yields the following result:

no required module provides package github.com/hajimehoshi/ebiten/v2/examples/rotate; to add it:
        go get github.com/hajimehoshi/ebiten/v2/examples/rotate

Attempting to perform the command as instructed then yields this result:

go get github.com/hajimehoshi/ebiten/v2/examples/rotate 
go: downloading github.com/hajimehoshi/ebiten v1.12.9
go: downloading github.com/hajimehoshi/ebiten/v2 v2.0.6
go: downloading golang.org/x/sys v0.0.0-20201009025420-dfb3f7c4e634
go: downloading golang.org/x/mobile v0.0.0-20210208171126-f462b3930c8f
go: downloading github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200707082815-5321531c36a2
go: downloading golang.org/x/exp v0.0.0-20190731235908-ec7cb31e5a56
go: downloading golang.org/x/image v0.0.0-20200927104501-e162460cd6b5
github.com/hajimehoshi/ebiten/v2/examples/rotate: no Go source files
package github.com/hajimehoshi/ebiten/v2/examples/rotate: build constraints exclude all Go files in C:\Users\someo\go\pkg\mod\github.com\hajimehoshi\ebiten\[email protected]\examples\rotate

Use %GOPATH% environment variable instead of %HOME%\Go

See the 2nd https://ebiten.org/install.html#Option_2:_Without_Go_modules

%HOME% is not an official Windows environment variable (you likely meant %USERPROFILE%).

However, using %GOPATH% is more foolproof, since not everyone has their Go workspace in their user's home directory (like me). Strangely enough, %GOPATH% was automatically created after (clean) installing go1.12.3. I just had to need to change its value to point to the right directory after installation.

Oh, and the id-attributes of the page's h3 aren't unique, which is kinda sad when someone wants to link to a separate section of the page.

(First ever issue, delete if wrong place) Tiling system changes after 1.12 update

https://ebiten.org/documents/1.12.html

Regarding the page above, I understand that rotation can affect the borders between tiles when using SubImage(). However, I am importing PNGs directly to use in tiling, with no spaces around each tile's pixels on each PNG.

Before updating to 1.12, the tiles are flush against one another (I have a simple function set that places them adjacently). After updating, the tiles in my scene appear to have small gaps, making the (black) background visible between them.

I can continue to debug what's going on here, but believe that the back-end updates to 1.12 before they're sent to the GPU are causing this behavior change.

This problem may well be PEBKAC, and I could be misunderstanding some element of vector math etc. However, to reproduce this, all I have to do is change the import from 1.11.x to 1.12.x.

If there is any advice/a particular place for me to look in order to update my code and therefore be able to update the version number, I'd love to hear any and all advice! Thank you very much :)

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.