Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Geek Culture / My 2D game editor

Author
Message
flashing snall
19
Years of Service
User Offline
Joined: 8th Oct 2005
Location: Boston
Posted: 8th Jun 2012 00:13 Edited at: 8th Jun 2012 00:35
Hello!
I have been on summer break for about a month now, and I have been working on a 2D game editor/engine.

Its pretty neat, if I do say so myself anyway...

There are bounds, which are like walls. They double as shadow casters.
There are lights, which are dynamic and cool.
There are artDecals which are editable up the wazoo.
There are entities which are compiled C# classes. The cool thing with those is, you write a class that extends Entity.cs, and then it only takes one line in the editor source to import those entities and have them be editable. Its very fancy.
Everything but bounds are scriptable, using a home brew scripting language that stems from C# System.Reflection.

The scripting system is really cool, it gives you total access to the object's methods and what not, so you can really mess around with things.

The editor is meant to help me build a game Ive wanted to build for 5 years now, but it really could create any 2D game. If you are interested, let me know.

Here is a video showing some of the features.

edit: you should really watch in HD. I went through hoops to get the quality good enough. Please


Ugh, I dont think the video is working. here is a link
http://www.youtube.com/watch?v=_h6kVyJDbJ8&feature=youtu.be&hd=1

JLMoondog
Moderator
16
Years of Service
User Offline
Joined: 18th Jan 2009
Location: Paradox
Posted: 8th Jun 2012 00:34 Edited at: 8th Jun 2012 00:35
I love how flexible and organic the editor feels. Your not restrained by grids. Will you be able to change the color/texture of the bounds? Fixed your video, were missing a '_' at the beginning.

flashing snall
19
Years of Service
User Offline
Joined: 8th Oct 2005
Location: Boston
Posted: 8th Jun 2012 00:59
thank you much, Mr. Mooney!
Yes, you can change the bound color to anything you want, its actually already a feature, I just didint do it in the video. I think though, that for the best looking game, it would be best to HIDE the bounds, and place elaborate art decals over them.

Flatlander
FPSC Tool Maker
18
Years of Service
User Offline
Joined: 22nd Jan 2007
Location: The Flatlands
Posted: 9th Jun 2012 06:17 Edited at: 9th Jun 2012 06:18
Nice. From what I saw I believe I will really like the scripting language. You can tell I'm more of a programmer. Would this be saved as an exe or what. I have AppGameKit and of course it is totally a programming language for game development rather than having a map editor and script for ai and apparently some of the physics and lighting. I wonder if somehow the two could play together.

I'm thinking not possible; but just wishful thinking.

"A programmer is just a tool which converts caffeine into code . . . reminds me….. if I had one more brain cell, I could have a synapse! woo hoo, Sparky!

~I'm the Terry of the Flatlands.
zeroSlave
15
Years of Service
User Offline
Joined: 13th Jun 2009
Location: Springfield
Posted: 9th Jun 2012 07:30
That's a really clever editor and looks very intuitive. Like you said, it'd be neat to be able to use the bounds as invisible barriers. Maybe use the same type of clipping tools on tileable images to create the level's walls, ceilings, floors, etc. Depends on what you're looking to accomplish in the style of your game, I guess. Anyway, good stuff!

Everybody is a genius. But if you judge a fish by its ability to climb a tree, it will live its whole life believing that it is stupid.
Pincho Paxton
22
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 9th Jun 2012 12:49 Edited at: 9th Jun 2012 12:56
I must be behind the times somewhere. What is DCG?, what are bounds? I don't actually know what I am looking at in the video. When did 2D become so complicated? Why are there rooms in space? Why are they casting shadows on a planet? What the heck is a Wazoo?

This is why I don't like C#...
Quote: "There are entities which are compiled C# classes. The cool thing with those is, you write a class that extends Entity.cs, and then it only takes one line in the editor source to import those entities and have them be editable. Its very fancy. "


That sentence doesn't make literary sense. It's like an Americanisation of the English language. I hate it when the Americans do that.

Benjamin
22
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 9th Jun 2012 15:06
I don't really make games anymore, but this looks pretty cool nonetheless. I always found that it was more fun to make editors than the games themselves.

Quote: "This is why I don't like C#..."


