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.

Topics - durnurd

Pages: [1] 2 3 ... 5
Projects / HTML5 TechnoVenture
« on: 2012-06-02, 11:25:47 PM »
Since I had this laying around and I wasn't doing anything with it, I thought I'd share it.  It's a port of the TechoVenture project that runs on HTML5. This is just a prototype, with pieces to show off the various functions. Dying is not implemented at the moment though.

Off-Topic / New Robot-based game
« on: 2010-12-16, 10:15:32 PM »
I'd like to share a clip of a new robot-themed side-scroller I downloaded today:

Help, Errors, FAQ / Deleting plans at runtime
« on: 2010-10-03, 09:20:17 AM »
I'm curious: why does each map have the plans it has defined as member variables rather than storing them in a list?  The reason I'm asking is because if they were stored in a list, it would make what I'm asking for much easier:  Deleting plans at runtime.  That is, after a plan is finished, remove it from the map so it doesn't even get processed any more.

Another thing that would be nice, if a bit more difficult, would be the ability to specify outside the rules list when a plan should even be considered for execution based on one thing in particular, such as where a specific sprite is (i.e. the player sprite).  If the player sprite is at the top right corner of the map, and the plan only does something if the player sprite is at the bottom left corner of the map, and there are a significant number of plans that depend on the player sprite's location, then it would make sense to partition the plans into sections and check to see which section the player sprite is in and if the player sprite is in a section with plans that depend on this variable, execute those plans, otherwise, they never get ExecuteRules called on them.  This would help because then you don't have to check whether the bounding box of the player sprite and the plan overlap for every single plan that depends on this.

