max-mapper / voxel-engine

3D HTML5 voxel game engine
http://maxogden.github.com/voxel-engine
BSD 3-Clause "New" or "Revised" License
1.29k stars 219 forks source link

2d mode #86

Open juliangruber opened 11 years ago

juliangruber commented 11 years ago

would it be a smart thing to code a 2d mode plugin for voxel and use that to create a 2d game while still using the awesome voxel ecosystem?

Or is that a huge waste of cpu and browser compatibility and causes unnecessary complexity?

max-mapper commented 11 years ago

YES DEFINITELY! I think http://hughsk.github.io/topdown-physics/ by @hughsk can be adapted

one use case is for non-webgl clients to be able to view + edit simple voxel.js worlds, another is for webgl clients to have a small minimap in the corner that shows them a larger area of the map and their position as they walk around

On Mon, Jul 29, 2013 at 5:48 AM, Julian Gruber notifications@github.comwrote:

would it be a smart thing to code a 2d mode plugin for voxel and use that to create a 2d game while still using the awesome voxel ecosystem?

Or is that a huge waste of cpu and browser compatibility and causes unnecessary complexity?

— Reply to this email directly or view it on GitHubhttps://github.com/maxogden/voxel-engine/issues/86 .

shama commented 11 years ago

Also would be rad for multiplayer where a 2d game can interact with a 3d game. Like a commander dropping resources for players in the 3d game. :D

juliangruber commented 11 years ago

yeah, topdown-physics will work for one game I'm thinking about, another games needs gravity (maybe that could be added?).

So how would I start about that? Would I write a wrapper around topdown physics and canvas three.js that had the same API as voxel-js?

juliangruber commented 11 years ago

Or is it more like the 2d part is an extra thing that should be easy to integrate into an existing voxel project?

juliangruber commented 11 years ago

Just trying to figure out the best way to write 2d games leveraging as much modules as possible

max-mapper commented 11 years ago

I think http://crtrdg.github.io/ is a good start in terms of organization

hughsk commented 11 years ago

@juliangruber you should start out trying to write either a topdown or isometric 2D renderer - firstly, that'd be sweet :) You'll also get a better idea of how to plug into voxel before diving straight into making a game!

Using voxel for 2D stuff would work for certain types of games - definitely try it, but if you're struggling maybe look into crtrdg? It's also worth noting that there's a bunch of really useful modules related to the project that aren't voxel-specific, e.g. ndarray/aabb-2d/spatial-events/kb-controls. So there's ways to use/contribute to the project without using the engine directly.

I'm working on a wiki of general-purpose game modules, if you're looking for stuff you can use :)

zachio commented 9 years ago

I was wanting to use it to generate 2d maps with infinite worlds