• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.
Sign in to follow this  
Followers 0
martensms

JavaScript based 2D / 2.5D game engine

3 posts in this topic

Hello everybody!

I just found this forum and thought that it would perfectly match my current development stuff.

So, I'm currently developing a little JavaScript-based and lightweight engine for browser gaming. The target are mobiles or slower devices.
I'm currently challenging the architecture. It is built upon mainly in these different "objects / constructors"...

[b]Current architecture:[/b]
- Cache: The cache is accessible by everyone, it manages stacks and their entries (via id). e.g. models, levels, objects are hosted there.

- Engine: The logical level, engine loads levels, manages the objects and calls the compositor
- Engine.Hitmap: The hitmap with simple true/false entries.

- Compositor: Translates Objects (Tilegrid Coords & Sizes) to Pixel-based ones (if 2D) or to the 2.5D or 3D coordinates. Can be switched anytime (maybe compositing scheme?).

- Renderer: Uses different technologies to render. Same structure required for all renderers. Currently an HTML-generating renderer, but maybe Canvas or WebGL later.

[b]Examples / Links:[/b]
You can find a sample game (wherein I'm experimenting a lot, so please don't flame if it's not working) at
[url="http://ninja.martens.ms/game.html"]http://ninja.martens.ms/game.html[/url]

I also built a little editor (rapidly in about 30min) which is in my opinion "just a frontend for the engine and manages it":
[url="http://ninja.martens.ms/editor.html"]http://ninja.martens.ms/editor.html[/url]

To help you have a clue what's going on in these Classes, I created a JSDoc reference:
[url="http://ninja.martens.ms/docs"]http://ninja.martens.ms/docs[/url]


[b]My current challenge:[/b]
The Quest and Player- or NPC-logic. I currently implemented a simple Engine.Character Class that creates a character instance per object. I now have the problem for using quests or other "global interface interactions" that may influence the characters or NPCs.

Imagine you have an NPC walking around until you talk to him. Then he wants you to follow to a given position. After you followed, he wants to show you how the game works (e.g. fighting and stuff). You get points, upgrades and stuff - or quests you will have to solve. These quests are in my opinion something like attached events for objects. E.g. "destroy object with id bla" will be triggered if the object was destroyed. The callback function attached on it will now be called and upgrades the questmap.
...well, or something like that.

I currently have no idea how to realize that (in a well-designed game architecture). So I'm asking you for suggestions or ideas.
You are the pros, I'm just the JavaScript ninja that has no clue of game engines =D

Please have in mind that the underlying DOM (Document Object Model) in web browsers is heavily slow - compared to other environments.
That's why I built the structure in that way.

...I want to thank for any idea or opinion on that!

Greetings,
Christoph
0

Share this post


Link to post
Share on other sites
Dude,

AWESOME I'm doing javascript game development myself!

Your editor is the coolest thing you've got. That's awesome. Are you just relying on animated gifs to do animation? I am thinking of doing image sets for animation so I can control which animation is playing depending on user interaction. Perhaps a set of animated gifs for different animations and swapping the images? Not sure the best way to do baked animation.

So far I am staying out of the <canvas> although my 1st ever completed game (a tetris clone) uses <canvas> check that out here: [url="http://cedarrapidscleaning.co.cc/js/tetrominoes/"]http://cedarrapidscl...js/tetrominoes/[/url]

My intention is to create a new game prototype each week.. The first prototype is a work in progress that will be completed this Saturday. I'm trying to learn collision detection and basic physics - see it here: [url="http://cedarrapidscleaning.co.cc/tyler/messing/"]http://cedarrapidscl.../tyler/messing/[/url]

I like your overhead tile based game it's got a very rpg like feel to it and reminds me of the original Zelda.

As far as game engine design and architecture, at this point why worry about it? Make the thing work and if it's an ugly mess, you can clean it up on your next version. When I first started trying to make my physics engine, I was trying to take everything into consideration and create an object hierarchy for linking and such and I just decided and getting nothing visible done, I figured TO HELL WITH IT and just to make SOMETHING work - at least that way I know right away if my game idea has any potential and is worth porting and developing into a full game.

After I get an idea that's amazing and will make me quite rich, I'll spend the time perfecting the engine (and converting it to a platform where I can charge - an app store)
0

Share this post


Link to post
Share on other sites
I would have converted it to <canvas> before posting this. Using the DOM like you're doing isn't advised and flickers in Firefox 4b9. I mean it wasn't recommended when people tried to make games in it when it came out. Good start though. Try not to use copyrighted images. There are free sprite libraries online. (Many people have very strong feelings toward copyrighted content).
0

Share this post


Link to post
Share on other sites
Hey guys,

seems as it's pretty empty here...

I cleaned up the code a bit (well, many things still todo...but it works for now :D) and created a github repository!

yes, you are now able to get the code on github:
https://github.com/martensms/ingenioJS

Hopefully some JavaScript-Ninjas will join development of this project =)
It is seriously one of the first JavaScript game engines on the market that are fully extendable and not using canvas.
Have a look at the code or the documentation browser (docs.html) to have a clue what's going on.

Greetz,
Chris
0

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0