I suppose this could be generalized by something like Plan Groups, or something, where you can group plans together spatially (This could be done manually by the person editing the map, or maybe automatically as a tool that can be run in the map editor) and specify a condition that must be true for any of the plans in that group to be executed (i.e. Sprite is within the plan group's bounds).  A plan group could either be a plan with children plans, or just have its bounding box defined by the union of all of its children plans.

Help, Errors, FAQ / Acessing TouchedTiles
« on: 2010-04-23, 07:45:45 PM »
I have a plan on my map that uses the player's TouchTiles method to interact with tiles inside the plan's area.  I don't want it on the player sprite because it's specific to that area of that map, not something that applies anywhere else.  I then have to get the x,y coordinates of the touched tiles within that map.  To do that, at this point, I have to use:


I could copy this out into a method, but it's not really long enough to warrant it.  So, is there a reason why TouchedTiles is declared as an ArrayList instead of a List<TouchedTile>?  It would get rid of the need to cast it here, and within the SpriteBase code.  If I only make that change in SpriteBase, I can get the above down to this:


It's at least a little better :)

Help, Errors, FAQ / SGDK2 map editor crashing issues
« on: 2010-04-17, 08:48:15 AM »
I know you just said you wanted to release SGDK2.  BUT:

  • There's nothing stopping a user from creating a layer of size 0,0.  Opening the editor for that layer causes the app to repeatedly throw a division-by-zero error and you can't continue.
  • There's no way to re-make the Designer Background layer.  You can't specify nothing for the tileset.
  • On my machine at least, it crashes whenever you try to open a layer editor when another one is already open (or when you try to open an animation preview when a layer editor is open).  Essentially, only one at a time, or it throws the following two errors:

    System.NullReferenceException: Object reference not set to an instance of an object.
       at OpenTK.GLControl.MakeCurrent()
       at SGDK2.Display.OnResize(EventArgs e)
       at ...

    System.ComponentModel.Win32Exception: Error creating window handle.
       at System.Windows.Forms.NativeWindow.CreateHandle(CreateParams cp)
       at System.Windows.Forms.Control.CreateHandle()
       at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
       at System.Windows.Forms.Control.CreateControl()
       at OpenTK.GLControl.ValidateState()
       at ...

On these ones you can continue, just close the other window first and you can re-open the new one and it works fine.  But it's probably something that should be handled.

General Discussion / More issues (Map Editor)
« on: 2010-03-27, 06:40:20 PM »
When editing a map, I can name plans whatever I want, but in the plan editor, when I try to name them, it says only letters, digits, and spaces are allowed.  There's nothing stopping me from putting illegal characters in the plan's name from the map editor.  The same is true of naming static sprite instances.  In my case, I was trying to use colons in the plan names.  Specifically, something like "Message: Entry" "Message: Off Limits" etc.  It would be useful to be able to use colons in plan names, and perhaps replace them with underscores at compile time.

Speaking of which, underscores are perfectly acceptable as far as the compiler was concerned, but the plan editor wouldn't let me put them in as part of the name.

The other thing I wanted to mention is that I really like how I can alphabetize the plans list, and I wish there were a way to do the same with the sprites list.  Manual ordering would also be useful.

General Discussion / Rule List Editor... bug?
« on: 2010-03-27, 11:00:47 AM »
I'm not sure if it would be classified as a bug or just as something that could be improved upon.

If there are more end-ifs than ifs, then a "Empty Stack" message appears, and the build errors appear.  In my case, it was due to an If rule that didn't have a method, so even though the tree looked correct, the If statement was not added to the condition stack, and therefore there was an extra end-if at the end.

My suggestion would be some sort of validation of the rule tree before building to find these errors and point them out visually (i.e. open the tree to their locations and highlight them in red).  That would include any extra end-ifs as well as empty conditional statements, etc.

The easiest solution might be to just have a button on the tool bar that performs the validation separately from building the project, since it was obvious which rule tree was having issues (although I was editing a sprite definition.  I don't know how it would act with plans).  The most user-friendly solution would be to automatically perform validation when building, or perhaps whenever the tree is changed.

The same error showed up when trying to build the project, and when trying to export the code from that rule set, so if validation were to be performed during build, it probably ought to be performed there as well.


A few notes about the message editor:

Resizing horizontally does not move the [...] button.
It might be useful to automatically put quotation marks around the string so that [variable] doesn't show up if you forget.

General Discussion / Suggestion for Plans and Sprites
« on: 2010-03-27, 10:00:37 AM »
It would be great if we could specify the superclass of specific Plans and specific Sprite Definitions.  The options would be from a list of abstract classes that extend from PlanBase and SpriteBase (presumably that do not implement the ExecuteRules method, although this point is contestable).

This way, if some sprites or plans share functionality, it can be in a shared superclass, but not in the base class because not all sprites need it.  It is also possible to override methods in this way, for certain sprites or plans.

My reason for this mainly is that I want a plan that does something exactly once, and if I plan on having an arbitrary number of these, I can't count on map flags to be plentiful enough.  It's easy enough to do, by just adding a boolean to PlanBase, but for two reasons I don't want to.  First, if I put it in PlanBase, I can't reset source code without losing it.  I could put it in a  partial class for PlanBase, but PlanBase is not a partial class itself, which means after I reset the source code, I have to go in and redeclare it as a partial class.  Second, the extra boolean would not be needed for other plans, only those that are to be activated once.

General Discussion / Chipmunk Physics Engine
« on: 2009-05-06, 09:43:31 AM »
Here's a physics engine I found for 2D games:

You definitely need to take a look at some of the videos they have;  Pretty interesting stuff

Help, Errors, FAQ / Various different-sized images
« on: 2009-01-23, 08:16:19 AM »
I've been noticing that I use a lot of different images of different sizes for the same tileset, but for each different size, I have to create a new graphic sheet.

I was thinking that it should be easier to make a single graphic of a specific size without needing to make a whole new graphic sheet.  And maybe combine those together into one graphic set so that they're visible all together when editing the frameset.  It makes sense to be able to define each cell of an animation at the optimum size, and there are other reasons too.

If you take a look at the graphics from Lost Garden, for example.  Look at the Indoor House graphics.  Normal tiles are 40x40 pixels.  Some are 45x40, some are 45x45, and so on, but I still want them to take up the same space as 40x40 images, and I don't want to have to use up two 40x40 cells.

What I was thinking was that each graphic set can be defined like a graphic sheet to start out with, but rather than showing the whole sheet, you could have a navigation tool to move to the next or previous cell, and be able to define cell size individually.

Or have both modes of editing, so you can make images that are 2x2 cells or whatever.

Help, Errors, FAQ / How to dismiss a message?
« on: 2008-12-14, 11:58:29 AM »
I'm trying to display a message when the player is within a plan and presses button 1.  Then, to dismiss it, they press button 1 again.  However, since the player is still in the plan, the message shows up again.  Is there a method to get around this silliness?

I cannot reproduce this error in a blank project, but I can when I'm working on TVSGDK2.  If you want the .sgdk2 file, I can upload it.

Steps to reproduce:

Open SGDK2
Open TVSGDK2.sgdk2
Expand Maps
Expand Level 2
Expand Layers
Expand Foreground
Open Editor
Go to Plans Tab
Click New Plan button
Select the Plan ("Level 2 Plan 1")
Rename it ("Magnet Message")
Scroll down in the map to 76x1984
Enable Snap To Tiles (CTRL+T)
Add plan points at 76x1984 and 192x2000
Click Edit Selected Plan button
Click New Rule
Error shows up: "Exception has been thrown by the target of an invocation."

If you click New Rule again, it will show up again.  Every time you select a rule in that list, it will show up.  Build the project, and it goes away.

Side note: I think it would be a neat idea to automatically name rules based on the function they call if the user didn't add their own name.  Just split the words of the function based on capitalization and use that as the name of the rule (if the current name of the rule is "Rule x" or the name of the previously selected function).  I've seen XCode do something like this when working with layouts for the iPhone.

Help, Errors, FAQ / Converting rules to functions
« on: 2008-12-13, 04:46:31 PM »
Converting a rule to a function throws an exception if the name new rule name already exists (in my case, the rule tree I was replacing had the name, so if I don't create the rule in the wizard, and create it afterward, it works).

Also, when I typed in a rule name that did work, it seemed to re-make the rule tree by the same name, without regard for the fact that that function already existed.

Also also, it seems that it can't find the function once it's created to put in the dropdown list - Note: When I changed the attribute to just [Description] (because it was already imported in the file I put it in) it was able to find it in the list

Help, Errors, FAQ / Virtual size for Short layers?
« on: 2008-09-13, 11:14:53 AM »
I was looking at the code in LayerBase, and noticed that the get method for byte and int layers was:

return (int)(m_Tiles[x % m_nColumns, y % m_nRows]);

but for short it was only:

return (int)(m_Tiles[x,y]);

Same with GetTile and GetTileFrame.  I assume this is an oversight?

Off-Topic / Sourceforge messageboard
« on: 2008-06-10, 07:38:12 AM »
I accidentally clicked on the Sourceforge messageboard link, and noticed that it is full entirely of spam at this point.  Perhaps you should just close it, or delete the spam and make it read only (is that possible?)

Pages: [1] 2 3 ... 5