Because you haven't yet taken the time to learn OOP?



Support a charitable indie game project!
Pincho Paxton
22
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 9th Jun 2012 16:03 Edited at: 9th Jun 2012 16:12
What's OOP?

I like to think in English, and program in English. Once everything becomes reversed, and abbreviated I can't use the syntax. Anyway it was just a rant. I don't see why programming has to be moved so far away from the English language apart from to make the programmers elitist. I probably have some kind of reversed dyslexia where changing the English language becomes too hard for me, because I can't do it, and I want to produce the results that the fastest languages produce. So I go into a rant about it.

Seppuku Arts
Moderator
20
Years of Service
User Offline
Joined: 18th Aug 2004
Location: Cambridgeshire, England
Posted: 9th Jun 2012 18:14 Edited at: 9th Jun 2012 19:35
This project looks pretty cool, it sounds like its got some useful features too. I think flexibility is always a win.



OOP = object orientated programming. Basically the method of programming C# forces you into. Once you get used to OOP, it's actually really useful.

People just tend to use acronyms in general. It's just a quicker method of communicating. I don't think you're gonna escape it.

Quote: "That sentence doesn't make literary sense. It's like an Americanisation of the English language. I hate it when the Americans do that."


It makes perfect sense to me. You kinda need to learn C# to understand it's concepts. The 3D Buzz Hyperion tutorials I think as a great start for learning C#, because it actually helps you put visual imagery to the concept of C# and its object orientated programming.

To understand it clearly in to Dark Basic Pro terms:

I'm sure you've used user defined types in Dark Basic Pro, like this:


And you might have: player.filename = "media/player.x"
or
player.position.x = 300 : player.position.y = 0 : player.position.z = -234

You might used those variables for updating something on the player object. Classes are similar, but can do a lot more and are more complex. You might use a class like you might an individual .dba file in Dark Basic. Have, "player.dba" or "control.dba", you could have "player.cs" or "control.cs" and contain classes of the same name. Imagine being able to stick functions inside of a user defined type. So you could have
player.lookat(30, 0 , 20)
Instead of having a function called 'lookat(player, 30, 0, 20)'
And because everything is an object, it can be declared like a variable.

To get a better idea, these 2 pieces of code do the same thing, one is C# (using Unity) and the other is Dark Basic Pro.





In DBP I have to use a variable to point to an object, but in C# I can just use that object like I would with a variable. So if I wanted to use that particular method. I could go into something like, "game.cs" and type:
if (Scene.WithinDist(Player, NPC, 15))
To create a condition if the Player and NPC are within 15 units of each other. Or in DBP:
if WithinDist(player, NPC, 15) = 1 then...

Of course you might have noticed my class was a 'public static class'. Which is: "you can access me anyhere, but there's only one of me". If you want to declare classes as you would with a variable, which you might do if you've got a class for storing character data and you've got more than one character, then just delete 'static'. You'd declare it as you would with an integer or string.

So I think using 'object orientated programming' can actually be very useful. At least I find it is.

Basically all that he's saying is, you can make your own classes for the entity.cs source to read. So you can extend its functionality.

Pincho Paxton
22
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 9th Jun 2012 19:00
No I avoid Types in DBPro as well, I use DIMS. Oh well, I can't switch my thinking around.

Seppuku Arts
Moderator
20
Years of Service
User Offline
Joined: 18th Aug 2004
Location: Cambridgeshire, England
Posted: 9th Jun 2012 19:02 Edited at: 9th Jun 2012 19:03
You can DIM a type as well, I found it helps managing data a lot easier, kind of like storing everything into a database. But to each his own.

flashing snall
19
Years of Service
User Offline
Joined: 8th Oct 2005
Location: Boston
Posted: 9th Jun 2012 20:29
Haha, crazy C#-DBP war eh?
Quote: "I must be behind the times somewhere. What is DCG?, what are bounds? I don't actually know what I am looking at in the video. When did 2D become so complicated? Why are there rooms in space? Why are they casting shadows on a planet? What the heck is a Wazoo?"

