View Full Version : Laboratory2D Examples (need feedback )
FuzzYspo0N
16-01-2011, 08:39 PM
Firstly - i have to thank all the awesome people who helped me test so far.
Also, thanks to the people i constantly bounce ideas off of.
Credit where credit belongs :
The tilemaps came from www.lostgarden.com (http://www.lostgarden.com/2007/05/dancs-miraculously-flexible-game.html)
Images in thread :
http://img262.imageshack.us/img262/240/screenshot161.png
Download :
Tiled Maps Sample (http://owned.co.za/TiledMaps.zip)
The Concept :
Escape - Quit, Move mouse to the edges of the screen to scroll.
There is no gameplay in this sample - but it's goal is to
demonstrate using www.mapeditor.org for creating levels, storing level information and such.
This is a 'code sample' , where you can read the comments for more insight into what the demo is doing, look inside /Example/game.fl.js for more, and also open cute.tmx in Tiled map editor.
Bonus :
Please let me know if there were any performance issues, or anything weird.
BlackShipsFillt
16-01-2011, 10:02 PM
It runs fine in my Parallels (it caps out at 60 fps)... I so want to play this though (I kept clicking and pressing buttons until I returned here and read the full description).
Evolution
16-01-2011, 11:04 PM
Can't really say much, engine seem decent but I can't say if you have any code in place to handle with slower hardware.
What does your engine do when it takes too long to update? I hope you not making it perform more updates to catch up because it will give you problems when logic takes too long.
I found it strange that you separate your scene into cameras instead of scene nodes :)
Why is it that when I resize the window I get a white border, you should adjust the viewport and ortho projection matrix accordingly on resize. You are supposed to flip the x coordinates of your mouse position when working with opengl to make it simpler to change screen co ordinates of your mouse into world co ordinates.
Also, what's the specs on your machine? To run at your frame rate you need a pretty decent CPU not so much GPU on such a small scene.
Your engine still needs some growing to be suitable for decent 2d game development.
When designing a game engine try to be as flexible as possible, look through OGRE source it should give you a better idea on how to program engines.
Your engine still needs some growing to be suitable for decent 2d game development.
When designing a game engine try to be as flexible as possible, look through OGRE source it should give you a better idea on how to program engines.
I promise you everything you've pointed out has a reason, and the engine is pretty awesome to develop in (I promise).
Also, the engine is very suited to 2D game development, I'm just curious how you can judge that from a sample to show you how simple doing tiled maps are in the engine?
Also, the engine structure is a lot better than many engines I have used in the past, why must it draw from a big engine to be a proper engine?
Evolution
17-01-2011, 01:58 PM
Also, the engine is very suited to 2D game development, I'm just curious how you can judge that from a sample to show you how simple doing tiled maps are in the engine?
I looked through a few of your java script files. Your engine can cope with small games but it won't get used for large 2d games due to it's lack of features. Use your engine in a project so that you can pick up it's weaknesses and make improvements accordingly.
Also, the engine structure is a lot better than many engines I have used in the past, why must it draw from a big engine to be a proper engine?
The people working on large engines have tons of experience and have allot of gems in their code for someone still learning. You just touching the tip of the ice berg in engine development, there is still so much to learn to do it commercially. The moment you think of your engine as better than another's you hindering your ability to improve on it. I always have the urge to toss my engine and start over because I'm always finding a better way to design them.
sambarino
17-01-2011, 03:07 PM
Wow, sure is serious in here!
Anyway, looking really awesome so far. Also got issues with resizing but that's just a small thing.
Was running at about 260fps for me, pretty smooth.
I love the fact that it's using JS, something pretty cutting edge in my opinion, also much better to have a lightweight engine than a bloated one, even if there aren't as many "features". No doubt more features will be added as the engine is worked on but I don't see any reason why a game couldn't be made with it as is.
Evolution
17-01-2011, 03:44 PM
There is a difference between feature lacking and lightweight. Not supporting multiple view ports for multi player split screen games is a feature that is lacking. Can I use a joypad in my game? These are features that should be implemented, not saying that your engine is lacking these features I'm just using it to demonstrate. The better the engine the less likely it will be that your features will effect user friendliness and allow for features to be replaced with their own solution. I stated that it can be used for small games but it will be problematic as features grow in your game.
I was just saying you have seen only the tip of the iceberg.
Also, I wasn't trying to start a flame war or anything, it was just a thought that crossed my mind. (about the new engine, new way vs. old engine, "best" way)
dislekcia
17-01-2011, 04:58 PM
The better the engine the less likely it will be that your features will effect user friendliness and allow for features to be replaced with their own solution. I stated that it can be used for small games but it will be problematic as features grow in your game.
This makes no sense... Are you saying that an engine is only good when the features it comes with can be replaced wholesale, but then counteract that with the idea that as games grow in size and have to add their own features it'll somehow be a worse engine?
Evolution
17-01-2011, 05:15 PM
Sorry about that I was a bit confused there myself, let me explain it better.
The better the engine the less likely it will be that your features will effect user friendliness and allow for features to be replaced with their own solution.
Your engine shouldn't seem bloated just because you are adding a whole bunch of features. This shouldn't effect user friendliness if the features are not cemented into the engine and it is possible to replace with something that is more suited to the users needs.
I stated that it can be used for small games but it will be problematic as features grow in your game.
As the engine stands now it could do with some more features to help with larger scale projects which require more features
I was just saying you have seen only the tip of the iceberg.
Also, I wasn't trying to start a flame war or anything, it was just a thought that crossed my mind. (about the new engine, new way vs. old engine, "best" way)
Sorry for getting so serious. Your engine is good, no denying that, was just preparing you for issues you might experience in the future.
Not my engine, lol, but yeah, I see what you mean.
FuzzYspo0N
17-01-2011, 06:59 PM
As the engine stands now it could do with some more features to help with larger scale projects which require more features
I was curious, can you please post the feature list here? I keep triple checking but i can't seem to nail what it is i added.
Maybe you can post a more thorough list of everything the code supports (C++ too, thanks!) cos i keep scratching my head on the actual list of features.
Evolution
17-01-2011, 08:39 PM
I was curious, can you please post the feature list here? I keep triple checking but i can't seem to nail what it is i added.
Maybe you can post a more thorough list of everything the code supports (C++ too, thanks!) cos i keep scratching my head on the actual list of features.
??
Don't really get what you trying to say. All I'm saying is that your engine needs more features. My latest 2d engine has 80+ classes (compared to OGRE 200+), written in c++ and I'm still finding the need to add more features to meet the requirements of my project. This is excluding additional plugins for the engine to add support to other environments and game specific code. The whole point of a game engine is to try and make the user have to do as little work as possible.
How many classes/features does your engine have? Why don't you list your existing features and I can point out what you should be adding. Are you using core or compatibility profile? If your engine makes stupid rookie mistakes then I'm going to think it lacks features and also judging by your js files it looks like it can do with extra features. I'm just being honest. You not making it easy on me to give advice considering you turned me down when I offered to do beta testing so why you even asking me to write a full list of features your engine supports. shish!
dislekcia
17-01-2011, 09:31 PM
??
Don't really get what you trying to say. All I'm saying is that your engine needs more features. My latest 2d engine has 80+ classes (compared to OGRE 200+), written in c++ and I'm still finding the need to add more features to meet the requirements of my project. This is excluding additional plugins for the engine to add support to other environments and game specific code. The whole point of a game engine is to try and make the user have to do as little work as possible.
How many classes/features does your engine have? Why don't you list your existing features and I can point out what you should be adding. Are you using core or compatibility profile? If your engine makes stupid rookie mistakes then I'm going to think it lacks features and also judging by your js files it looks like it can do with extra features. I'm just being honest. You not making it easy on me to give advice considering you turned me down when I offered to do beta testing so why you even asking me to write a full list of features your engine supports. shish!
Say it with me people:
"Well done! And I'm sure your penis is huge too!"
Evolution, I've given you the benefit of the doubt so far, but you're not helping. Next unhelpful post gets you infractionbanned.
If you would like tips on how to be helpful, try these simple guidelines:
Don't laundry list your own achievements or skill when it cannot be verified. If you're good, your advice will be good on its own. If your advice needs justification based on you being awesome or whatever, it's not good advice.
Try not to use negative emotions. Urging someone to greater efforts by lambasting them has never worked well at all.
Try to focus on specific points of action. "Needs more features" does not dictate a single action that someone can achieve and then release to everyone else.
Never post tautological points: "Your engine needs more features to deal with projects that need more features" goes round and round in circles. Don't do that, it's lame.
And finally, read your posts to yourself before you post them. Imagine someone else saying them. Would you be ****ed off at that person if they said what you're saying and implied what you're implying?
Evolution
17-01-2011, 09:34 PM
As I mentioned above he turned me down when I offered to do beta testing
-Yes. That totally excuses you from actually adding value. Not helpful, infraction.-
FuzzYspo0N
17-01-2011, 10:10 PM
http://bostexan.files.wordpress.com/2010/11/memes.png?w=396&h=306
On topic, i have a newer demo coming tomorrow night :)
FuzzYspo0N
18-01-2011, 12:10 AM
I have wanted to make lasers. So, i shall!
Example is well on its way for tomorrow night.
http://img708.imageshack.us/img708/2575/screenshot174i.png
FuzzYspo0N
18-01-2011, 02:12 AM
HERE IS A NEW EXAMPLE:
What is it this time? Camera transitions. create a sprite (it has nifty follow algorithms from mootools),
tell the camera to follow the sprite - done. I can see many uses for this, and all sprites have it (sprite.moveto).
Also
I stuck the rest of the examples i have so far, they are a small mini tutorial set to get you understanding
the concepts the engine uses. Look in the very root game.fl.js and comment out the example, and load the tutorials
Same image
http://img262.imageshack.us/img262/240/screenshot161.png
Download :
Transitions Sample (http://owned.co.za/TransitionsAndMore.zip)
The Concept :
Escape - Quit, Click try again, to see a different time frame on the same transition
There is no gameplay in this sample - Just some nice camera transitions you can play with :)
Bonus :
Please let me know if there were any performance issues, or anything weird.
sambarino
18-01-2011, 03:24 PM
Pretty cool, although I did experience a bit of lag. When I click "try again" and it scrolls up/down about 3 out of every 4 times it will lag (and by that I mean it jerks once or twice) and usually that will happen just before it reaches the top (before the rebound). This is quite a slow computer but I'm guessing that's the point. (fps doesn't seem to dip at the jerk but it might just be too quick to notice).
Edit: Also sometimes when scrolling UP it goes at a similar speed to when it scrolls DOWN, but every now and then it will shoot up about 5 times faster than normal.
Also, appreciate the good moderation dislekcia (although you're more gracious than I would have been). Hopefully we can get some positive feedback going now.
Elyaradine
18-01-2011, 03:45 PM
For me, the scrolling up super fast happens every second time it scrolls up (i.e. every fourth time I click on the Try Again button).
Still runs great.
FuzzYspo0N
18-01-2011, 07:13 PM
Thanks for the tests guys, you did try the other examples (instead of just bounce) right? You can comment bounce and uncomment any of the other examples in the main game script.
FuzzYspo0N
20-01-2011, 03:57 AM
I have been a bit busy with some important stuff to be able to post the latest example,
but i have gotten far on the mechanics needed. The stuff below is an extension of the transitions
example, each projectile gets created with the same transition, and using tab changes the transition.
The example when released will be a top down shooter, lots of bullets and pretty graphics,
and the extension of that will be the multi-player (a good demo of how you handle networking using laboratory2D).
http://img21.imageshack.us/img21/838/screenshot192y.png
http://www.youtube.com/watch?v=w16l-bXkSLw
UntouchableOne
20-01-2011, 07:59 AM
Looking good. I only noticed the white background when maximized and the sudden speedup when the camera moves up every now and then as problems at runtime. I didn't experience any lag issues though.
EDIT:
Love the laser! :)
FuzzYspo0N
20-01-2011, 09:30 AM
Thanks! All the feedback is helpful :)
The resizing thing is not really an issue,
edg3 and i did some tests and figured it needed some better options,
Jan 2, Me and the main author of the renderer posted the enhancement to the issue tracker on google code
- which you can see here, http://code.google.com/p/phoenixgl/issues/detail?id=7
Seeing as he asked to fix it, i just left my resizing tests all mangled and broken. If i comment some lines,
it works as expected but i didnt really see the need, these were just fixed size games at this point :)
The next one will have the flag in config.js (resize = false) normally disallows resizing, but is disabled in these
due to experimenting with different options.
Evolution
20-01-2011, 10:50 AM
Cool! does your engine load in scripts so that you can create custom particle emitters or is the logic placed in c++?
FuzzYspo0N
20-01-2011, 11:59 AM
Woops, i thought you looked at the scripts? Almost all of the game engine side is written in javascript, including the transitions :)
Apparently youtube is blocked more often than vimeo, sambarino asked to see it so i put it on vimeo
http://vimeo.com/18988407
Evolution
20-01-2011, 01:36 PM
Woops, i thought you looked at the scripts? Almost all of the game engine side is written in javascript, including the transitions :)
I hear that javascript is fast, but I'm just curious how it handles particle physics. How many particles can your pc handle and what are it's specs?
FuzzYspo0N
20-01-2011, 02:26 PM
theres no physics here, just maths applied to a positional element. The engine can render a lot of stuff, on my pc i can get around 6000 sprites at 60fps, all moving etc. Thats on a 2009 iMac, 2.6 ghz dual core.
The video below is from the renderer examples,
http://www.youtube.com/watch?v=v1RRKg1VYGQ
BlackShipsFillt
20-01-2011, 02:51 PM
Soooooo pretty!
With power to spare apparently (because on top of the particles it also renderered out a smooth video)
Evolution
20-01-2011, 03:27 PM
6000 sounds about right for a cpu implementation, also have to admit your particle system looks better than mine ;)
FuzzYspo0N
20-01-2011, 11:18 PM
Everyone should know about Bison Kick by now, im hoping : http://www.jacobschatz.com/bisonkick-beta/
What is it?
Its an awesome Box2D editor, which exports to xml and actionscript3 arrays for you to load in your game.
What makes it cooler
You can now add joints visually, build entire constructed and 'scripted' predictable levels in the editor , load them in game.
The new beta has all the joints support, which is nice.
So why i am posting
With Laboratory2D i want to push the boundaries of how much you can do with the least amount of code,
But also to support as much as i can from existing tools. While i plan to make cool editors - there are plenty of them already.
This means adding support for awesome tools like this achieves both of those goals in one shot.
What did i add
I added support for loading the Bison kick exporters, both as3 and xml. Because the new as3 supports joints and xml doesnt just yet,
it needed both :) Secondly, i added all the debug support you could need when implementing levels and what im aiming to do ;
A Box2D 'Construct'
A construct is a simple, prebuilt object for laboratory2D. Because they can come in different forms, i needed to simplify the interface. All you need to do is use the module associated with the format of your data - for example bison kick data - and import it.
Once imported you get something simpler, like this :
box2dLevel.get( 'wheels' ).bind( wheelSprite );
Every wheel is unique, of course, but by default it can map the scales/sizes/images and sprite info onto the existing physics shapes. It will even update itself for you - no code needed :)
An actual example
A downloadable one will be up sometime after the shooter is finished, but adding import formats is simple and easy.
Take a look at the screenshot below to see how i made the level shown, and how much code it took.
http://img822.imageshack.us/img822/6792/screenshot209m.png
herman.tulleken
21-01-2011, 12:23 AM
Impressive :)
Evolution
21-01-2011, 08:57 AM
Cool, I like the way you use third party software to speed up development and add extra functionality.
Impressive :)
Not impressive, AWESOME! :P I'm using lab specifically because of the physics stuff for something I'm working on.
Evolution
21-01-2011, 12:56 PM
Not impressive, AWESOME! :P I'm using lab specifically because of the physics stuff for something I'm working on.
Good to see SA developers using locally developed engines, coupled with competition among local engine developers :D can only boost skills in this field, which is lacking in this country.
FuzzYspo0N
22-01-2011, 05:00 AM
Added automatic support for Tiled Editor "Object layers", simply draw the collisions on a layer with a "collision | true" property, and it will automatically be physics enabled. For example, in this demo, i used bison kick to load a simple xml file :
http://img222.imageshack.us/img222/1276/screenshot233p.png
And of course, normal tiles can be collidable too :
http://img153.imageshack.us/img153/6923/coll2n.jpg
Also, be careful when scheduling angry enemy AI.
http://img213.imageshack.us/img213/9139/screenshot221.png
BlackShipsFillt
22-01-2011, 03:27 PM
Those red guys really hate you :)
WOW. Nice progress!!
FuzzYspo0N
22-01-2011, 08:34 PM
Thanks blackships, I extended that support even more a bit earlier today,
For example, i added triggers, circle support, collision callbacks on flagged objects, etc.
I was messing with these features to see how quickly i could make a playable game for the mini ludumdare competition (not really entering vigorously, just testing features by using it).
This is in the editor :
http://img828.imageshack.us/img828/3780/screenshot243.png
And then the gameplay, based on that simple map :
http://www.youtube.com/watch?v=cczFE2hY78s
The older image is here :
http://img204.imageshack.us/img204/5177/screenshot242.png
Its really really fun working with such a flexible language. So easy to get a lot done quickly.
FuzzYspo0N
06-03-2011, 08:02 PM
Ok so its been a while since i updated this, I should have new examples for you to fiddle with soon, but for now I will just post some links.
Most recent, to oldest .
http://k.min.us/jj30XW.png
http://blog.centrc.net/whats-new-how-the-fonts-in-laboratory2d-work
http://i.min.us/ijh9Ng.png
http://blog.centrc.net/whats-new-useful-graphical-debugging-tools-in
http://blog.centrc.net/how-laboratory2d-handles-p2p-networking
http://blog.centrc.net/part-13-a-look-at-the-lab2d-features-in-detai
I guess this is just in case you guy's aren't watching my blog for whatever foolish reason :)
The public beta is actually coming as soon as i can finish up some of these last few outstanding issues , so i figured id post here as well.
I also posted a screenshot of the new home page which is coming out when the beta goes live. Cant wait.
http://i.min.us/ijwL26.png
Powered by vBulletin® Version 4.2.4 Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.