Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - yam655

Pages: [1] 2 3 4
1
Programming / Re: Lighting Issues
« on: September 27, 2012, 08:47:05 AM »
sorry wasn't having a go, your solution seems the best I just can't use it. I was secretly hoping penguin_buddha would try my idea so he could find any problems with it ahead of me :D i haven't even tried adding lighting yet...I am still stuck on map generator...3 months now. i am slow  :'(

This is why I recommend toolkits with the common functions for folks starting out.

It's a lot easier to stay focused on the work, if the work you're actually doing is sexy. (If not sexy, then at least fundamentally meaningful for your core game idea.)

Basic dungeon generation? Not sexy. (How likely is it that it's going to be the dungeon generation that sets your game apart from others in the genre?)

I'm not saying folks shouldn't also try their hands at writing their own underlying routines, but if it is a choice between a functional-but-not-perfect lighting routine (or what-have-you) that someone else wrote and debugged versus writing my own lighting routine from scratch... Until I got to a point where I thought I could do something fun and unique in a lighting routine, I would focus on the easier parts that have more of a functional bang for their buck.

Cheers,
Steven Black

2
Programming / Blacken 1.1.1 Released (Java Roguelike Library)
« on: September 26, 2012, 11:54:39 PM »
Blacken 1.1.1 was released to address a critical issue with Mac OS X support. Other than functional Mac OS X support there are no significant changes.

Blacken 1.1 Release Announcement

In time for the Annual Roguelike Release Party, we're proud to announce Blacken 1.1, the next major revision of Blacken, a Java library for Roguelike development.

Blacken now uses the Apache 2.0 license.

We now have a user-focused site which includes tutorials you can try out via Java WebStart: https://sites.google.com/site/blackenlib/try-it-out

We're now in Maven Central, so use of Blacken is a matter of adding a few lines to your pom.xml:
<dependency>
  <groupId>com.googlecode.blacken</groupId>
  <artifactId>blacken-core</artifactId>
  <version>1.1</version>
</dependency>

The full release notes are online at: https://sites.google.com/site/blackenlib/current-version/release-notes

Improvements over Blacken 1.0

License change: We used to be GPLed, but now we use the Apache 2.0 license. It can be hard to change licenses on a project. This was done before we accepted any contributions to the codebase. That is, it was the project of a single individual when we changed licenses.

Significant performance improvements: Our display updates were sluggish, though we did our best to work-around it so the response time was okay. With Blacken 1.1 the performance itself is good.

Simpler interface: The native programming interface is no longer so similar to Curses. There is a "CursesLikeAPI" wrapper that adds back the functions that were taken out, but by default the class is smaller and simpler. In particular, the management of the cursor is much simpler.

Some features

Originally Blacken was aiming purely for the user-interface. That's still where it is most complete.

Palette support: Indexed and named colors; mixing indexed colors from the palette with arbitrary 24-bit colors; palette rotation; load custom palettes from files using either our own format or GIMP palettes.

Arbitrarily resizing the window: maintains a "preferred size" changing the font size as needed; Alt-Enter for full screen mode; supports the visually impaired (as long as they can see something) by making it easy to make the font very large.

cell walls: Any cell can have walls on any of the four edges; use it for menus; use it for buttons; use it for zero-width walls where zombies can pull you through windows.

Unicode support: A cell contains a sequence of codepoints; codepoints may be outside of the Basic Multilingual Plane; some of the code-points may be zero-width accents.

Curses-style key input: all key input consists of valid Unicode codepoints; special keys are handled by codepoints in "private use" planes; modifier keys are handled through a prefix character (like Unix systems handle Alt via the Escape character).

Growing support for general Roguelike development: We now have BSP Tree support and Perlin noise.

Focus of next release

The 1.2 release will feature a full featured tutorial including a coffee-break-length Roguelike.

The reason that there's going to be another release, instead of just a tutorial is that we'll be resolving the nits and annoyances that crop up during the creation of the Roguelike. The goal is to shake out the last of the issues that would inconvenience a 7DRL developer.

The goal for the tutorial and the accompanying minor release is Jan 2013.

3
Programming / Re: How to distribute executables with shared libraries?
« on: September 18, 2012, 02:00:23 AM »
Yes thank you. That does work.
I presume in reverse situation, 64bit binary will need to be recompiled for 32bit distros.

Yes, most definitely. That, at least, can be easily tested. Virtual machines are your friend. On a 64-bit host you can have a 32-bit virtual machine. (On a 32-bit machine you cannot have a 64-bit host.) Windows and Mac OS X users can also reasonably build/test for Linux using virtual machines.

For the folks witthout access to a virtual machine, I say: You can install Linux to a USB thumb drive, install additional packages (and remove some of the crap you don't need for focused development), and build/test your program. Since Linux is free, this is doable without needing a separate license or jumping through hoops to get the OS to not freak out whn the underlying hardware changes due to booting it up on a different machine.

Cheers,
Steven Black

4
Programming / Re: How to distribute executables with shared libraries?
« on: September 17, 2012, 06:13:27 PM »
Another newbie thing I'm concerned with is 32vs64bit. I have downloaded Brogue and it's binary is ELF 32bit while I'm compiling and using 64bit library. Obviously I can't run Brogue because it says my libSDL is in wrong ELF class...

Most distributions allow you to install the 32bit libraries in addition to the 64bit ones. Your distribution's wiki probably has an article on how to do that.

That depends on the CPU type. Most 64-bit processors can run 32-bit code -- with the proper 32-bit libraries installed.

Do a: uname -m

If it says: "x86_64" you can run 32-bit "x86" programs without much trouble -- unless your distribution is backwards and isn't supporting that feature. The "x86_64" machine type was, at one time, known as "amd64" as it is an instruction set that originated with AMD.

The Itanium-class of Intel processors are 64-bit but cannot run 32-bit x86 code. They'll return "ia64" for the machine. Most 64-bit home computers are not "ia64" machines.

If you're running on an Itanium machine then you need an "ia64" version of Brogue, and you'll need to cross-compile to create binaries that the rest of the world can use.

32-bit binary support is optional, and to use Brogue, you need to install a 32-bit version of libSDL. I would consult your distro's help forum if it does not seem self-evident from the package manager. (Otherwise, just recompile Brogue.)

Cheers,
Steven Black

5
Programming / Re: How to distribute executables with shared libraries?
« on: September 17, 2012, 02:25:59 PM »
Which is to say:

First: I don't think this is needed at all. Tell a Linux person you need the SDL and it should be distributed by their distribution and they should be able to install it. This gets it on the system LD_LIBRARY_PATH and you don't need to do any work.

Secondly: Look in to "source code obfuscation." You can mask your source while still shipping it. It's useless to fork and is not open-source, but it allows folks to recompile it. You might need to ROT13 the resource files, considering the focus most people have these days on such things. Just remember: even crappy encryption (like ROT13) means a violation of the DMCA if someone shares the monster stats. You can get their site taken down if it is hosted in the US.

ADOM managed to be released as binary for Linux successfully. It is possible, but there are some idiosyncrasies. (You can be hit by memory debug techniques used by default on some distros.) ADOM didn't provide all used libraries, and I remember running ADOM only to find missing library complaints, checking the binary for the libraries it used and installing them. With the tools available for Linux users, such a task is straight-forward.

Cheers,
Steven Black

6
Programming / Re: How to distribute executables with shared libraries?
« on: September 17, 2012, 01:45:12 PM »
Just to clarify, if you compile a standalone binary, you still have to adhere to the SDL's license, which is the LGPL. This means your game has to be licensed under the LGPL or GPL.

That's actually not entirely true. The GPL is a viral license, but the LGPL isn't. That is, if you modify an LGPL'd piece of code, you'll have to release the source under LGPL. If you link to an LGPL'd piece of code, you aren't forced to adhere to the LGPL, and in fact software linking to an LGPL'd piece of code can be closed-source and even commercial.

If it's the LGPL v3 (and not v2) the anti-TiVo-ization clause means that a person needs to be able to recompile the SDL and link it with your precompiled object files. I've seen products shipped this way before. It is far less pretty than a shell script and an external library.

Your source isn't free, but to exercise the freedom of the GPL, they need to be able to re-link it.

Cheers,
Steven Black

7
Programming / Re: Viability of Python
« on: September 14, 2012, 12:42:03 AM »
I wouldn't worry about installers and creating executables at this point. It pays to keep them in mind for the distant future, but that's probably something you would want to tackle after getting something together.

I agree completely. First get something working.

The folks who have issues with running something for a "different" version of Python? Those are the people that benefit from having easy installers. It is a subset of users that is important to get, considering the size of the Roguelike userbase.

When the extensions are readily available for a platform the py2exe/py2app solutions are simple and straight-forward. It's a distraction until things are working -- but if you're familiar with the process it's much faster to spin it up for a new project.

If you're familiar with the process and you've done it for a simple test using the extensions you plan to use beforehand, it is totally doable to have nightly builds for each platform for a 7DRL project. (Especially if you ignore the installers and just ship as ZIP files.)

If it is doable for a 7DRL (seven day Roguelike challenge) it is something you should seriously consider when your project hits the beta stage and you want real players to test it out.

Cheers,
Steven Black

8
Programming / Re: Blacken 1.1 Released (Java Roguelike Library)
« on: September 14, 2012, 12:08:39 AM »
Good info, perhaps the Neon team will contact you to talk shop a bit at the least in the future as, between the pair, these are literally just about the only even roughly overlapping Java-based Roguelike "tools", or at least enablers, out and about trying to make something happen.  Rough break on the licensing complexities as far as crossing streams and whatnot though.

Yeah. I've found a lot can be gleamed just by reading source enough to know where the underlying logic came from and is properly called, though. When you read about a routine and compare a couple implementations it becomes pretty straight-forward to directly adapt the theory (or the canonical representation of the theory -- even in another language) in to usable code.

Neon's use of libraries points me toward those libraries as well. Just because I can't use neon's code, doesn't mean we can't both use libraries -- provided they make sense.

Neon uses a 2D solid object physics model that I could use... (BSD style license.) I just can't wrap my mind around the use-case for such a thing in a Roguelike.

The JTexGen generated texture engine may be useful, but uses the LGPL so it is unsupportable in a WebStart-able closed-source game. (More specifically, it currently uses the LGPL 2.1, so you could use it, but if a later version switches to the LGPL 3 the "anti-TiVo-ization" clause would prevent its use in a closed-source web game.)

It also uses "TinyLAF" which alters the look-and-feel of the standard AWT/Swing controls. That would be something useful for the SquidLib folks more than Blacken. (It's LGPL3 so, as mentioned, the anti-TiVo-ization clause prevents it from being used in a closed-source web game.)

Blacken completely hides the native UI system. The reason for this is simple: All along I've wanted to support multiple UI libraries. Exposing a native UI library ruins this goal.

(But with Blacken 2.0 I hope to have a usable generic Swing panel that could compete with SquidLib directly. I'm all about exposing interchangeable pieces that developers can mix-and-match. Hmm... I should create a ticket to have Blacken support SquidLib for the UI.)

Cheers,
Steven Black

9
Programming / Re: SquidLib: Getting keyboard input
« on: September 13, 2012, 07:00:54 PM »
I've been looking at Squidlib and i'm interested. My only question is whether the library has any build in methods to get keyboard input. As far as I can see, it doesn't. I'm curious how Eben gets input for his games...

My understanding is that it's just a Swing component. As such, you use the standard Swing event mechanism to get key input.

While there are other approaches, you can look at http://docs.oracle.com/javase/6/docs/api/java/awt/event/KeyListener.html

Cheers,
Steven Black

10
Programming / Re: Blacken 1.1 Released (Java Roguelike Library)
« on: September 13, 2012, 06:57:53 PM »
Also, is there any official thinking with regards to the things Blacken has going alongside/in spite of/in addition to/??? the also Java-based Neon project?

http://neon.kosmonet.be/

I've not looked at neon seriously. (I think I glanced at it years ago.) There are some significant core differences.

The biggest one is this: Neon is not a library. Neon is a game system.

Blacken -- while currently a single cohesive artifact -- will eventually be broken up in to a set of artifacts. The idea is that you will have Blacken games which use Swing, some that use JavaFX, and some that run on the Android. There will be a few "core" classes that are always required, there will be optional packages -- both for alternative implementations of things we normally provide, as well as for optional backwards compatibility with older serialized formats.

Also, the neon project has greater library requirements, because it does a lot more. The only library requirements that Blacken has are JUnit (for testing only) and SLF4J+Log4J for optional logging. We don't ship a logging configuration file with the main JAR, so logging is implicitly turned off, but it is handy to be able to get internal log messages when diagnosing strange issues. (Each of the examples have a log4j.properties file enabling logging.)

One of the side-effects of neon being a gaming system and not a library is that you can have a neon game with a different license than the neon project itself. The example neon project will eventually be released under a Creative Commons license and the neon project itself is straight GPL. It would have been a violation of the GPL (had I still been using the GPL) if I wanted to share an example game without also including the source and also releasing it under the GPL. (Since Blacken 1.1 uses the Apache 2 license there are very few restrictions on what needs to be done. Basically, I have a NOTICES.txt file that needs to be presented with your other legal notices. It is short, and there's an API call to get it if you're running via JNLP.)

So, neon is a program that executes data which are games. Blacken is a library that you use write games in Java.

It also means that neon sees the T-Engine as a competitor, while Blacken sees LibTCOD as a competitor.

The Blacken goal is to make the boring parts of Roguelike development easy but basically put zero restrictions on how and where  the code is used. This means that if you're making a 7DRL and you're "violating a fundamental principle of a roguelike" Blacken shouldn't fight you. It might not make it particularly easy, but it should at least stay out of your way. As a consequence, we have BSP Tree code, but we don't force people to use it. Shoot, even though we have a concept of palettes (featuring named and indexed colors and palette rotation) we don't force people to use them -- they can use hard-coded 0xARGB colors instead.

As it stands now we have a generic Grid<Z> class. It's resizable as long as it is square and if it is not resizable it can be arbitrarily shaped. We recently added a "TIM" (Terrain-Item-Monster) cell that contains a triplet of values -- but it's also a generic so you can specify three different classes if you want. The TIM cell approach seems common for quickly implemented Roguelikes, so it should be easy. However, while the TIM approach is common, it is not a requirement. The existing examples use Grid<Integer> for their maps. (The twinkle is handled by palette-rotation -- none of the cells store their color.) In the past once, I implemented a cell that contained a stack of items which were kept in order based upon a "stacking order" in each item. The idea was the stack could be arbitrarily high with any type of "thing" potentially being duplicated and without limit as to what went in it -- so you could both have multiple tiny monsters in the same cell as well as atmospheric effects blowing over.  (I implemented it in Python years ago. It's something I might implement for Blacken, though.)

With neon, a game is written for neon and runs within neon. If you want to use a feature that neon does not  provide, you need to extend neon. You can't easily just mix-and-match for your needs.

Another example: I thought about supporting a text-based data format -- perhaps one compatible with LibTCOD's format. I looked at it and concluded it was similar enough to JSON that I didn't need to do anything. Game developers can pick their preferred JSON library and use that. Blacken is a library to be used alongside other libraries. The game developers have the last word on the libraries they use. (The reason for SLF4J is that the underlying logging backend can easily be swapped out by game developers.)

Since it's another open-source Java project it would be nice if I could adapt code from it to extend Blacken. Since it's using the GPL, though, I can't afford the license pollution. I could create a "blacken-gpl-bits" artifact which separately has a GPL'ed license and exists as a separate project with its own source repository. The difference there would be that if someone used it, they would have to make their game GPLed. It seems easier to use neon code as an example of a technique, do research on the technique and write my own implementation.

Once Blacken's split in to smaller artifacts, it will mean that neon could include some of my artifacts. I can not use any of neon, though.

There's another side-effect of neon being a game system: Things missing in neon are painful, because game developers depend upon neon for all underlying functionality. Things missing from Blacken are simply left to the game developers. Blacken is a 1.x release because as a user-interface library it can be used to make games today. Sure, there are areas where you need to write what should be commonly used code, but if I made a decision you didn't like you would be doing that anyway.

Cheers,
Steven Black

11
Programming / Re: Blacken 1.1 Released (Java Roguelike Library)
« on: September 13, 2012, 05:36:05 PM »
Do you have something like a class diagram for blacken?

Not yet, but I liked the idea so much I'm going to make sure we have one before the end of the year.

If you want to watch the ticket: https://code.google.com/p/blacken/issues/detail?id=43

It should be pretty low-hanging in terms of the amount of work. There are tools specifically designed to do these sorts of things. I'd be surprised if it is more than a single night's work in terms of "find the tool, run the tool, post the output."

I probably won't post to the forums when it is done, so your best bet is to watch that ticket.

Thanks!
Steven Black

12
Programming / Re: How about sound effects? Distracting? Fun?
« on: September 13, 2012, 11:15:20 AM »
Personally, I don't know about sound effects in a turn-based game.

That said, I've thought about music.

Specifically, I've thought about old "module" style music, where you have separate instruments samples from the music pattern. My idea need not have music so much as an atmospheric track where one or more instruments could be swapped out depending on the level or local environment.

In my case, there are Java-based module players, but I want it drivable in a way that most folks creating a Java class wouldn't allow, so I'm probably looking at a fork.

Modules should easily support things like transitions where you change the track without dropping a beat.

If I'm actually forking the code, it's even possible to leverage it to drive ASCII-based "cutscenes" where dialog and grid changes are handled via the track containing music and sound effects.

Cheers,
Steven Black

13
Programming / Blacken 1.1 Released (Java Roguelike Library)
« on: September 12, 2012, 03:47:00 AM »
In time for the Annual Roguelike Release Party, we're proud to announce Blacken 1.1, the next major revision of Blacken, a Java library for Roguelike development.

Blacken now uses the Apache 2.0 license.

We now have a user-focused site which includes tutorials you can try out via Java WebStart: https://sites.google.com/site/blackenlib/try-it-out

We're now in Maven Central, so use of Blacken is a matter of adding a few lines to your pom.xml:
<dependency>
  <groupId>com.googlecode.blacken</groupId>
  <artifactId>blacken-core</artifactId>
  <version>1.1</version>
</dependency>

The full release notes are online at: https://sites.google.com/site/blackenlib/current-version/release-notes

Improvements over Blacken 1.0

License change: We used to be GPLed, but now we use the Apache 2.0 license. It can be hard to change licenses on a project. This was done before we accepted any contributions to the codebase. That is, it was the project of a single individual when we changed licenses.

Significant performance improvements: Our display updates were sluggish, though we did our best to work-around it so the response time was okay. With Blacken 1.1 the performance itself is good.

Simpler interface: The native programming interface is no longer so similar to Curses. There is a "CursesLikeAPI" wrapper that adds back the functions that were taken out, but by default the class is smaller and simpler. In particular, the management of the cursor is much simpler.

Some features

Originally Blacken was aiming purely for the user-interface. That's still where it is most complete.

Palette support: Indexed and named colors; mixing indexed colors from the palette with arbitrary 24-bit colors; palette rotation; load custom palettes from files using either our own format or GIMP palettes.

Arbitrarily resizing the window: maintains a "preferred size" changing the font size as needed; Alt-Enter for full screen mode; supports the visually impaired (as long as they can see something) by making it easy to make the font very large.

cell walls: Any cell can have walls on any of the four edges; use it for menus; use it for buttons; use it for zero-width walls where zombies can pull you through windows.

Unicode support: A cell contains a sequence of codepoints; codepoints may be outside of the Basic Multilingual Plane; some of the code-points may be zero-width accents.

Curses-style key input: all key input consists of valid Unicode codepoints; special keys are handled by codepoints in "private use" planes; modifier keys are handled through a prefix character (like Unix systems handle Alt via the Escape character).

Growing support for general Roguelike development: We now have BSP Tree support and Perlin noise.

Focus of next release

The 1.2 release will feature a full featured tutorial including a coffee-break-length Roguelike.

The reason that there's going to be another release, instead of just a tutorial is that we'll be resolving the nits and annoyances that crop up during the creation of the Roguelike. The goal is to shake out the last of the issues that would inconvenience a 7DRL developer.

The goal for the tutorial and the accompanying minor release is Jan 2013.

14
Programming / Re: Defunct projects (C++)
« on: September 12, 2012, 03:16:31 AM »
You think taking on an existing project will be easier than starting from scratch.

I suspect you will find that's not the case.

Existing source code tends to grow convoluted with time unless the person writing it already refactored the code once or twice to clean it up. To get an example of this, compare the code for Moria with the code for Angband. Moria only had the one spin-off because the codebase isn't clean. Angband has had many spinoffs because -- while it was based upon Moria -- the codebase was refactored and cleaned up.

Roguelikes tend to grow fast while the initial developer is making good progress on implementing cool features. By the time they lose enough steam to abandon the project it is likely -- in part -- due to interesting bugs and hard to debug code.

I wish you luck!

Cheers,
Steven Black

15
Programming / Re: How taboo is the "borrowing" of public domain tiles?
« on: September 11, 2012, 01:33:16 AM »
The folks who make the rltiles project clearly do not understand the meaning of "public domain."

Specifically, first they say the tiles are in the public domain, and then they say they want you to include a license notice.

Problem number one: Public domain varies from country by country and some countries don't have it at all. It would have been better if they'd used a Creative Commons "0" license. http://creativecommons.org/publicdomain/zero/1.0/

Problem number two: Public domain means you're free to use it without attribution. That means there is zero legal requirement to state you got the tiles from the rltiles project.

This means that while it's a dick move to use the tiles without mentioning the rltiles project at all, there is no legal reason for you to do so. Since they say the tileset is in the public domain, they have no legal recourse to make you attribute them.

Personally, my problem with raster tiles is that they're hard to distinguish. (Much harder to distinguish than font glyphs or simple vector tiles.)

Do I care if it's a common tile set or a custom tile set? If you're using a common tile set then it's less likely that I'll miss the two pixels making monster A different than monster B. By that count I have no problem with common tiles.

In general, the cost versus benefit of custom tiles doesn't pan out for smaller Roguelikes. If you've a coffeebreak Roguelike and the only difference between it and any other game is the tiles, you're doing it wrong.

A lot of folks leverage existing tiles. Andor's Trail, an RPG for Android phones, (available at https://play.google.com/store/apps/details?id=com.gpl.rpg.AndorsTrail&hl=en) mentions that it uses some of the tiles from rltiles, in addition to other tiles from other sources.

Focus on the gameplay. If your game plays identically to other Roguelikes it is going to be ignorable regardless of the source of the tiles. If your game play is awesome it is just possible you could get a artist fan who wants to contribute with custom tiles.

Cheers,
Steven Black

Pages: [1] 2 3 4