Author Topic: functionality of sgdk2  (Read 42308 times)

Jam0864

  • Contributor
  • Fanatic
  • **
  • Posts: 744
    • MSN Messenger - marmalade0864@hotmail.com
    • View Profile
    • Jam0864's Content Dump
    • Email
Re: functionality of sgdk2
« Reply #15 on: 2007-02-16, 08:08:22 PM »
I was wondering if solidity is done by the sprites tile or the non-transparent pixels.

bluemonkmn

  • SGDK Author
  • Administrator
  • Fanatic
  • *****
  • Posts: 2761
    • ICQ Messenger - 2678251
    • MSN Messenger - BlueMonkMN@gmail.com
    • View Profile
    • http://sgdk2.sf.net/
    • Email
Re: functionality of sgdk2
« Reply #16 on: 2007-02-17, 02:00:45 PM »
The interaction between a sprite and a tile is calculated by comparing the solid area of the sprite (a rectangle defined by the sprite's solid width and solid height) against the shape of the tile (which can be all the shapes from GameDev 1.x plus a few more, and you can define your own too).  The collision between two sprites can be based either on the solid rectangle of the sprites or on pixels of the sprites beyond a specified alpha level (up to the user).

Jam0864

  • Contributor
  • Fanatic
  • **
  • Posts: 744
    • MSN Messenger - marmalade0864@hotmail.com
    • View Profile
    • Jam0864's Content Dump
    • Email
Re: functionality of sgdk2
« Reply #17 on: 2007-02-18, 02:24:55 AM »
I just tried editing the SHFL example project. This is really cool!  ;D  Ladders and springs were placed by putting down a tile.  :) This is much easier than in SGDK1, where you'd need a lot of special functions and a sprite for each ladder or spring. I expanded the map and added a few extra spots to go.  ;) I tried changing the scrolling parameters for the map. Much better than before, you could change individual scrolling parameters for each side of the screen. I did some other stuff too but they were little things and I can't really remember them. Nice work this is looking really good.  :D

bluemonkmn

  • SGDK Author
  • Administrator
  • Fanatic
  • *****
  • Posts: 2761
    • ICQ Messenger - 2678251
    • MSN Messenger - BlueMonkMN@gmail.com
    • View Profile
    • http://sgdk2.sf.net/
    • Email
Re: functionality of sgdk2
« Reply #18 on: 2007-02-19, 06:58:49 AM »
Glad that you're getting a chance to play around with it, and that it's working out well for you.  There is indeed a lot of new stuff to explore.  If you're feeling adventurous, you could start looking into the rule systems (Sprite Definitions and Plans) and maybe even the source code to see what adjustments, modifications, or even new developments you can come up with there.  Springs work by a bit of custom code.  Obviously not every game in going to have springs in it, and there is no intrinsic support for springs in SGDK2, but if you look at (I think) the source code objects, you will find the custom code that was added to this project in particular to make specific tiles behave like springs.  But you can still have plenty of fun without getting into the source code, too.

Jam0864

  • Contributor
  • Fanatic
  • **
  • Posts: 744
    • MSN Messenger - marmalade0864@hotmail.com
    • View Profile
    • Jam0864's Content Dump
    • Email
Re: functionality of sgdk2
« Reply #19 on: 2007-02-20, 02:48:07 AM »
Yeh, I plan on trying to make something with SGDK2 in the near-future. I've got a question. Will it be possible to play an SGDK2 game in an internet browser?

bluemonkmn

  • SGDK Author
  • Administrator
  • Fanatic
  • *****
  • Posts: 2761
    • ICQ Messenger - 2678251
    • MSN Messenger - BlueMonkMN@gmail.com
    • View Profile
    • http://sgdk2.sf.net/
    • Email
Re: functionality of sgdk2
« Reply #20 on: 2007-02-20, 05:49:42 AM »
SGDK2 cannot currently play in a browser as far as I know.  However, the architecture is such that it should be possible because its games are .NET programs in a single file, which would work well for a download-able component in a browser, but there appear to be security issues related to accessing DirectX and/or some other activities that the generated games perform.  If someone wants to investigate what would be necessary (what would need to change) to make the games playable in a browser, I would be interested in collaborating on implementing features to support this, though.

durnurd

  • Lead Lemming
  • Expert
  • Fanatic
  • *****
  • Posts: 1234
  • Games completed so far: 0
    • MSN Messenger - durnurd@hotmail.com
    • View Profile
    • Find My Ed
Re: functionality of sgdk2
« Reply #21 on: 2007-02-20, 11:20:52 AM »
There are ways to compile a .NET project as a COM-visible DLL, which can then be used as an ActiveX object in an <object> tag in a web page with classid="Filename.dll#namespace.classname".  It would take a bit of reworking of the underlying code for the Project and the GameWindow especially.  But it can be done, I think.  It would only work for Internet Explorer, since Firefox doesn't support ActiveX controls, but it's a start.  Because there are also ways to embed COM components within Java programs, which Firefox is able to run.  So you could use the Java framework to allow Firefox to access the .NET framework to get something up and running in most browsers.  Maybe. I'm not sure of how the DirectX would behave.
Edward Dassmesser

