emoose / openhotel

some node.js/socket.io javascript tile thing
Other
5 stars 6 forks source link

any file in /public can be requested via http, all js files are stored l... #18

Open infoburp opened 10 years ago

infoburp commented 10 years ago

...ocally now

breaks commented 10 years ago

Wow, large pull request, testing on my end and looks good (going to miss livechan though).

Chat seems to keep extending without making a scrollbar: openhotel-chat

infoburp commented 10 years ago

I'll have a look at fixing this today (thanks for testing)...

infoburp commented 10 years ago

screenshot from 2014-06-21 11 45 28

Overflow now with scroll bar - thanks for the bug report!

infoburp commented 10 years ago

I'm getting an intermittent bug where only the player is drawn, not the other players/bots..

I hate debugging, someone help!

infoburp commented 10 years ago

Everything's working nicely now, should be ready to merge

infoburp commented 10 years ago

Got quite a lot done today, hope you like :^)

infoburp commented 10 years ago

![Uploading Screenshot from 2014-06-21 23:06:11.png . . .]()

The latest amazing graphics!

infoburp commented 10 years ago

screenshot from 2014-06-21 23 06 11

infoburp commented 10 years ago

demo server - got everything working, have run out of things to fix..

http://165.225.138.215:8080/

infoburp commented 10 years ago

I want to add other stuff now like

blocks (minecraft style, can be collected/placed, different types) {3-high(air-ground-bedrock)} a bigger map (unlimited procedural gen, shared seed + deforms for multiplayer) procedural map generation pathfinding (a*) different mob types (pig,cow,horse,chicken,zombie,human) plants (grass,flower,wheat,cane,tree) crafting() smelting() items (swords, armour, picks, spades, hoes etc) medicine (heals zombies - made from crushed flowers) zoom in/out of map with mousewheel three.js default view

I'd really like some help/feedback on how it is now, and the best way to go about adding these features..

This could be a pretty cool game.

infoburp commented 10 years ago

I'm feeling a bit lost but I want to work towards something like a simplified dwarf fortress/minecraft/terraria type of thing.

diggles commented 10 years ago

I think a useful and not too daunting thing to look at is maps. Nothing too fancy either, it might just be a 2d array of tiles that contain things to place on the canvas. You could start out with simple blocks that just act as a collision so walls/rooms can be added, and extend it to add item pickups and even area transitions. I actually wrote a game in java that used this system, with a sprite based tiling system. qweasd Really simple, there was a Map object which contained and array of Area, Area objects had a 2d array of Tile (2d for x and y axes of course) and Tile had fields for block (whether to add collision or not), item (the item to place on the tile), tile (the x,y coordinate of the background image to use from the sprite), target (x,y the target tile to move the player to when they enter the tile, used for area transitions)

I can post code but yeah.. probably not much use

infoburp commented 10 years ago

Thanks for the input, diggles. Do you speak javascript? Maybe you could help with this?

infoburp commented 10 years ago

I've added a perlin noise function to generate maps, I'm going to have 3 block types to start:

water - can swim across (slow) dirt - can walk across stone - cannot walk through, can dig, carry and place

just having these three keeps things fairly simple but still allows players to make rooms etc.

diggles commented 10 years ago

Yes I have quite a bit of experience with JavaScript and I'd love to contribute but I'm busy with exams right now so don't really have enough time to make decent progress on anything.

Even after exams I'd probably be more interested in optimisation and refactoring, you gentlemen are working on features, as long as things are fast and easily extensible it makes adding new features almost trivial but if the code starts getting a bit hairy adding new features becomes a pain and we don't want that.

In saying that I haven't had a proper look over the source for a few days so it might be doing fine..

infoburp commented 10 years ago

screenshot from 2014-06-22 12 15 01

infoburp commented 10 years ago

Getting a weird mouse position bug, apart from that everything is working nicely.

@diggles

I've tidied up the code a lot, but I'm a bit stuck adding new features. Any help when you have time would be great. I'm not great at refactoring so help here would be especially appreciated.

infoburp commented 10 years ago

The game canvas gets made 2px bigger in x and y, can't work out why? Help?

diggles commented 10 years ago

The canvas itself? I's not just the 1px border around it? I had one exam yesterday, another tomorrow, and the final one is 5 days later.. after the one tomorrow I can probably afford to mess around for a couple of days. Be nice to have some issue tracking, anyone know if there is a free issue tracking site we can use? I can set up a fresh install of Trac to use if we can't find anything. Would just be nice to add bugs/features/tasks somewhere and allow devs to claim them so we can get an idea of how much progress is getting made and if anyone can't think of anything to do they can just pick an issue off the list

infoburp commented 10 years ago

just the 1px border around it?

Thank you so much, I suck at css.. Looks a lot nicer now (It's only 1px autism but these things annoy me)

infoburp commented 10 years ago

Can we not use the issues on here? Keep everything in one place?

diggles commented 10 years ago

Hah yeah I'm pretty anal about perfect layouts too Yeah I guess, I guess it's fine for a smallish project, maybe start adding things there and adding the labels to denote enhancement/bug/etc and assigning them to the dev working on it

At some point if we get too many issues we can split them into milestones but yeah.. one day

infoburp commented 10 years ago

Sounds like a plan. I'll add some issues then for the features I want to add.

infoburp commented 10 years ago

Ok I've added them. Once these issues are finished I think it'll be pretty cool, kind of like simplified multiplayer dwarf fortress.

infoburp commented 10 years ago

@emoose

Let me know what you think of this pull request when you have a chance, I'm going to take a break from coding for a while to do some reading on procedural generation etc.

infoburp commented 10 years ago

I've got a random cave generator now, but there's no collision detection yet, the cell size is different from playersize. How do I fix that?

infoburp commented 10 years ago

screenshot from 2014-06-22 19 04 55

infoburp commented 10 years ago

fixed - everything's the same size, need to add collision detection

infoburp commented 10 years ago

I'm lost. Someone please help add collision detection with these functions: -no avatars can go through walls -avatars cannot pass through other avatars

diggles commented 10 years ago

Ok exam done, what do you want me to look at?

diggles commented 10 years ago

hey @infoburp did you end up getting your changes merged? seems like you have made a ton of changes but nothing has been updated on this repo for 3 days. Might be better if I base my changes off your fork

infoburp commented 10 years ago

Sure, no merge yet, base from mine is probably best..

breaks commented 10 years ago

I think emoose may be looking to restart openhotel's code from scratch and change the graphics rendering to use something like pixijs/webgl, this could be part of the reason why nothing's updated lately.

diggles commented 10 years ago

if we write the server right we can have multiple clients running off it, whether the client uses the existing code, some rewrite or even a native client.. as long as the server is good clients could be split into completely separate projects