Tumgik
abadcoder · 9 years
Text
LevEditor: A Level/Tile Editor for Touch Devices!
Holy cow has it been a busy past few months. So winter break has finally started, I'm over all the colds that I get around this time of the year, and school doesn't start for another... 12 days. I figured now would be a good time to update the nobody who reads this blog (note: If you're reading this, you're not actually a nobody - I just assume I rant to myself here). What I've been working on is essentially a way to bring game development tools to mobile platforms in the form of a level/tile editing "suite". There's a lot of reasons as to why - making game development a little more "flexible" of a task (e.g. not requiring a laptop/desktop), ergonomic comfort, the challenge of working with touch devices, etc - at the end of the day, if not actually a useful tool, I'm hoping that the experience will still be worth a discussion. The basic things I want to include (note: You will be able to hide/show the HUD): 1) A window that serves entirely for listing all of your assets (e.g. all the tiles from your spritesheet), with the ability to scroll through all of the tiles. 2) A window that lets you choose the active working layer, as well as edit the transparency of the active layer. 3) A window for some smart editing options. Some pretty common (such as undo/redo), and some a bit uncommon - for example, I'm exploring the idea of being able to pick up and move mass tiles by just tapping a button and making a shape with your finger. 4) A window for file I/O - note that a library needs to be built to support functionality for easily adding the levels you make and/or edit on the tablet to your project, whether it's being made from scratch or you're using Construct 2. The goal is for this to be seamlessly integrated to your desktop/laptop using cloud technology, but other options are being explored (because, understandably, not everyone can connect to the cloud). 5) A window for basic tile creation, deleting, and editing. Obviously this would not support image creation on the level of something such as PhotoShop, but for basic tiles or small edits, we would want to have an in-house editor for you. Say you need to change two pixels - you could select the tile you want to change, edit it, and then update your assets to recognize and save the changes you made.
On a side note, #1 and almost all of #2 are done and working for full-functionality testing purposes. #3 and #5 are in the works with #4 being looked into and planned, but no actual work yet. HUD visibility toggling does work.
Tumblr media
Here be a horrid sketch of what the layout should look like (the middle is where you can edit the level). I would like to have the ability for users to customize their HUD layout to find something that works for them, but for now that is the default. Obviously there are a lot of "what ifs" and "maybes" to this. If you have any concerns/advice/questions, please tweet at @Vitontonio on Twitter and tell him what you think, he's more than happy to get feedback and/or discuss this! Until next time, -ABC
2 notes · View notes
abadcoder · 10 years
Text
Microsoft's 2015 Imagine Cup!
Remember that thingy I've been posting about recently (or not so recently, due to school)? Well, a friend of mine and I decided we're going to vamp it up a notch: We're going to really sit down and focus on it - we're going to enter it in Microsoft's Imagine Cup. What this essentially means is that there are official plans to turn this into something big. I don't want to say more to ruin the surprise, but I sincerely hope that it'll blow your socks off (and if you're a game developer, hopefully you'll find it useful!). I'll share more details in a few weeks. Right now there's going to be a strong focus on laying out the design and submitting a proposal, and after we hear back from our submission I can spill some more details. Another short post again; I apologize. But hopefully I'll be able to start writing longer posts soon. Until then! -ABadCoder
1 note · View note
abadcoder · 10 years
Text
PSA: Windows 8.1, MonoGame, Windows Store and VS2013.
Hi there! Sorry I don't have time to make another post with regards to my tile editor; I've been busy with classes this week. The good news is that I will be getting a Surface Pro 3 soon, and I intend to start porting my tile editor to mobile! At any rate, that aside - for those trying to use VS2013 with MonoGame to build any sort of application for Windows mobile or the Windows store... STOP. Go uninstall VS2013 and install VS2012.
var factory = new MonoGame.Framework.GameFrameworkViewSource<Game1>(); Windows.ApplicationModel.Core.CoreApplication.Run(factory);
For some particular reason, in VS2013 (at least on Windows 8.1) it cannot convert from GameFrameworkViewSource to IFrameworkViewSource. I have no idea why, and I unfortunately don't have the time to really dig through MonoGame's source code and Microsoft's documentation to find where the issue may be. Hopefully this'll help some people out, though. I could not find a single straight answer on the Internet with regards to the struggle I was having, so for the person that happens to find this post with the same issue: You're not alone. Until next time! -ABadCoder
0 notes
abadcoder · 10 years
Text
Onions Have Layers. Ogres Have Layers. My Tile Editor Now Has Layers!
Good evening! Or afternoon. Morning. ... ...Hello regardless of what time it is for you! Essentially I'm just quickly writing this post to make note of my layer system working in a presentable state:
Tumblr media
Pardon the mess. But essentially, as long as the tile you select has transparency to it, you can stack it right on top of other tiles! Currently I only have it working for three layers (switch between layers with the 1, 2, and 3 key for layer 1, 2, and 3 respectively), but I can very easily grant the user the ability to use more. The lower the number, the lower the layer - that is, layer 1 is the bottom layer and layer n is the top layer (where n is the number of layers). Sorry I don't have more to share; I was recently hit with something that made me feel unpleasant for the past 36-48 hours and school has been busy. Hopefully I'll be able to update this blog again with much more good news soon. Until then, take care! -ABadCoder
0 notes
abadcoder · 10 years
Text
Something Something Progress.
...Somewhere, cute animals are dying because of my awful attempts at jokes/puns. Anyway, before I go into what I've been doing, I'd like to quickly mention that the tiles I am currently using to test/demo my tile editor belong to Hyptosis, who has a bunch of really nice stuff for free use (as long as you credit him properly). You can find more here - I encourage you to check his stuff out! Getting down to business, I'd like to first show two screenshots - I was only going to include one, but I realized I hadn't applied a color filter by time I finished my quick demo (and I was too lazy at the moment to whip up a new one):
Tumblr media Tumblr media
There! In the first screenshot you can see a few tiles that I put down to create two shadows; the second one you can see the upper panel in a turquoise color, which will eventually host a few more tools - the one that's being worked on right now is the active layer tool (I'll explain a bit more about this in a minute). Currently you can only scroll through the tiles to view more of them, but I plan to eventually add a scroll bar on the right for those who prefer it. Now - as for the active layer system: Essentially all it will be is a system that allows you to layer your tilemaps. I'm leaning towards adding a hard cap of 3-4 layers which can be switched between via 1-4 on the keyboard (hotkeys) or by clicking on them - they will be displayed on the tools panel. The alternative is to have a dropdown menu via which you can add as many layers as you like, but I feel like that may become redundant. If enough people used it and wanted me to loosen the layer cap I could work on it. Other than that... Not too much that's immediately concerning has happened lately. Mostly working on cleaning up my code (still) and making sure it's not a mess moving forward. I'd like to have a clean foundation before I start getting [potentially] crazy with it. Adding restraints so you can't scroll the tiles off the menu, making sure I'm not using a lazy hard cap, etc. Things that'll make my life easier. Good things. I think. I hope you think so, too. :) See ya around! -ABadCoder P.S: Trying to tag things "C#" is a pain in my side because of the hashtag. This language was so cool it was using hashtags before hashtags were even a thing. Stop trying to tell me #C# is just #C, Internet!
0 notes
abadcoder · 10 years
Text
Code Cleanup is a Real Goto.
Hehe. I made a terrible pun in my title. Anyways, hello! I have been diligently working on my project I discussed in my last post when not doing homework, actual work, or contemplating my life decisions while watching Netflix with a bowl of ice cream. I also appear to be in the habit of making the first bit of my blogs a joke; please pardon my sense of humor. The only immediately obvious new feature is that I have tiles wrapping along the HUD panel; that is, if you give it a 2x3 tile sheet, for example, it'll look something like this:
Tumblr media
While this is nice for formatting larger tile sheets, what is not nice is that you cannot scroll down or flip to a new "page" if you have more tiles than one "page" of the HUD can hold. This is one feature that I want to fix immediately, largely because it would mean I could start using royalty free tilesets and stop using my shitty test texture tilesets - thus improving the presentation of my program by... Approximately a lot. In addition, I have been toying with the HUD's transparency to see if it should be a little more transparent/opaque and I really haven't come to a conclusion. If I'm really that concerned I can always add a slider in an options menu for the user to play with. Some other small changes include the addition of specifying the file name/path that you want to export the data to, some crash fixes, and a few efficiency improvements. I'm very intrigued to develop this to work on mobile devices, even if it isn't fully-realized. Obviously this editor is for a specific style of game (although as to what you make of that "style" is entirely up to you), but the ability to use tools on your touch device and then have that work synchronize with your main devices is something I could see being incredibly powerful. Particularly I would like to develop this idea further for Microsoft's devices and utilize OneDrive's capabilities - this is for three reasons, two of them a bit more valid than the other: 1) Most of my devices run Microsoft technology, 2) Nothing against Mac OS or Linux; I just prefer developing for Windows, 3) I feel Microsoft is heading in an excellent direction to realize this idea. There are some interesting caveats to mobile devices that present an interesting challenge (no hotkeys, no mouse button, etc) that I have ideas of how to overcome but would need to test/develop before I could say for certain. This all being said, I think this would be limited to 2D games as there is too much going on both in terms of processing power and necessary features for 3D games. If this is developed to a state I am satisfied with and I manage to port it to mobile devices, I think I will pursue the challenge of bringing more development tools to mobile.
Many thanks for listening to my ramblings, especially towards the end there! -ABadCoder
0 notes
abadcoder · 10 years
Text
Third Time's the Charm?
Alright, round three of trying to get myself to update this blog on a semi-regular basis. At any rate... What I'm currently working on is a [basic] tile editor. Disclaimer: If horrendous artistic talent agitates you, please only view this post in a tranquil, calming environment. You have been warned. First off, some screenshots to act as references: Screenshot #1:
Tumblr media
Screenshot #2:
Tumblr media
Now, perhaps the most obvious difference between #1 and #2 is the sudden disappearance of the very rudimentary HUD. This is done with a simple right-click, allowing the user to quickly and fluently switch between a full view of the map they are editing and to also edit behind the HUD without the need to scroll. The second difference you may notice is that the bright shade of blue in Screenshot #2 is not on my tile textures. And you are correct to notice that. It is the result of the user choosing map dimensions (in the console window) that result in a map smaller than the screen, allowing the user to make even small maps such as perhaps a house or a small room in a dungeon. I'd like this editor to be flexible for just about any sort of tile editing without the need for a poor developer to burn their eyes out staring at and editing 2D arrays. Current functionality allows you to right-click to show/hide the HUD, left-click (you may also hold LMB) to paint your selected tile, and use the arrow keys (with plans to add WASD soon) to scroll across your map, given its bigger than your window. The editor currently exports the map as a 2D array; I want to toy with this some more before saying too much to try to find a method as flexible and simplistic as possible. Plans for future functionality include support for larger spritesheets (this along with toying with the export file are the two things I will do before considering releasing it). I would like to add a zoom/full-map view, multi-layer editing (so you could paint pretty flowers and static buildings on your map, hooray!), and if I'm feeling ambitious, a port to a full Windows Store app (because if you're developing on your mobile device, you're one hardcore gamedev and I salute you). That's it for today methinks. Game on! -ABadCoder
0 notes
abadcoder · 10 years
Text
Three Tips to Help Optimize Your Code.
This may not boost your program's speed tenfold (in fact, some compilers out there already take care of a lot of optimization behind the scenes), but I'm a firm believer in the idea that every bit counts and that knowledge is power. So, without further ado, here are a few tips that may be more or less relevant to my fellow novice programmers: Code Motion ("Precomputation") This is a fairly simple thing to catch. For a simple example, let's say you have a for-loop that reads: for (int i = 0; i < someString.length(); i++) Every time your program runs that loop, it will call someString.length(). The easy solution to this is to define the length just before the loop and store it in a variable: int len = someString.length(); for (int i = 0; i < len; i++) And just like that, you only call someString.length() once! On modern day hardware, this doesn't always make a huge difference (unless you have a humongous string), but for more intensive algorithms - or if the loop happens to be called a lot - there will be a noticeable difference in your program's speed. Share Common Subexpressions Let's say you have a few variables being computed: int i = (q * p) + 1; int j = (q * p) + 2; int k = (q * p) + 3; // etc... Now, it may seem messy to want to add another variable on that list, but it improves program performance if you assign (q * p) to a variable beforehand, so your code reads more like this: int qp = (q * p); int i = qp + 1; int j = qp + 2; int k = qp + 3; // etc... And just like that, you've improved your program's performance. Know Your Language - Row Major or Column Major? This tends to make a big difference if you're working with nested loops and a data structure such as a 2D array. If I said to imagine drawing out a picture of a 2D array, you would imagine it would have n columns and m rows, right? But on computers, a 2D array isn't stored as a rectangle in memory - it's stored as a continuous row of data. Depending on your language, it may store this data with the rows as one giant row (row-major - languages such as C++ and Java), or the columns as one giant row (column-major - languages such as FORTRAN and MATLAB). To illustrate, if we have a 2x2 2D array: a  b c  d This would then be stored as: Row major: a b c d Column major: a c b d Let's say we're working in C (because we're masochists and like low-level languages), which is row-major. If we have a loop such as: // Psuedo-code given a 2D array, arr from i = 0 to 2048     from j = 0 to 2048         arr[i][j] = (i + 1) * (j + 2) This will run noticeably faster than: // j-loop first, then i-loop from j = 0 to 2048     from i = 0 to 2048         arr[i][j] = (i + 1) * (j + 2) And vice-versa for column-major languages. I know this was a long point to illustrate, and it may seem a little jumbled, but it's not too bad - I promise (you may have even worked with nested loops this way prior discovering this). So, with that, hopefully this will help some of you guys looking to fine-tune your code. There are many more ways to optimize your program than this, but I hope the points I discussed are something you can remember and, with any luck, turn into a habit. Happy coding!
0 notes
abadcoder · 10 years
Text
Summer Vacation: Time to Get to Work.
Summer vacation has arrived! Which means I finally can focus on the things I'd like to, rather than having to worry about assignments that force me to build my schedule around them. It also means my sleep schedule is probably going to be all over the place. At any rate, I'm starting to crunch out prototypes for a background, hopefully with a nice bit of parallax. This is the particular background (where the vines would move as separate entities - see attached picture at bottom) I was starting to grow comfortable with using and working on to make something pretty. Now that I've finished my Creative Apps class, I'm fairly certain I'm going to start porting the work I did in AndEngine over to MonoGame.
A quick thing about MonoGame is that, by default, it's using a fixed time step and it syncs the game's refresh rate with the monitor's - this can be resolved simply by adding these lines of code in your game's constructor:
graphics.SynchronizeWithVerticalRetrace = true;
isFixedTimeStep = false;
graphics.ApplyChanges();
Tumblr media
0 notes
abadcoder · 10 years
Text
Want to Make Games? Here are Some Nice Places to Start!
Just a quick post, but while I ramble about my own things, I figured it's only proper to give a shout out to AndEngine and MonoGame (links to both at the end of this post). I've been using both to develop games, and they've both been serving me well - AndEngine is fantastic for Android development, but I really like MonoGame for PC applications. Even more good news is that they're open source, so you're free to contribute to the projects yourself should you so choose. If you're familiar with Java or C# and want to get into game/app development, I highly recommend AndEngine and MonoGame! AndEngine: http://www.andengine.org/ MonoGame: http://www.monogame.net/
0 notes
abadcoder · 10 years
Text
Progress!
Tumblr media
My game's slowly coming a long. One of the harder issues with it is, since it's an Android app and it's in Java, cutscenes are being incredibly irritating. Some of the tiles I've been working on look much smoother than my characters, but many people have told me they prefer the style my characters are in versus that of the tiles.
Thoughts? Regardless, I want to change how the tiles look, but I'm not sure if I should change their style or just make them look better (and fix some alignment issues). Note this is a work in progress, and as always, all work belongs to me.
0 notes
abadcoder · 10 years
Text
Pixels & Sprites!
Since in one of my classes we're developing a mobile app, I suppose it wouldn't be a bad idea to share (since I'm feeling lazy), and what better way to procrastinate than to talk about it? Here I have attached two very large images that will essentially serve as the preview for the characters I'll be allowing the player to use. The game will essentially be a 2D platformer with mechanics that I can't talk about just yet simply because I still need to flesh them out and see what's realistic with my capabilities and what's too far-fetched. All work is copyrighted by myself. You can also find these on my DeviantArt gallery.
Male: http://sheervii.deviantart.com/art/Male-Character-442925852
Tumblr media
Female: http://sheervii.deviantart.com/art/Female-Character-442926081
Tumblr media
0 notes