bluemonkmn

  • SGDK Author
  • Administrator
  • Fanatic
  • *****
  • Posts: 2761
    • ICQ Messenger - 2678251
    • MSN Messenger - BlueMonkMN@gmail.com
    • View Profile
    • http://sgdk2.sf.net/
    • Email
Re: functionality of sgdk2
« Reply #22 on: 2007-02-20, 09:18:52 PM »
I think the security issues with COM are worse than those of .NET.  If you want to just ignore security, there are probably better ways to do that without resorting to COM.  I'd hate to resort to the quagmire of COM for such a nice, clean application.

durnurd

  • Lead Lemming
  • Expert
  • Fanatic
  • *****
  • Posts: 1234
  • Games completed so far: 0
    • MSN Messenger - durnurd@hotmail.com
    • View Profile
    • Find My Ed
Re: functionality of sgdk2
« Reply #23 on: 2007-02-20, 11:41:26 PM »
Well, it's the only (well, first) thing I can think of to embed it into an HTML file.  And it's not really COM, it's just COM-visible, but the security is still based on the .NET execution permissions.  I got a simple app to work earlier today, and I just had to add http://(domain.tld)/* to the .NET permissions to get it to work.

Of course, it would be annoying if everybody had to do that just to play the game.
Edward Dassmesser

bluemonkmn

  • SGDK Author
  • Administrator
  • Fanatic
  • *****
  • Posts: 2761
    • ICQ Messenger - 2678251
    • MSN Messenger - BlueMonkMN@gmail.com
    • View Profile
    • http://sgdk2.sf.net/
    • Email
Re: functionality of sgdk2
« Reply #24 on: 2007-02-21, 06:31:09 AM »
What if you add the URL to your trusted sites?  If that's not enough, what if you then add a permission to allow .NET code from trusted sites to run with more permission (which I believe is one of the rule types you can set up in the .NET configuration)?

durnurd

  • Lead Lemming
  • Expert
  • Fanatic
  • *****
  • Posts: 1234
  • Games completed so far: 0
    • MSN Messenger - durnurd@hotmail.com
    • View Profile
    • Find My Ed
Re: functionality of sgdk2
« Reply #25 on: 2007-02-21, 08:45:24 AM »
I added the URL to trusted sites, which was already in the .NET permissions list with "Internet" permissions, which is not enough to run SGDK2, I'm betting.  It came up with the usual security error.  Changing the Trusted Sites permissions to full-trust worked, but then somebody still has to change .NET permissions.
Edward Dassmesser

bluemonkmn

  • SGDK Author
  • Administrator
  • Fanatic
  • *****
  • Posts: 2761
    • ICQ Messenger - 2678251
    • MSN Messenger - BlueMonkMN@gmail.com
    • View Profile
    • http://sgdk2.sf.net/
    • Email
Re: functionality of sgdk2
« Reply #26 on: 2007-02-21, 05:23:12 PM »
I would do this myself, but I'm working on many other things of course, so I'll pass the question along to you again in case you have an interest in looking into it further :)
By compiling it in debug mode (or through any other means you can think of) can you determine why it's complaining?  What causes the security exception?
Are you trying to run SGDK2 itself or a generated project.  I'm thinking a generated project would be a good thing to try.

durnurd

  • Lead Lemming
  • Expert
  • Fanatic
  • *****
  • Posts: 1234
  • Games completed so far: 0
    • MSN Messenger - durnurd@hotmail.com
    • View Profile
    • Find My Ed
Re: functionality of sgdk2
« Reply #27 on: 2007-02-21, 06:41:26 PM »
Oh, yeah, I was trying SHFL at the time, not SGDK2.  Details:

The action that failed was:
InheritanceDemand
The type of the first permission that failed was:
System.Security.Permissions.SecurityPermission
The Zone of the assembly that failed was:
Trusted

I have also found that turning the GameForm into a user control instead of a Windows Form presents some problems with specifically the keyboard.SetCooperationLevel, among other things.  When commenting out the keyboard line, the other main problem is that when adding a GameForm to a Windows form, the Windows form doesn't even show up.  I've only tried a few quick hacks to get it to work so far, but nothing has worked yet.
Edward Dassmesser

Jam0864

  • Contributor
  • Fanatic
  • **
  • Posts: 744
    • MSN Messenger - marmalade0864@hotmail.com
    • View Profile
    • Jam0864's Content Dump
    • Email
Re: functionality of sgdk2
« Reply #28 on: 2007-02-22, 01:26:51 AM »
Durnurd, do you have internet explorer 6 or 7? It might have a different result.

bluemonkmn

  • SGDK Author
  • Administrator
  • Fanatic
  • *****
  • Posts: 2761
    • ICQ Messenger - 2678251
    • MSN Messenger - BlueMonkMN@gmail.com
    • View Profile
    • http://sgdk2.sf.net/
    • Email
Re: functionality of sgdk2
« Reply #29 on: 2007-02-22, 06:15:15 AM »
Strange.  Well, keep hacking if you have the time.  It'd be interesting to know how close we are to allowing SGDK2 projects to run on the web.  Also, do you know if .NET controls can be embedded in FireFox?