Coder Social home page Coder Social logo

dmap's Introduction

the Princess Japanoise

  • Special interest: text editors
  • Pronouns: she/her
  • Here for: hacking on text editors, not porting things to Rust, pretending to be a unix trendy hipster by checking in my dotfiles
  • Tools of the trade:
    • GNU Emacs, the world's best text editor
    • Gomacs or emsys, not the world's best text editor but good enough to replace the editor of the beast
    • zsh, the better shell (yes it's better than fish, no I will not elaborate)
    • My personal configurations, a wretched hive of scum and villainy
    • btw linux
    • msys2 (when I'm forced to use windoze)
    • iterm2 and a stiff drink (when I'm forced to use Mac OS OSX MacOS)
  • Work status: employed as a software developer
  • Contact me if:
    • You are interested in speaking to me about an employment opportunity
    • You are interested in helping me maintain one of my repositories (especially Gomacs)
    • (If you are LGBTQ+) You want to contribute and need a mentor with industry experience
    • You have a question about Golang, Shell, or text editors that you think I can answer (don't ask to ask, just ask)
    • You have discovered a serious security vulnerability in my setup or repositories (rewards negotiable)
    • You want to give me constructive feedback on one of my repositories
    • You think I seem cool and want to be friends
  • Do not contact me if:
    • You want to bikeshed one of my repositiories
    • You want me to debate you
    • You want to scold me
    • You want to complain unproductively (if you have an issue with one of my repositories, file a ticket or make a PR)
    • You are in crisis - I'm sorry, but I am not a crisis counselor and most likely cannot help you, please call a hotline or speak to someone you trust
    • Your message is about cryptocurrency, NFTs, or blockchains

I am elsewhere on the web:

My name comes from the Japanese Harsh Noise "Music" Scene; I am not Japanese. If that sounds interesting to you, check out (headphone warning):

Language knowledge

Professional experience:

  • Go
  • Python
  • Perl
  • Java
  • Groovy
  • Shell (bash, sh, etc)

Languages I can do anything in:

  • Go
  • Shell

Languages I know very well:

  • Java
  • C
  • Perl
  • Python

Languages I know but don't actively use ATM:

  • Forth
  • Scheme
  • Erlang
  • C++
  • Javascript
  • Groovy
  • asm, flavors:
    • gbz80
    • x86

Languages I have played with:

  • Crystal
  • J
  • Haskell
  • OCaml
  • Standard ML
  • BASIC
  • VB
  • 6502 asm

dmap's People

Stargazers

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

Watchers

 avatar

Forkers

randomcrab

dmap's Issues

All points stay at max rank (apart from single goal point)

I'm relatively new to golang (specially interfaces) I've gotten quite far in implementing this package into my roguelike, after calling Calc(g.Levels.Dungeons[g.Levels.Depth].SDown (creating a point at the stair down position. All points on the Dmap stay at max rank (65525) and only the stair down position is set to 0. Rather than ranked by distance like in this article http://www.roguebasin.com/index.php?title=Dijkstra_Maps_Visualized#--_The_basics_--

Some help would be really appreciated as I'm using this implementation for my thesis. I'll try to provide sufficient amount of my code below

// My interface implementation
func (l Level) SizeX() int {
	return l.W
}

func (l Level) SizeY() int {
	return l.H
}

func (l Level) IsPassable(x, y int) bool {
	if l.Cells[x][y].Terrain == 0 {
		return true
	} else {
		return false
	}
}

func (l Level) OOB(x, y int) bool {
	if x >= 0 && y >= 0 {
		if x <= l.W && y <= l.H {
			return true
		}
	}
	return false
}
//Initialise DMap
func (g *game) initDMap() {
	d := BlankDMap(g.Levels.Dungeons[g.Levels.Depth], ManhattanNeighbours)
	d.Calc(g.Levels.Dungeons[g.Levels.Depth].SDown)
	g.Player.DMap = d
}

Do I need to Recalc every time the player moves? How can i draw a passable path from the player to the goal point?

Thanks in advance.

EDIT: Thought I should include my GetXY implementation

type position struct {
	X, Y  int
	point Point
}

func (p position) GetXY() (int,int) {
	return p.X, p.Y
}

position is the struct that my goals represent

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.