DCG is just an acronym my friend and I have been slinging around for something. About five years ago, we wanted to rebuild Commandos, an old game by edios, but since we didn't know what we were doing, it just sort of lingered for a long time. Now that I have a clue, we are getting back into it. My name is Chris, and his name was Greg. So we dubbed the project Commands Chris Greg, but since there were two C words, we abbreviated that to Double C Greg, so the whole thing works out to D C G. Its goofy and a bit stupid, but its stuck for five years.

Bounds are just a collection of points that make up WALLS. The wall data is used for pathfinding and lighting.
2D is not complicated, its quite simple!
There are rooms in space, because, why not?
And a Wazoo has nothing to do with C#....

Attachments

Login to view attachments
tiresius
22
Years of Service
User Offline
Joined: 13th Nov 2002
Location: MA USA
Posted: 10th Jun 2012 02:37
How do you get the light to shine out of the ship and not pass through the walls?


A 3D marble platformer using Newton physics.
flashing snall
19
Years of Service
User Offline
Joined: 8th Oct 2005
Location: Boston
Posted: 10th Jun 2012 04:20
the shining from the ship is pretty easy. In the ship entity code, I just wrote in a light positioned at the ship position.

The lighting shadowing code is not mine, Im using krypton. you can look at that in more detail here
http://forum.thegamecreators.com/?m=forum_view&t=196407&b=2

Rampage
17
Years of Service
User Offline
Joined: 4th Feb 2008
Location: New Zealand
Posted: 10th Jun 2012 07:13
This looks really, really good.
Looks like exactly what I need for the game I am making to be honest.
I've been looking at viable 2d editors and this strikes the nail on the head.
Good work on this

Regards,

Max
flashing snall
19
Years of Service
User Offline
Joined: 8th Oct 2005
Location: Boston
Posted: 10th Jun 2012 07:21
@Rampage
would you be interested in using the editor? Do you have any C# knowledge?

Rampage
17
Years of Service
User Offline
Joined: 4th Feb 2008
Location: New Zealand
Posted: 10th Jun 2012 07:39
My 'expertise' in programming really only covers mostly C++ and (at a University/intermediate level) Java. (I really only use OOP languages)
I've toyed around in C# but haven't done anything really extensive in it unfortunately.
I am a C++ Programmer at heart.
(I do own professional versions of the whole Visual Studio 2010 suite though, so I have C#, and can easily understand it.)

Other than that point, I am very interested

Regards,

Max
flashing snall
19
Years of Service
User Offline
Joined: 8th Oct 2005
Location: Boston
Posted: 10th Jun 2012 07:46
well at a low level, C# and java are incredibly similar.
I will keep you in mind. I have a few things I want to get done before I release anything for testing.

right now, objects only run one script, I want to change it so it mimicks fpsc, and runs a start up script, and main script, and a destroy script. That should be pretty easy.

I need to add in animated spite support

I need to make sure that all the windows controls actually function properly

I need to work on the way that Entities are initiated into the editor. Its good right now, and only takes one line of code, but it does require the whole source code to be recompiled. Easy for me, but maybe not so easy for other people.

And I should probably write a some help documents...

Rampage
17
Years of Service
User Offline
Joined: 4th Feb 2008
Location: New Zealand
Posted: 10th Jun 2012 07:54
I have been meaning to look more at C#, as I love how Java handles Objects/Classes (are they similar)?.
Maybe I'll get into XNA It seems to be the way to go as far as 2D is concerned.
I'll make it my mission after exams finish.

I agree with the FPSC-like method of handling multiple scripts.

And I'd be happy to help in any way I can as this is of great interest to me.

Cheers.

Regards,

Max
Seppuku Arts
Moderator
20
Years of Service
User Offline
Joined: 18th Aug 2004
Location: Cambridgeshire, England
Posted: 10th Jun 2012 14:25
C# handles classes in a similar way to Java, or as far as I can tell. At least from using Unity3D (which uses C# & Java) I've found that although I like to code in C# I've encountered Java scripts and found them pretty easy to translate into C#, although I don't actually know Java.

Also, I found this tutorial is a great kickstart into C#, although it tries to explain it to the absolute beginner, it actually covers enough ground to get you started. It's part of an XNA series, but doesn't actually use XNA, just C# and the .net framework.

Login to post a reply

Server time is: 2025-05-18 16:18:15
Your offset time is: 2025-05-18 16:18:15