Re: [Ohrrpgce] Achievement implementations

2021-10-28 Thread Simon Bradley
I thought Steam had a system where you could update user statistics on
Stream and it could automatically award achievements when they reach a
specific value? I might be imagining that, or getting it confused with some
other achievement system. I don't know if you'd need to save anything
locally for cross-save counters, I think you could just increment a count
on steam.

On Thu, 28 Oct 2021 at 15:08, Mike Caron  wrote:

> ​The tag_updates function is the place to put hooks for when a tag
> changes.
>
> I assumed there might be a place like that. Thanks!
>
> If achievements are displayed through steam, how does this work? You
> can cause Steam to popup a progress notification with text of your
> choice? Or does it have to be numerical, or predefined in Steam's
> achievement editor?
>
> ​You can just tell it to display progress whenever you want, I believe. I
> was thinking that we would just do this whenever "value % interval == 0".
>
> What about achievements that can be progressed towards in separate
> saved games? The example you put on the wiki of finding all the ways
> to die is one where progress needs to be shared rather than
> save-specific.
>
> ​I was envisioning a game where these deaths were not
> game-over-and-reloading-your-last-save inducing, but I suppose that's not
> clear. I am not sure how we might want to handle cross-save achievements.
> Part of me wants to not handle it at all and let game creators do that
> themselves (if or when custom IO is a thing), but it also wouldn't be
> *Too*​ hard to add it now either. On the third hand, I suspect this is a
> rather more niche feature, so maybe we can just punt the issue down the
> road a bit.
>
> Creating an editor for RELOAD-based data is not yet simple, but I'm
> going to make a start on generalising the Purchases editor (most
> likely) into a class for defining editable RELOAD trees.
>
> Neat. I haven't actually looked too hard into what editors look like these
> days so I'm not sure how bad "not yet simple" is, but if there's anything I
> can do to help, please let me know.
>
> Pleased that documentation already exists on the wiki, documenting
> everything is a big task!
>
> ​If I had to pick one lesson that I've learned over the years, it's that
> documenting things first makes implementation easier. It's keeping that
> documentation up to date that is the challenge 
>
> --
> *From:* Ohrrpgce  on behalf of
> Ralph Versteegen 
> *Sent:* October 28, 2021 6:24 AM
> *To:* ohrrpgce 
> *Subject:* Re: [Ohrrpgce] Achievement implementations
>
> This is going quick!
>
> The permanent data storage you're looking for is
> https://rpg.hamsterrepublic.com/ohrrpgce/Persist.reld
>
> The tag_updates function is the place to put hooks for when a tag changes.
>
> > A game may wish to expose the current progress at intervals ("defeat 100
> goblins: 20/100") to motivate the player to continue progresing the
> achievement.
>
> If achievements are displayed through steam, how does this work? You
> can cause Steam to popup a progress notification with text of your
> choice? Or does it have to be numerical, or predefined in Steam's
> achievement editor?
>
> What about achievements that can be progressed towards in separate
> saved games? The example you put on the wiki of finding all the ways
> to die is one where progress needs to be shared rather than
> save-specific.
>
> Creating an editor for RELOAD-based data is not yet simple, but I'm
> going to make a start on generalising the Purchases editor (most
> likely) into a class for defining editable RELOAD trees.
>
> Pleased that documentation already exists on the wiki, documenting
> everything is a big task!
>
> On Thu, 28 Oct 2021 at 14:03, Mike Caron  wrote:
> >
> > Hello friends, sorry I’m late. Got sidetracked with a few things 
> >
> >
> >
> > As I’ve been discussing with TMC on the Slime Salad discord, I’m working
> on adding achievements and Steamworks support to the OHRRPGCE. This is
> based on a post TMC made here just about three years ago:
> http://lists.motherhamster.org/pipermail/ohrrpgce-motherhamster.org/2018-October/004308.html
> >
> >
> >
> > I’ve currently made progress on integrating Steamworks itself, thanks in
> no small part to TMC helping me get my environment set up, and now I’m
> thinking about how this stuff will work in the engine itself. I’ve been
> documenting stuff on the wiki, and I would encourage everyone to take a
> peek and give any feedback they have. Note that this page is not complete,
> and suggestions to fill in blanks would be appreciated.
> >
> >
> >
> > https://rpg.hamsterrepublic.com/ohrrpgce/User:Pkmnfrk/Achievements
> >
> >
> >
> > I’m hopeful to get this implemented soon, so I can get back to my next
> 13 year hiatus.
> >
> >
> >
> > Cheers!
> >
> > --
> >
> > Mike Caron
> >
> >
> >
> > ___
> > Ohrrpgce mailing list
> > ohrrpgce@lists.motherhamster.org
> > 

Re: [Ohrrpgce] Multiple joysticks, multiplayer, and control remapping

2021-04-16 Thread Simon Bradley
I've been thinking about this sort of stuff in another context recently (I
just wrote my first hobby game in more than a decade, for a jam on itch.io
- it's here if you want to take a look:
https://drnefario.itch.io/eye-of-gath - I'm getting my mojo back after
working from home for more than a year.)

Most of the time, for a single-player game, you want a coalesced input that
has maybe been abstracted to an action. You don't care whether it was a
d-pad up or an arrow-key up, you just want an up. And you also don't want
to move twice as fast if you press both.

Even if you want to treat controllers as belonging to separate users, you
quite often want to be able allow a player to have more than one input
device, such as mouse and keyboard, or controller and touchscreen, or some
such. It seems to be an Xbox thing to tie user accounts to a specific
controller, but even there you must be able to add other non-controller
input sources somehow. The xbox supports usb keyboards, I think.

Note that I did work on an AppleTV project a while ago where we did need to
be able to treat two controllers as a single user: the Siri Remote is
treated as a controller, and you have to expect someone to be using the
remote to launch apps while they use their game controller inside the
games. It's a bit of a weird edge case, though.

Cheers,
Simon

On Fri, 16 Apr 2021 at 14:05, Ralph Versteegen  wrote:

> I've been working through (especially in gfx_sdl2) gamepad bugs and
> unfinished features (none of which made it to github) and now I've only got
> handling of multiple gamepads left to improve. For better joystick
> numbering I'm thinking forwards to local multiplayer, remappable controls,
> ohrkeys joystick support, and even simple remote multiplayer via input
> forwarding.
>
> Currently a number of commands (keyval, keyispressed, keypress,
> newkeypress, joystickbutton, joystickaxis, getjoystickname,
> joystickbuttoncount, joystickaxiscount, joystickhatcount) take the joystick
> number as an extra argument. But there are lots of problems with this:
> -if there are multiple joysticks on the system you would have to loop
> through all of them to figure out which one the player is using
> -I added getnumjoysticks recently but it's undocumented
> -in gfx_sdl2 and gfx_directx joysticks can get renumbered if any are
> removed or even added (not possible in gfx_sdl anyway)
> -the joystick number is currently ignored for control keys like usekey
> (It's also ignored for keyboard scancodes), instead all inputs joysticks
> are OR'd
>
> But I used rpgbatch to scan the gamelists and there was only a single game
> that made use of the joystick number arg, Porosis on SS, which erroneously
> contains "key is pressed(key:A,true)". "joystick axis" wasn't used either
> (though Blood Ledger and inputtest.rpg now use it.)
>
> Further, I want to let people define additional keys to usekey, menukey,
> etc. (I think we could break convention and export these to the hsi as
> "shootkey", "runkey",  etc. for a form of consistency, since there will be
> little difference between builtin and additional controls.) So instead of
> hardcoding e.g. a charge-up action to the joy:Y button you'd define a
> "charge key" with some default mappings which can then be changed by either
> a scripted or future builtin control mapping menu.
>
> SDL2 has functions to get/set the player number for each joystick/gamepad.
> At most one joystick can be assigned to a player, which is a reasonable
> limitation. On most platforms these functions don't really do anything, but
> on consoles they report the actual player number and apparently some
> consoles have coloured LED lights to indicate which controller is each
> player.
>
> So it occurred to me that we should repurpose the 2nd arg to all those
> commands as the *player number* rather than the joystick number. Each
> player has at most one joystick and keyboard (and in future mice could also
> gain a player number arg) but note that a player might have no joystick,
> just a keyboard. I suggest that players are numbered from 1 up, which is
> less confusing, and the default player=0 (which is also used by all builtin
> controls) can just be all input from all control devices OR'd together so
> if you have multiple gamepads all existing games will just work. There
> could be a command to instead set a specific player as the default, e.g.
> for local or remote multiplayer where you want just one player to control
> the hero/menus.
>
> If you want to change which player a device is assigned to that might be
> tricky if there are no commands to enumerate joysticks, but we could have a
> command such as "swap player gamepads(player A, player B)"
> ___
> Ohrrpgce mailing list
> ohrrpgce@lists.motherhamster.org
> http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org
>
___
Ohrrpgce mailing list
ohrrpgce@lists.motherhamster.org

Re: [Ohrrpgce] H codename?

2020-06-30 Thread Simon Bradley
I never actually left the mailing list, for some reason. It was interesting
to keep an eye on developments even though I am way out of touch. I haven't
had a decent PC at home for over a decade, but I do now have one again, so
maybe I should think about a return.

I don't mind Hurdygurdy, although it will always remind me of the Butthole
Surfers cover of the Donovan song Hurdy Gurdy Man. I quite like the sound
of Hullabaloo.

On Tue, 30 Jun 2020 at 14:00, Ralph Versteegen  wrote:

> Wow, hi Simon! Very surprised. Hope you're doing cool things and well.
>
> The suggestions were, for reference
> https://www.slimesalad.com/forum/viewtopic.php?p=137186#137186
>
> On Wed, 1 Jul 2020 at 00:34, Simon Bradley  wrote:
>
>> I vote for Hatstand.
>>
>>
>> On Tue, 30 Jun 2020 at 13:30, Ralph Versteegen 
>> wrote:
>>
>>> Well, must Hróðvitnir be excluded? As a bit of a prank :) I'm more
>>> concerned that I can't pronounce it :)
>>> (Aside, I hear Fenrir has finished Vikings and is just working through
>>> changes based on playtester feedback.)
>>>
>>> I... hadn't actually properly looked into what kind of instrument hurdy
>>> gurdys are. They're awesome! Would the spelling "hurdy-gurdy" be acceptable?
>>>
>>> On Tue, 30 Jun 2020 at 22:40, James Paige 
>>> wrote:
>>>
>>>> I kept forgetting we need to pick the H codename
>>>>
>>>> My favorites:
>>>> Hurdygurdy
>>>> Harengiform
>>>> Humgruffin
>>>>
>>>>
>>>> I also do like Fenrir's "Hróðvitnir" but I do feel like the accents are
>>>> a dealbreaker.
>>>>
>>>> I think "hurdygurdy" was the name with the most seconds on the forum.
>>>>
>>>> ---
>>>> James Paige
>>>>
>>>>
>>>>
>>>> ___
>>>> Ohrrpgce mailing list
>>>> ohrrpgce@lists.motherhamster.org
>>>> http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org
>>>>
>>> ___
>>> Ohrrpgce mailing list
>>> ohrrpgce@lists.motherhamster.org
>>> http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org
>>>
>> ___
>> Ohrrpgce mailing list
>> ohrrpgce@lists.motherhamster.org
>> http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org
>>
> ___
> Ohrrpgce mailing list
> ohrrpgce@lists.motherhamster.org
> http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org
>
___
Ohrrpgce mailing list
ohrrpgce@lists.motherhamster.org
http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org


Re: [Ohrrpgce] H codename?

2020-06-30 Thread Simon Bradley
I vote for Hatstand.


On Tue, 30 Jun 2020 at 13:30, Ralph Versteegen  wrote:

> Well, must Hróðvitnir be excluded? As a bit of a prank :) I'm more
> concerned that I can't pronounce it :)
> (Aside, I hear Fenrir has finished Vikings and is just working through
> changes based on playtester feedback.)
>
> I... hadn't actually properly looked into what kind of instrument hurdy
> gurdys are. They're awesome! Would the spelling "hurdy-gurdy" be acceptable?
>
> On Tue, 30 Jun 2020 at 22:40, James Paige  wrote:
>
>> I kept forgetting we need to pick the H codename
>>
>> My favorites:
>> Hurdygurdy
>> Harengiform
>> Humgruffin
>>
>>
>> I also do like Fenrir's "Hróðvitnir" but I do feel like the accents are a
>> dealbreaker.
>>
>> I think "hurdygurdy" was the name with the most seconds on the forum.
>>
>> ---
>> James Paige
>>
>>
>>
>> ___
>> Ohrrpgce mailing list
>> ohrrpgce@lists.motherhamster.org
>> http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org
>>
> ___
> Ohrrpgce mailing list
> ohrrpgce@lists.motherhamster.org
> http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org
>
___
Ohrrpgce mailing list
ohrrpgce@lists.motherhamster.org
http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org


Re: [Ohrrpgce] [ohrrpgce:bugs] #2017 When Android port is compiled with debug=0 battles crash the whole app at the end of any attack

2016-01-27 Thread Simon Bradley
Buzz Aldrin?

(Yeah, I'm still on this list. :) I dread to think how long it is since I
last did any work on the project.)

On 26 January 2016 at 11:14, TeeEmCee  wrote:

> Wonferful. You ovelooked this line in the log:
> 01-25 08:19:39.838 200 200 F DEBUG : signal 7 (SIGBUS), code 1
> (BUS_ADRALN), fault addr 0x9fc7106a
>
> BUS_ADRALN clearly means misaligned address.
>
> Funny, as soon as I read that this was related to attacks I guessed this
> had to do with the animation stack. On a little inspection, it's obvious
> what the problem is: the stack contains a mix of 32 bit and 16 bit values,
> leading to misalignment (until only a few months ago it only had 16 bit
> values). I'm not sure why it doesn't crash with debug=2, but it might be
> that temporarily storing the pointer in another variable causes different
> instructions to be emitted which can tolerate unaligned access.
>
> Anyway the solution is easy: I replaced each popw/pushw with popdw/pushdw,
> and simplified the stack code. But I managed to break battles.Can't figure
> out what I've done wrong, will try again later.
> --
>
> * [bugs:#2017]  When Android
> port is compiled with debug=0 battles crash the whole app at the end of any
> attack*
>
> *Status:* open
> *Milestone:* OHRRPGCE
> *Created:* Sun Jan 24, 2016 04:22 AM UTC by Bob the Hamster
> *Last Updated:* Mon Jan 25, 2016 04:23 PM UTC
> *Owner:* nobody
>
> The Wobbler noticed a serious bug in the Android port. It seems that when
> it is compiled with debug=0 the battles always crash at the end of the
> first attack.
>
> I have no idea why this is happening, but I temporarily went back to
> compiling with debug=2 for Android games that use the battle system until
> we figure out what is going on.
>
> Here is a copy of Wandering Hamster build with debug=0 that reproduces the
> crash http://hamsterrepublic.com/tmp/wandering-hamster-crash.apk
> --
>
> Sent from sourceforge.net because ohrrpgce@lists.motherhamster.org is
> subscribed to https://sourceforge.net/p/ohrrpgce/bugs/
>
> To unsubscribe from further messages, a project admin can change settings
> at https://sourceforge.net/p/ohrrpgce/admin/bugs/options. Or, if this is
> a mailing list, you can unsubscribe from the mailing list.
>
> ___
> Ohrrpgce mailing list
> ohrrpgce@lists.motherhamster.org
> http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org
>
>
___
Ohrrpgce mailing list
ohrrpgce@lists.motherhamster.org
http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org


Re: [Ohrrpgce] Java help needed

2013-07-17 Thread Simon Bradley
You can use Class.forName(com.ouya.whatever); to check whether a class
exists.

Also if you compile it with the libs but never actually call that code, it
will still run on a device that doesn't have the jars.

I think.

On Wed, Jul 17, 2013 at 3:33 PM, James Paige b...@hamsterrepublic.comwrote:

 I am working on getting access to the OUYA ODK from sdl-android. I have
 figured out that I need to copy the *.jar files from the ODK into
 project/libs

 Then I managed to write code in project/java/MainActivity.java which
 uses the ODK, just enough to do the detection of whether or not the
 currently running Android device is an OUYA console. Together with
 connecting code in project/java/Video.java and
 project/jni/sdl-1.2/src/video/android/SDL_androidvideo.c and in the
 ohrrpgce's gfx_sdl.bas I was able to test it, and it works nicely.

 This makes me feel good because I know that support for in-app purchases
 is now a realistic goal.

 However, I notice that if the ODK *.jar files are NOT copied into
 project/libs then the whole project will not even build.

 Failure to locate the Java class tv.ouya.console.api.OuyaFacade is a
 compile-time error, not a runtime error.

 If this was python, I would simply be wrapping it in a try/except and I
 could easily make the isRunningOnOUYA() function gracefully fail when
 the needed jars are not found. It could just log a warning and return
 false.

 Does anybody know that Java way to do runtime-checking for whether or
 not an external class is available?

 ---
 James
 ___
 Ohrrpgce mailing list
 ohrrpgce@lists.motherhamster.org
 http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org

___
Ohrrpgce mailing list
ohrrpgce@lists.motherhamster.org
http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org


Re: [Ohrrpgce] SVN: james/5846 Android: remap the Back button to ESCAPE instead of SPACE

2013-07-10 Thread Simon Bradley
At work, we tend to make the back button go back up the menu hierarchy and
then completely exit the game when we get to the top.

During gameplay, I think it just toggles pause and unpause, but sometimes
it will pause, quit to frontend, then continue as above.

So yes, pretty much the same as ESC.

On Wed, Jul 10, 2013 at 4:47 PM, James Paige b...@hamsterrepublic.comwrote:

 Honestly, I have never pressed the back button once on any app other
 than the web browser. I know I should be testing it, but it is really
 hard to remember it even exists on any of my devices except the ouya.

 I was talking to some people in #kivy and I was getting the impression
 from them that games handle it a little inconsistently, but that going
 to a menu, and terminating the program from the title screen are both
 desireable responses to the back button.

 The back button and our use of the ESC key seems like a good match, but
 I will make an effor to test the back button out in a bunch of humble
 bundle games and I'll report back about it later.

 On the OUYA, the back button is the Menu button, and it pauses the game
 and opens either a game menu or a quit/cancel confirmation.

 double-tapping the OUYA menu button seems to be the same as the Home
 button on other android devices.

 On Thu, Jul 11, 2013 at 03:37:57AM +1200, Ralph Versteegen wrote:
  How do other games handle the back button? Do any of them pause and
  background the game if you're not in any submenu... would that be
  sensible?
 
  On 11 July 2013 02:33,  subvers...@hamsterrepublic.com wrote:
   james
   2013-07-10 07:33:10 -0700 (Wed, 10 Jul 2013)
   58
   Android: remap the Back button to ESCAPE instead of SPACE
   ---
   U   wip/android/AndroidAppSettings.cfg
   ___
   Ohrrpgce mailing list
   ohrrpgce@lists.motherhamster.org
   http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org
  ___
  Ohrrpgce mailing list
  ohrrpgce@lists.motherhamster.org
  http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org
 
 ___
 Ohrrpgce mailing list
 ohrrpgce@lists.motherhamster.org
 http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org

___
Ohrrpgce mailing list
ohrrpgce@lists.motherhamster.org
http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org


Re: [Ohrrpgce] Android port

2013-06-06 Thread Simon Bradley
On Thu, Jun 6, 2013 at 3:22 PM, James Paige b...@hamsterrepublic.com wrote:

 On Thu, Jun 06, 2013 at 01:28:10PM +1200, Ralph Versteegen wrote:
  On 6 June 2013 02:19, James Paige b...@hamsterrepublic.com wrote:
 
   For people who don't have their own domain name, we can provide a
   namespace like com.hamsterrepublic.ohrrpgce.games.gamename but I would
   also like to allow people to specify their own namespaces, so for your
   own game, tmc, you might choose to use
   com.castleparadox.tmc.foresttemple or maybe Mogri would want to use
   com.slimesalad.phantomtactics or Harlock might use
   org.crithit.spellshard
 
  Is there any point to allowing customisation of namespace? I think it
  just has to be unique, eg a com.hamsterrepublic.ohrrpgce.games.
  prefix.
  I see that the Android documentation says To avoid conflicts with
  other developers, you should use Internet domain ownership as the
  basis for your package names (in reverse).

 Well, from a making-things-work perspective, no, there is no point to
 allowing people to specify their own namespaces, but from the
 perspective of people signing their own games and uploading them to the
 google play store, I would like to give people that option, especially
 for people who are going to sell their games rather than post them as
 free apps.

 Someone can still sell their game with a name in the
 com.hamsterrepublic.ohrrpgce.games.* namespace, but by doing so the are
 trusting me as the owner of that domain to behave honorably about it :)


The simplest way would presumably be to make the ohrrpgce a library project
and wrap it with the new namespace, I think:

package com.newnamespace.myrpg;

public class MainActivity extends com.ohrrpgce.games.OHRActivity

etc.

I believe that would work. That seems to be how these examples I am looking
at are set up.

(I am actually working on an Android project right now for my day job, but
it's been a while and I'm a bit rusty. And someone else has already written
it; I'm just changing it.)

Cheers,
Simon
___
Ohrrpgce mailing list
ohrrpgce@lists.motherhamster.org
http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org


Re: [Ohrrpgce] Android port

2013-06-06 Thread Simon Bradley
On Thu, Jun 6, 2013 at 4:44 PM, James Paige b...@hamsterrepublic.com wrote:

 On Thu, Jun 06, 2013 at 04:16:32PM +0100, Simon Bradley wrote:
 On Thu, Jun 6, 2013 at 3:22 PM, James Paige b...@hamsterrepublic.com
 wrote:
 
   On Thu, Jun 06, 2013 at 01:28:10PM +1200, Ralph Versteegen wrote:
On 6 June 2013 02:19, James Paige b...@hamsterrepublic.com
 wrote:
   
 For people who don't have their own domain name, we can provide
 a
 namespace like com.hamsterrepublic.ohrrpgce.games.gamename but I
   would
 also like to allow people to specify their own namespaces, so
 for
   your
 own game, tmc, you might choose to use
 com.castleparadox.tmc.foresttemple or maybe Mogri would want to
 use
 com.slimesalad.phantomtactics or Harlock might use
 org.crithit.spellshard
   
Is there any point to allowing customisation of namespace? I
 think it
just has to be unique, eg a com.hamsterrepublic.ohrrpgce.games.
prefix.
I see that the Android documentation says To avoid conflicts with
other developers, you should use Internet domain ownership as the
basis for your package names (in reverse).
 
   Well, from a making-things-work perspective, no, there is no point
 to
   allowing people to specify their own namespaces, but from the
   perspective of people signing their own games and uploading them to
 the
   google play store, I would like to give people that option,
 especially
   for people who are going to sell their games rather than post them
 as
   free apps.
 
   Someone can still sell their game with a name in the
   com.hamsterrepublic.ohrrpgce.games.* namespace, but by doing so the
 are
   trusting me as the owner of that domain to behave honorably about
 it :)
 
 The simplest way would presumably be to make the ohrrpgce a library
 project and wrap it with the new namespace, I think:
 
 package com.newnamespace.myrpg;
 
 public class MainActivity extends com.ohrrpgce.games.OHRActivity
 
 etc.
 
 I believe that would work. That seems to be how these examples I am
 looking at are set up.
 
 (I am actually working on an Android project right now for my day
 job, but
 it's been a while and I'm a bit rusty. And someone else has already
 written it; I'm just changing it.)
 
 Cheers,
 Simon

 Hmm... If that is the only way to change the namespace, then it sounds
 like having the Android SDK installed and recompiling the project would
 be required. Maybe it isn't worth it if it is that much trouble?

 Even though I want people to be able to customize the namespace of their
 game, I guess that should be a low-priority goal :)


Ah, yes. Maybe not ideal. It might be possible to change it with something
like proguard instead, in the compiled version.
___
Ohrrpgce mailing list
ohrrpgce@lists.motherhamster.org
http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org


Re: [Ohrrpgce] Pixel Shaders

2011-06-11 Thread Simon Bradley
On Sat, Jun 11, 2011 at 6:22 AM, Ralph Versteegen teeem...@gmail.com wrote:
 On 11 June 2011 02:40, Jay Tennant hierand...@crazyleafgames.com wrote:
 From: Simon Bradley neworigi...@gmail.com
 Sent: Friday, June 10, 2011 9:06 AM

 And at what point does it become easier to write your own engine than
 to use OHR?

 The fact that we are continually adding features and hardly ever
 remove them does concern me. What will the engine look like in the
 limit? I think our UI isn't scalable. We keep adding more arcane
 keyboard shortcuts, have pages-long bitsets menus, the plotscripting
 dictionary has sentences repeated hundreds of times, and the ancient
 HOWTO is the only thing indicating where to start to make sense of it
 all. Even isolated, some features like slices are very complex (and
 almost everyone seems to complain).

 But this criticism seems strangely phrased. Maybe you mean something
 quite different. The user-visible effect of this will be simply more
 options for the set sprite effect command I was going to add anyway,
 plus probably more enemy dissolve animations.


Well, yes, I've been out of circulation for a while, and only really
stayed on this mailing list out of idleness, but it was things like
slices and now shaders which kind of made me wonder where things were
going, and whether it is becoming too abstract. I guess it's nice to
provide the flexibility, but there's a danger that it becomes a blank
sheet of paper rather than a form with boxes to fill in.

Being an open source project, the things that get developed will be
the things that people want to work on, so there might be some weird
growths in odd directions, I guess that's only to be expected.

Simon
___
Ohrrpgce mailing list
ohrrpgce@lists.motherhamster.org
http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org


Re: [Ohrrpgce] Pixel Shaders

2011-06-10 Thread Simon Bradley
And at what point does it become easier to write your own engine than
to use OHR?

On Fri, Jun 10, 2011 at 2:45 PM, D A dan155...@msn.com wrote:


 Date: Fri, 10 Jun 2011 09:29:56 -0500
 From: caron.m...@gmail.com
 To: ohrrpgce@lists.motherhamster.org
 Subject: Re: [Ohrrpgce] Pixel Shaders

 On 10/06/2011 2:21 AM, Ralph Versteegen wrote:
  On 10 June 2011 17:31, Jay Tennanthierand...@crazyleafgames.com wrote:
  As most everyone is already familiar, a pixel shader is
  a piece of code that calculates a color of a pixel on a
  surface that is being drawn to.
 
  Then I didn't know what a pixel shader is. I thought they were
  programmable parts of GPU hardware pipelines, but apparently we're
  talking about software here.

 At what point did he say that a shader doesn't run on GPU?

  The pixel shaders on the rasterizer right now are simply
  pass-through shaders, doing no calculation besides
  possibly sampling a texture.
 
  So normal texture sampling counts as a pixel shader, but there's only
  one such sampler currently. I don't know why you're pluralising.
 
  There are many cool effects that can be achieved with
  shaders, such as negative, blur, bloom, fire, water,
  frosted glass, glow, etc.
 
  I don't see how many of these fit your definition of pixel shaders, as
  they seem to be functions for drawing something onto a surface, in a
  possibly arbitrary shape (eg. a blurred triangle), rather than
  calculating the colour of each pixel of a polygon. (OK, I'm just being
  difficult.) What do you mean by fire and water effects?

 Are you serious? I can't tell.

 Pixel shaders 101:

 A pixel shader is a function applied to every pixel in a scene that can
 modify pixels. Some of these can be done purely with pixel shaders
 (bloom, colour inversion, etc), others need the assistance of vertex
 shaders (outlines, glowing, etc).

 By fire and water effects, I assume he's talking about wavy textures,
 like water and fire in many video games. Don't be obtuse.

  Can you think of more effects?
 
  Do the enemy dissolve effects count as shaders? They aren't
  necessarily computed per-destination pixel, which I'm guessing is a
  requirement. But anyway, there are many more enemy death/dissolve
  effects I'd love to implement: some specifically for enemy death
  animations, others more generally useful effects. Transparency,
  tinting, and transformed quads are going to enable quite a few death
  animations I had in mind. But I've also been thinking of a few
  disintegration-type effects, like turning to dust from the top down or
  bottom up, or being blown away by the wind, or splintering. It would
  be a good idea to move the code for these out of allmodex.bas and into
  a C file, because the melt effect for one is really expensive to
  compute. In general, it seems it doesn't make sense to try to stick
  effects like melt in the rasteriser, because they're not
  rotation-invariant.
 
  Sephy requested being able to use dissolve effects on sprite slices,
  and I've been meaning to get around to implementing that.
 
  So it sounds like you're proposing a generalisation of dissolve effects.

 You could do this with pixel shaders, although I don't know exactly how.
 But, dissolve effects are hardly the only use for them, so I'm not sure
 why you would claim that.

  What are the general thoughts on using shaders?
 
  Well, they must be portable between different backends, but exact
  result doesn't matter. It sounds like these would be all implemented
  in a not-backend-specific way (unless a backend wanted to go the extra
  mile to provide a D3D shader language implementation, I guess).

 Or, just use the standard HLSL that compiles to both major chipset
 shader implementations?

  I imagine that some of the effects you mentioned won't work well for
  low resolution pixel art. If so, it might be a bad idea to provide
  (and thus encourage people to use) such shaders rather than making
  them draw the effects themselves better than an algorithm could hope
  to accomplish.

 This is perhaps the most critical thing you've said thus far.

 Unless, of course, there was a way to specify that the shader should run
 on the target screen buffer, rather than on the source textures!

 --
 - Mike Caron
 ___
 Ohrrpgce mailing list
 ohrrpgce@lists.motherhamster.org
 http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org

 Question: Why are we going for a bunch of fancy effects that are seemingly
 situational and often made up for by artistic technique than prioritizing
 what we really need: Alpha Transparency (which would adequately allow
 lighting effects) and high resolution (which people have been asking for for
 years).

 ___
 Ohrrpgce mailing list
 ohrrpgce@lists.motherhamster.org
 http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org


___
Ohrrpgce mailing 

Re: [Ohrrpgce] SVN: james changed revision 25 log comment by james

2011-01-21 Thread Simon Bradley
On Fri, Jan 21, 2011 at 6:07 AM, Ralph Versteegen teeem...@gmail.com wrote:
 On 21 January 2011 14:31, James Paige b...@hamsterrepublic.com wrote:
 On Thu, Jan 20, 2011 at 05:21:38PM -0800, subvers...@hamsterrepublic.com 
 wrote:
 --- tmp/james-25-old  2011-01-20 17:21:38.0 -0800
 +++ tmp/james-25-new  2011-01-20 17:21:38.0 -0800
 @@ -1 +1 @@
 -applied Simon Bradley's patch to move assembly declares into allmodex.bi
 +Journaled about trip to New York.
 \ No newline at end of file
 ---

 So I mistakenly hit the wrong keys when I was trying to cancel my
 checkin of revision 4125, and it got commited with a bogus comment and a
 couple files I didn't mean to check in yet.

 I couldn't remember the command to edit a subversion comment, so I
 googled for an example, and found one, and said Dur, duh, doy, I'm
 gonna copy and paste this to the command line and edit it despite the
 fact that I KNOW copying lines from web pages often copies the newline
 too but somehow magically that won't happen to me THIS time!

 ---
 James

 This was even more confusing if you read the emails all out of order,
 as I did, due to Gmail's automatic arrangement of emails into threads.
 At first I thought James was adding missing messages to old commits!

I thought I had mysteriously worked on the project again without realising.
___
Ohrrpgce mailing list
ohrrpgce@lists.motherhamster.org
http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org


Re: [Ohrrpgce] Mac OS X port

2010-09-25 Thread Simon Bradley
Cool. I just bought myself a Mac Mini (old model) a couple of days
ago. I'll try to take a look at this when I've got it all set up (and
I'm not working weekends to finish this stupid work project). This
netbook is a Hackintosh, too. I'll be wiping it back to XP when I get
the Mac Mini up and running, but maybe I'll check OHR first.

Simon
___
Ohrrpgce mailing list
ohrrpgce@lists.motherhamster.org
http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org


Re: [Ohrrpgce] iPhone

2010-09-09 Thread Simon Bradley
Kyle Poole, the author of the iPhone Wesnoth, is coincidentally also
the author of the Kyle's Quest RPG engines on the Palm which are
indirectly what led me to OHR. In fact, Kyle's Quest 2, including my
own (adopted) game Commoria, is available on the iPhone, and is not
hugely dissimilar to OHR, although the scripting is more constrained.
It looks a bit rough on the iPhone, though, it has to be said. :)

(I write iPhone games for a living these days, by the way. Don't think
I've mentioned that before.)

Cheers,
Simon

On Thu, Sep 9, 2010 at 8:55 PM, James Paige b...@hamsterrepublic.com wrote:
 Nope, the interpreted code might have been a problem. In order to block
 flash, the blocked basically everything except stuff supported by xcode.
 Fortunately they were not enfocing that rule very consistently, and they
 finally did away with that rule entirely today.

 There is other GPL code in the app store already. (Wesnoth being a good
 example )

 ---
 James Paige

 On Thu, Sep 09, 2010 at 07:32:26PM +, Mike wrote:
 I am not familiar with the iPhone's license, but what about the OHR would 
 have previously been a problem? Was it the GPL?
 --Original Message--
 From: James Paige
 Sender: ohrrpgce-boun...@lists.motherhamster.org
 To: OHR List
 ReplyTo: OHR List
 Subject: [Ohrrpgce] iPhone
 Sent: Sep 9, 2010 12:52 PM

 I know we are still a very long way away from platform portability, but
 I just wanted to mention that I was reading Apples newly elucidated and
 relaxed sumbission guidelines, and it it looks like games made with the
 OHR would definitely be okay now.

 ---
 James
 ___
 Ohrrpgce mailing list
 ohrrpgce@lists.motherhamster.org
 http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org


 --
 Mike Caron
 ___
 Ohrrpgce mailing list
 ohrrpgce@lists.motherhamster.org
 http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org


 ___
 Ohrrpgce mailing list
 ohrrpgce@lists.motherhamster.org
 http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org

___
Ohrrpgce mailing list
ohrrpgce@lists.motherhamster.org
http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org


Re: [Ohrrpgce] SVN: james/3374 Democracy has spoken.

2010-02-02 Thread Simon Bradley
Oh dear. I think I'll wait for Aardvark. (What does happen after z?)

On Tue, Feb 2, 2010 at 3:14 AM,  subvers...@hamsterrepublic.com wrote:
 james
 2010-02-01 19:14:50 -0800 (Mon, 01 Feb 2010)
 49
 Democracy has spoken.

 And it said Zenzizenzic
 ---
 U   wip/whatsnew.txt
 ___
 Ohrrpgce mailing list
 ohrrpgce@lists.motherhamster.org
 http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org

___
Ohrrpgce mailing list
ohrrpgce@lists.motherhamster.org
http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org


Re: [Ohrrpgce] SVN: james/2961 Fix a typo in distrib.bat

2009-10-18 Thread Simon Bradley
On Sun, Oct 18, 2009 at 8:35 AM, James Paige b...@hamsterrepublic.com wrote:
 On Sat, Oct 17, 2009 at 05:22:36PM +1300, Ralph Versteegen wrote:
 2009/10/17 James Paige b...@hamsterrepublic.com:
  On Sat, Oct 17, 2009 at 08:20:34AM +1300, Ralph Versteegen wrote:
  2009/10/17 Ralph Versteegen teeem...@gmail.com:
   2009/10/17  subvers...@hamsterrepublic.com:
   james
   2009-10-16 09:14:38 -0700 (Fri, 16 Oct 2009)
   26
   Fix a typo in distrib.bat
   ---
   U   wip/distrib.bat
  
   Ah. I knew there was some simple way to echo a blank line.
   But strangely, echo    worked fine on my computer (I tested very
   thoroughly in-fact... didn't help!)
  
  Oh wait a minute, I tested in wine instead of windows :P Inno was a
  pain to use...
 
  I wonder if we should try switching to NSIS instead? I haven't tried it
  yet, but I have heard good things about it.
 
  ---
  James

 Well, I mean it was a pain to use under wine; especially because I had
 problems with the command prompt emulator.

 What advantages would switching away have?  You want to give the
 option of downloading extra packages like high quality music in the
 installer? Since Inno is scriptable, I bet it can do that.

 Actually, my main reason was because Innosetup is free-as-in-beer byt
 not open source. NSIS is open source.

 The only thing I know NSIS can do that Inno can't is fully automated
 installs, which I don't care about.

 An option to download high quality music would be a fantastic feature.
 Perhaps they can both do it, but I would be curious which can do it
 best/easiest

I used to use NSIS some time back. So long ago, in fact, that I can't
even remember what for. I think it might have been for work, actually,
where we had a lot of tricky dependencies and regstry keys and
databases and printer drivers and so on.

I think the main difference is that Inno is a bit easier to set up and
a bit less flexible. Unless we actually want to do something obscure
and complicated, I doubt we need to change.

Simon
___
Ohrrpgce mailing list
ohrrpgce@lists.motherhamster.org
http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org


Re: [Ohrrpgce] SVN: teeemcee/2751 Script profiling, enabled by passing -d SCRIPTPROFILE at compiletime. Ou

2009-06-18 Thread Simon Bradley
On Thu, Jun 18, 2009 at 9:29 AM, Ralph Versteegenteeem...@gmail.com wrote:
 2009/6/18 James Paige b...@hamsterrepublic.com:
 On Thu, Jun 18, 2009 at 04:56:35AM +1200, Ralph Versteegen wrote:
 2009/6/17 James Paige b...@hamsterrepublic.com:
  On Wed, Jun 17, 2009 at 06:18:40AM +1200, Ralph Versteegen wrote:
  2009/6/17 James Paige b...@hamsterrepublic.com:
   On Tue, Jun 16, 2009 at 10:12:40PM +1200, Ralph Versteegen wrote:
   2009/6/16  subvers...@hamsterrepublic.com:
teeemcee
2009-06-16 03:09:22 -0700 (Tue, 16 Jun 2009)
458
Script profiling, enabled by passing -d SCRIPTPROFILE at 
compiletime. Output to g_debug.txt when quitting. Better and 
runtime toggleable profiling is something for the new interpreter.
Profiling is done per-script only, and is not entirely accurate - 
context switches to other programs (or threads) aren't excluded. 
Comparison with my benchmarking scripts shows that the times 
sometimes disagree by 5% or more.
   
I just couldn't leave load/freescripts alone.
---
U   wip/compat.bi
U   wip/const.bi
U   wip/game.bas
U   wip/gglobals.bi
U   wip/moresubs.bas
U   wip/udts.bi
U   wip/yetmore.bas
U   wip/yetmore2.bas
  
   I forgot to mention that the times include all time spent by script
   commands called by that script, including screen fades and menus like
   loadmenu.
  
   Here's the front of the output of a game of DON'T EAT SOAP, for 
   interest:
  
   OHRRPGCE wip 20090615.2749 gfx_fb/music_sdl FB0.21.0 -g 
   script_profiling Win32
   Playing game eatsoap.rpgdir (Don't Eat Soap!) 06-16-2009 21:54:17
   script profiling information:
   #switches is the number of times that the interpreter switched to 
   that script
   (switching time is relatively neglible and included to help determine
   calls to other scripts, which are more expensive)
   Total time recorded in interpreter: 70.449sec   (timer overhead = 
   1.32us)
    %time        time    time/call      #calls   #switches  script name
    25.66     18080ms       1164us       15537      295099  updatesprite
    07.74      5455ms         11us      505553     1011106  getforce
    06.49      4570ms         34us      132906      398718  getcsquared
    05.24      3693ms          6us      587250      587250  
   getforceextraslot
    03.46      2435ms        206us       11831      302992
   checkbubbletobubblecollisions
    03.32      2339ms         19us      124696      374088  
   careaboutdirection
    03.29      2316ms         74us       31174      331937  checkcorner
    03.28      2309ms          7us      352917      352917  abs
    02.95      2077ms         10us      208224      416448  getforcey
    02.78      1956ms          9us      208937      417874  getforcex
    02.69      1893ms         14us      132477      278784  
   bubblebubblecollision
    02.65      1870ms         12us      158684      158684
   isbubblecolideablebubble
    01.84      1297ms         21us       61944      185832  
   careaboutcorner
    01.74      1226ms         13us       97460       97460  getexbit
  
   This is really cool! I'm going to try and use this info to optimize my
   script.
  
   Right away it makes me want a built-in function for checking radial
   distances.
  
   in circle range(x1, y1, x2, y2, pixels)
  
   which does something like
  
    scriptret = (x1 - x2) ^ 2 + (y1 - y2) ^ 2  pixels ^ 2
  
   It also looks like my getforce commands would benefit from some
   optimization.
  
   ---
   James
 
  How about adding bounding spheres for slices in addition to bounding
  boxes. I think that that's what you're using it for? But I'm pretty
  clueless at the moment as to what the interface for that would be.
 
  Hmm... yeah, that would be a decent built-in feature for slices. That is
  indeed how I am using it.
 
  Wow, you certainly have a lot of layers of indirection in get/set force 
  x/y
 
  Yes. I'm sure eliminating them will improve performance a decent bit. I
  had them there because I felt that writing the code was more intuitive
  for me with them working that way, and that I could optimize later if
  necessary. (premature optimization, evil, etc...)
 
  Also, might I mention that there's no reason to use abs before
  squaring in 'get c squared' and elsewhere?
 
  Oops! heh. I was throwing around abs() a lot to work around our crappy
  mod bug, and I guess I got superstitious about it. I'll remove.

 But wait a minute, are you sure that's what you want? abs(-19 mod 10)
 is 9, not 1, which is what I would usually want: the mathematically
 correct answer!

 H... The crappy mod bug I was referring to is that our
 implementation of mod seems to give different results for negative
 numbers than what I get from python... although maybe I tested wrong and
 confused myself?

 That's right. Python has bucked the trend, and has implemented
 mathematical modulo instead the hardware mod that every other
 programming language offers. Good on them.

 

Re: [Ohrrpgce] [Bug 727] Random Number Strikes

2009-05-28 Thread Simon Bradley
On Thu, May 28, 2009 at 6:48 AM,  bugzilla-dae...@karnov.dreamhost.com wrote:

 http://rpg.hamsterrepublic.com/bugzilla/show_bug.cgi?id=727





 --- Comment #8 from Ralph Versteegen teeem...@gmail.com  2009-05-27 
 22:48:18 ---
 (In reply to comment #7)
 The problem with doing random exclusion in a while() loop is that the speed 
 is
 going to be highly unpredictable, and when only a few valid numbers are left,
 there is a danger that they will never be hit at all because of flaws in the
 random number generator (I am pretty sure that FreeBasic does not use a
 cryptographic-strength random number generator)

 In -lang deprecated, CRT's rand() is used. (-lang fb uses the Mersenne
 Twister). There's no need to be cryptographic-strength, but you raise a really
 good point! Under windows, rand() only returns a 15-bit value, which means 
 that
 our random command can't return more than 32768 of the values in the provided
 range! Better fix that.

 Of course, in this case you're safe, assuming the tumbler is nowhere near that
 size. I assume MS at least picked a LCG that generates all 15 bit values 
 before
 repeating, because only an incompetent programmer from the 1970's would do
 otherwise.

 --
 Configure bugmail: 
 http://rpg.hamsterrepublic.com/bugzilla/userprefs.cgi?tab=email
 --- You are receiving this mail because: ---
 You are the assignee for the bug.
 ___
 Ohrrpgce mailing list
 ohrrpgce@lists.motherhamster.org
 http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org


(Sent to the list because I can't remember my bugzilla login, and I
don't seem to have used it from this PC. It's been a while.)

Before repeating? That's not very random.

The LCG should return a value that is smaller than its internal
state/seed, so it can repeat values without repeating the sequence.

My solution to the lottery problem would be similar to James's, but
instead of deleting items from the array (which could be costly), I'd
just swap the selection with the last item so it doesn't get picked up
when I reduce the count:

#set up tumbler
array(tumbler)
tumbler.add(1)
tumbler.add(2)
tumbler.add(3)
tumbler.add(4)
tumbler.add(5)
tumbler.add(6)
tumbler.add(7)
tumbler.add(8)
tumblercount:=8

# pick a random ball from tumbler
script, get ball, tumbler, begin
 slot := random(0, tumblercount -- 1)
 return(tumbler[slot])
 delete(tumbler[slot])
 temp:=tumbler[tumblercount--1]
 tumbler[tumblercount--1]:=tumbler[slot]
 tumbler[slot]:=temp
 tumblercount:=tumblercount--1
end

This again is only applicable to small array sizes, but should be
easily adapted to use the existing global array space.

Simon
___
Ohrrpgce mailing list
ohrrpgce@lists.motherhamster.org
http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org


Re: [Ohrrpgce] Possible SDL bug: Play Song command doesn't seem to work after a Stop Song command

2009-02-13 Thread Simon Bradley
On Fri, Feb 13, 2009 at 3:12 PM, Ralph Versteegen teeem...@gmail.com wrote:
 2009/2/12 Kizul Emeraldfire kizulemeraldf...@gmail.com:
 Well, I figured out what the problem is/was: turns out that Set Music Volume
 does nothing if no song is playing. After I moved the Set Music Volume
 command to go AFTER the Play Song command, it works the way I was wanting it
 to.

 Still kind of irritating, though. :/ But — at least I figured it out! :D

 I'm pretty sure this is a bug. I can't see what could be causing it
 though. I should file a bug.

I seem to remember some weird issues way back when we first started
with SDL_mixer. If it uses hardware to play back the MIDI, then it
seems to use a different volume. There is only ever one volume control
visible through the API, but behind the scenes it might not be the
same one it was a minute ago. I don't know if that's what's actually
happening here, but if so I think it's just a limitation of SDL_mixer.

Cheers,
Simon
___
Ohrrpgce mailing list
ohrrpgce@lists.motherhamster.org
http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org


Re: [Ohrrpgce] Gosub (anagram of bogus)

2008-07-19 Thread Simon Bradley
Well, if we start getting into templates and STL then my C++ skills
are a bit limited, and I wouldn't really want to be sidetracked by
trying to create an object model. I'd be looking to do a fairly
straight line-by-line conversion. Maybe very C-ish C++. I'm almost
certainly going to use C++-style // comments.

Other people can feel free to port it however they want, though. :-)

Cheers,
Simon

On Sat, Jul 19, 2008 at 2:42 PM, Ralph Versteegen [EMAIL PROTECTED] wrote:
 On Sat, Jul 19, 2008 at 10:01 PM, Simon Bradley [EMAIL PROTECTED] wrote:
 You do still have goto in C, but I don't believe you can treat labels
 as variables and store a return address. It's difficult to remember
 the quirks of each language though, when I work with other languages
 that look like C (and there's no goto in Java).

 GCC has an extension called labels as values which does exactly what
 you mentioned - which covers the portable gosub replacement that James
 wanted.


 I thought the FB gcc emitter would emit the not-very-readable gcc
 pseudo-assembly that other gcc-based compilers emit? That won't be
 very usable, but then if we can build to any gcc target from FB, it
 won't really be such an issue.

 No, the (GC)C emitter and the GCC backend are totally different. The
 emitter produces actual C code which is then fed into a C compiler. I
 can't remember, but I think that the FB devs were dumping the idea of
 a GCC backend, which would use translate to GCC's GENERIC or whatever.
 Here's what the C that fbc produces looks like:

#define fb$211 ((integer)(fb_StrLen()))
if (fb$211=0) goto fb$163;
{
#define fb$212 ((uinteger)(fb_ASC()))
#define fb$213 ((integer)(fb$212=32))
#define fb$214 ((uinteger)(fb_ASC()))
#define fb$215 ((integer)(fb$214127))
#define fb$216 ((integer)(fb$213fb$215))
...

 To take a look, pass -gen gcc -r


 I have been wanting, recently, to figure out how to build C programs
 in Windows from scratch without relying on an IDE to set everything up
 and manage the project. One of the strengths of FB, to me - and one of
 the reasons I still use it for little utilities at work - is that I
 can just create a single .bas file and compile it with fbc. When it
 comes to C/C++ I seem to need Visual Studio and a project file and the
 whole works. I might try using OHR as a test project for that.

 Compiling multi-module C/C++ programs can be annoying when you have to
 deal with IDE generated and broken/non-portable makefiles, but the
 reason that you think this is because C tools have vastly more
 sophisticated build options than FB, and everyone gets really carried
 away using them. But you can write:
 gcc a.c b.c -o out.exe


 Also, thinking about things, wouldn't C++ be a better language to
 translate into? That way, strings and dynamic arrays become easy to
 destruct, and the translated code might come close to the readability
 of the original.


 Cheers,
 Simon

 On Sat, Jul 19, 2008 at 7:29 AM, James Paige [EMAIL PROTECTED] wrote:
 There are still a lot of gosubs. The conversion process is slow and
 painful (but still progressing)

 The C conversion idea is interesting...

 Actually, the gosubs we use now are actually hacked assembly jumps. I
 wonder if there is a way to fake the same effect in portable C? Most of
 the gosubs might even be inlineable (at a cost of even worse
 readability than we already have)

 The idea of a more portable version is exciting to me. I would love to
 see the OHR running on a jailbroken iPhone.

 Also, I think the FreeBasic devs are making progress on their gcc
 backend, which might turn out to actually be the exact same converter
 that you are talking about.

 ---
 James

 On Fri, Jul 18, 2008 at 01:26:18PM +0100, Simon Bradley wrote:
 Hi,

 How is the source doing for gosubs, these days?*

 There was a thread on CP about 4 months ago (er, I haven't been there
 too often, lately) regarding running OHR on non-Intel Linux machines,
 such as the PS3, and it struck me that it would actually be relatively
 simple to convert the FB code to C, with the exception of GOSUBs. I
 guess it would be fairly easy to work around, but gosub does funny
 things with scope that C can't normally do. Otherwise, it should be
 more or less a line-by-line conversion from the FB. For the SDL
 version, at least.

 It would be kind of cool to run OHR on, say, a hacked Wii (I wonder if
 anyone's had a look at porting SDL to the Wii, yet?), so I thought I
 might have a go at converting the code if I magically find myself with
 free time in the near future.

 (*I am at work, so I can't just update my source and search it.)

 Cheers,
 Simon
 ___
 Ohrrpgce mailing list
 ohrrpgce@lists.motherhamster.org
 http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org


 ___
 Ohrrpgce mailing list

[Ohrrpgce] Gosub (anagram of bogus)

2008-07-18 Thread Simon Bradley
Hi,

How is the source doing for gosubs, these days?*

There was a thread on CP about 4 months ago (er, I haven't been there
too often, lately) regarding running OHR on non-Intel Linux machines,
such as the PS3, and it struck me that it would actually be relatively
simple to convert the FB code to C, with the exception of GOSUBs. I
guess it would be fairly easy to work around, but gosub does funny
things with scope that C can't normally do. Otherwise, it should be
more or less a line-by-line conversion from the FB. For the SDL
version, at least.

It would be kind of cool to run OHR on, say, a hacked Wii (I wonder if
anyone's had a look at porting SDL to the Wii, yet?), so I thought I
might have a go at converting the code if I magically find myself with
free time in the near future.

(*I am at work, so I can't just update my source and search it.)

Cheers,
Simon
___
Ohrrpgce mailing list
ohrrpgce@lists.motherhamster.org
http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org


Re: [Ohrrpgce] if anybody was wondering...

2008-03-31 Thread Simon Bradley
On Mon, Mar 31, 2008 at 3:48 PM, James Paige [EMAIL PROTECTED] wrote:
 If anybody was wondering why I have been so quiet on this list lately,
  this is why: http://pyweek.org/


I was beginning to wonder if I'd somehow unsubscribed myself.

I bought myself an xbox 360 and a handful of games two weeks ago, and
haven't spent a lot of time doing anything else since. I'm quite
content to buy Wii games and leave them shrinkwrapped for months, but
these pesky gamer points make me play on the 360 all the time. :-)

Simon
___
Ohrrpgce mailing list
ohrrpgce@lists.motherhamster.org
http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org


Re: [Ohrrpgce] [Bug 617] Fix screen tearing

2008-03-12 Thread Simon Bradley

  --- Comment #2 from [EMAIL PROTECTED]  2008-03-12 00:05 ---
  Well bug 611 must be caused by some bug, probably in allmodex or the way that
  that menu interacts with it, while tearing is just a natural effect of 
 drawing
  to the screen that all programs without vsync see.

  I was looking through FB's gfxlib2 code, which is an amazingly huge C 
 library.
  It has drivers for all sorts of platforms and seems to be able to mix them
  and use bits of several at once to do different things. I couldn't make sense
  of the code to select the driver. I'm guessing that the reason that you see 
 no
  tearing is because FB is running a different driver on your computer. There
  seem to be some flags to select the driver we want. I also found a comment 
 in a
  header about the driver vsync function being allowed to wait instead of
  actually doing any syncing if it couldn't.


  And yes, I want to fix up gfx_sdl too.



I can't seem to get bugzilla to load from here at the moment, so I'll
just reply via the list.

In my other FB programs, I think the only way I found to avoid tearing
was to use flip. I'll have to check this when I get home, but I
remember having a lot of trouble with other combinations that should
have worked. They would have been built with FB 0.17 or earlier, but
I'm not sure the core of gfxlib has changed much.

I also seem to remember that the Linux version was the reason the
earlier fixes were backed out. That might still be a problem with
flip.

Cheers,

Simon
___
Ohrrpgce mailing list
ohrrpgce@lists.motherhamster.org
http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org


Re: [Ohrrpgce] The future

2008-02-20 Thread Simon Bradley
On Feb 20, 2008 5:24 AM, S'orlok Reaves [EMAIL PROTECTED] wrote:

  The driving force behind the everything-is-a-menu
  design was my desire
  to be keyboard-friendly. I have no objection to gui
  interfaces and
  mouse-friendly interfaces, but usually
  point-and-click convenience comes
  at the expense of keyboard accassability.

 I agree that the advanced user will probably prefer
 quick keyboard commands. I memorized close and don't
 save pretty quick.

 But new users get annoyed trying to draw spritesets
 with the keyboard, and the mouse doesn't feel
 responsive (to me, at least).

 I think that if we use enough sensible mnemonics, tab
 orders, and the like, we should be able to mix fast
 keyboard shortcuts into a GUI environment.

 For the record, I've never used wxWidgets, but it
 seems pretty good based on a quick look. And there's
 Python/C++/C# bindings.

 --Seth


I think the important thing for a new project is to be clear about
what it's trying to do. It's all very well offering 128x128 32-bit
colour tiles at 1280x1024, but too much freedom is quite intimidating
for a novice, and too much flexibility can put the quality bar too
high. And what will distinguish it from other tools and environments?

I have, in the past, written what was supposed to be an explorer-type
interface for an RPG Editor (the page is here:
http://www.pocketfuel.co.uk/kq2tool/ but I seem to have neglected to
add screenshots). This was written in Borland C++ Builder, and was
intended to grow towards a full editor, but as it stands it was just a
text report of each item, with the ability to move, rename and delete
things, which was broken in the official editor. An update to the
official editor fixed many of those things and changed the file
format, making my utility obsolete (and broke the game, and destroyed
the community, but lets not go there :)).

I also have a Java framework in Swing with an old-Outlook style side
bar and MDI interface. This never made it to a public release, but I
used it to create data files for my first mobile phone game, and was
at one stage turning it into an editor for Scott Adams format
interactive fiction.

My main issue is that I absolutely hate programming for Windows.
Generally I like to work on non-PC platforms, but if I do ever write
for the PC I want someone else to handle as much of the garbage as
possible. Using a pure full-screen graphical interface like FBGFX,
SDL, etc, is nice and easy, but no good for a windowing editor. Swing
and the Borland VCL are both okay, but the big problem I have found
with the VCL is getting decent pixel-level control of graphics, and I
suspect it is similar with Swing. MFC is pretty horrible and
platform-specific. I haven't really looked at any of the other
multi-platform options.

Anyway, my next RPG-related project is likely to be a port/rewrite of
the original blackwhite Palm game Kyle's Quest (which is commercial
and closed-source, so I will have to tread carefully) to other
relatively low-powered systems. This was an extremely limited game
engine - single character, kind of like FF Legend on the GB, with a
tag-like means of controlling plot development - but still, some of
the games were good, and I would like to try to preserve them. I have
figured out the file format already, which I was never able to do with
the sequel.

The KQ12 game editors were windowsy. They relied on importing
graphics, so did not contain a sprite editor, and they compiled their
output to a different format (a necessary step for PalmOS). When
scripting was introduced with KQ2, it had a horribly cumbersome
wizard-style entry system. One of the other features of my kq2tool
(above) was that it could import and export a script text file,
allowing people to use actual code.

Anyway, enough rambling. I have to go and play TrackMania against my
work colleagues for the rest of lunch. ;)

Cheers,

Simon
___
Ohrrpgce mailing list
ohrrpgce@lists.motherhamster.org
http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org


Re: [Ohrrpgce] SVN: pkmnfrk/1819 FB 0.18.3 compatability

2008-01-06 Thread Simon Bradley
On Jan 7, 2008 6:40 AM, Mike Caron [EMAIL PROTECTED] wrote:
 On Jan 7, 2008 1:35 AM, James Paige [EMAIL PROTECTED] wrote:
  On Sun, Jan 06, 2008 at 10:06:32PM -0800, [EMAIL PROTECTED] wrote:
   pkmnfrk
   2008-01-06 22:06:32 -0800 (Sun, 06 Jan 2008)
   837
   FB 0.18.3 compatability
  
   Ouch, I've touched just about every source file in the tree -_-. Sorry if 
   I broke your commit, but the changes should be easy to merge in.
  
   Basically, any global string that used to be whatever$, is now just 
   whatever. Any global integer foo% is now foo. Apparently, Extern 
   doesn't like type suffixes in 0.18.3, and it's backwards compatible not 
   to use them, so they don't any more.
  
   I am fairly certain that I got them all, but it is possible I missed one. 
   Theoretically, if I did, then this code would compile just fine, but 
   wouldn't work:
  
   sub foo()
 game$ = newgame
   end sub
  
   since game$ is now game, the compile would think that game$ is a new 
   variable, and be perfectly happy. However, game would not be set to 
   newgame, potentially causing problems. I doubt that we have any such 
   cases, though.
   ---
 
  Bravo! This actually takes care of the second-worst part of making the
  OHR -lang fb compatable. (the worst, IMHO, being gosubbery)
 

 Actually, the gosubbery is but a tiny issue. To be -lang fb
 compatible, we need to eliminate *all* type-suffixes:

 D:\ohrrpgcemakegame
 Now compiling GAME with fb graphics module, and sdl music module
 Version ID 20080106
 Codename wip
 game.bas(6) error 135: Only valid in -lang deprecated or qb, found
 'DYNAMIC' in ''$DYNAMIC'
 game.bas(7) error 135: Only valid in -lang deprecated or qb, found
 'DEFINT' in 'DEFINT A-Z'
 game.bas(15) error 137: Suffixes are only valid in -lang deprecated or
 qb, found 'arg' in 'DECLARE SUB setScriptArg (arg%, value%)'
 game.bas(17) error 137: Suffixes are only valid in -lang deprecated or
 qb, found 'stat' in 'DECLARESUB innRestore (stat%())'
 game.bas(18) error 137: Suffixes are only valid in -lang deprecated or
 qb, found 'needfade' in 'DECLARE SUB exitprogram (needfade%)'
 game.bas(20) error 137: Suffixes are only valid in -lang deprecated or
 qb, found 'x' in 'DECLARE FUNCTION wrappass (x%, y%, xgo%, ygo%,
 isveh%)'
 game.bas(21) error 137: Suffixes are only valid in -lang deprecated or
 qb, found 'x' in 'DECLARE SUB wrapaheadxy (x%, y%, direction%,
 distance%, unitsize%)'
 game.bas(22) error 137: Suffixes are only valid in -lang deprecated or
 qb, found 'x' in 'DECLARE SUB aheadxy (x%, y%, direction%, distance%)'
 game.bas(23) error 137: Suffixes are only valid in -lang deprecated or
 qb, found 'x' in 'DECLARE SUB wrapxy (x%, y%, wide%, high%)'
 game.bas(24) error 137: Suffixes are only valid in -lang deprecated or
 qb, found '(' in 'DECLARE FUNCTION framewalkabout% (x%, y%, framex%,
 framey%, mapwide%, maphigh%, wrapmode%)'
 game.bas(24) error 123: Too many errors, exiting

 Ideally, we could throw in an Option Explicit, and we'd have (shock
 and horror) a reasonably maintainable source tree!


I have a vague feeling that Option Explicit is not part of proper FB
any more. I seem to remember one of my programs not compiling with it
when I upgraded to 0.18. Then again, it's a VBism rather than a QBism
in the first place, I believe.

Simon
___
Ohrrpgce mailing list
ohrrpgce@lists.motherhamster.org
http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org


Re: [Ohrrpgce] SVN: james/1508 Constants: TRU = -1 FAL = 0

2007-10-25 Thread Simon Bradley
How about TRUEVAL and FALSEVAL?

YES and NO?


Simon

On 10/25/07, Adam Perry [EMAIL PROTECTED] wrote:
 On 10/24/07, James Paige [EMAIL PROTECTED] wrote:
  On Wed, Oct 24, 2007 at 06:36:37PM -0400, Mike Caron wrote:
   On 10/24/07, James Paige [EMAIL PROTECTED] wrote:
On Wed, Oct 24, 2007 at 04:16:33PM -0500, Keith Gable wrote:
 On 10/24/07, Mike Caron [EMAIL PROTECTED] wrote:
  On 10/24/07, James Paige [EMAIL PROTECTED] wrote:
   On Wed, Oct 24, 2007 at 04:44:39PM -0400, Mike Caron wrote:
On 10/24/07, [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote:
 james
 2007-10-24 12:03:24 -0700 (Wed, 24 Oct 2007)
 246
 Constants: TRU = -1 FAL = 0
 My previous attempts to add constants for true and false 
 always went awry
 because FreeBasic is very inconsistent about whether or not 
 it treats
 TRUE and FALSE as reserved words between different versions 
 and platforms
 ---
 U   wip/const.bi
   
'how I would do it
#ifndef true
const true = -1
const false = 0
#endif
  
   That wasn't the problem, IIRC. Seems to me that although 
   undefined, one
   (but not both) of those symbols was reserved by the compiler.
  
 
  That seems silly. Maybe an #undef would help
 

 TRU and FAL seem silly. There's gotta be a better way. YES_TRUE and
 NO_FALSE are a lot easier to understand though take up more space...
 ugh. I don't know. B_TRUE, B_FALSE? TRU and FAL aren't going to be
 immediately apparent to a newbie hacker.
   
Newbie hackers who look at the OHR code will die suddenly of spontaneous
human combustion.
  
   I know what would work best: Use 1 as a constant for true, and 0
   for false. That way, we reduce it to basic binary on/off, yes/no,
   true/false
 
  Hey, and that is less to type!
 
  But using 1 as true causes problems. True needs to be -1 to avoid
  bitwise AND/OR problems.

 What the OHRRPGCE code really needs is more magic numbers.
 ___
 Ohrrpgce mailing list
 ohrrpgce@lists.motherhamster.org
 http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org

___
Ohrrpgce mailing list
ohrrpgce@lists.motherhamster.org
http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org


Re: [Ohrrpgce] [Bug 470] Missing crashes with ubersetzung version of game.exe

2007-09-24 Thread Simon Bradley
On 9/23/07, [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote:
 http://gilgamesh.hamsterrepublic.com/cgi-bin/bugzilla/show_bug.cgi?id=470





 --- Comment #1 from [EMAIL PROTECTED]  2007-09-23 13:25 ---
 After playing Missing for quite some time, I got the following error when 
 going
 through a door... although it was the second time I had gone through there (I
 went past that point previously, but accidentally closed the program and had 
 to
 restore from my save)

 Aborting due to runtime error 2 (file not found) at line 2111 of
 allmodex.bas::ISDIR()

 Although I can't tell if this is the same crash Meatballsub saw, since isdir()
 is one of those functions that is *totally* different on Linux than it is on
 Windows.



My suspicion would be the sound effects. I think Missing uses the
interim slot sfx system that was later replaced. and therefore
probably isn't well-maintained.

Simon
___
Ohrrpgce mailing list
ohrrpgce@lists.motherhamster.org
http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org


Re: [Ohrrpgce] [Bug 470] Missing crashes with ubersetzung version of game.exe (Spoiler Alert!)

2007-09-24 Thread Simon Bradley
On 9/24/07, Ralph Versteegen [EMAIL PROTECTED] wrote:
 On 9/24/07, David Gowers [EMAIL PROTECTED] wrote:
  On 9/24/07, [EMAIL PROTECTED]
  [EMAIL PROTECTED] wrote:
   http://gilgamesh.hamsterrepublic.com/cgi-bin/bugzilla/show_bug.cgi?id=470
  
  
   [EMAIL PROTECTED] changed:
  
  What|Removed |Added
   
   Summary|Missing crashes with|Missing crashes with
  |ubersetzung version of  |ubersetzung version of
  |game.exe|game.exe (Spoiler Alert!)
  
  
  
  
   --- Comment #2 from [EMAIL PROTECTED]  2007-09-23 20:16 ---
   Playing further, I got the following crash an instant after looking into 
   the
   hole I bashed in the floor. I saw the corpse for an instant before it 
   crashed
   (scary as hell, this game is good!)
  
   [Thread -1224627312 (LWP 23020) exited]
   [Thread -1215976560 (LWP 23012) exited]
  
   Aborting due to runtime error 6 (out of bounds array access) at line 494 
   of
   music_sdl.bas::LOADSOUND()
  
  
   Program exited with code 06.
  
   I happened to be runing in gdb, but for some reason there was no 
   backtrace.
 
  AFAIK, if the program exits, you can't get a backtrace -- backtraces
  only make sense in context of a crash. FB's runtime error checking has
  shortcircuited the crash (it reports the error and aborts the program,
  rather than letting the error crash the entire program.). You'll need
  to turn that off before you'll get a meaningful backtrace.

 Oh didn't notice that. However, under Windows at least, gdb pauses the
 program inside FB's error checking functions - at the moment of
 termination apparently. Under Linux it might not be catching that
 signal?

Heh, there's another part of this thread that I hadn't read when I
wrote that last reply (gmail seems to be filing them separately).
Still points to the sound, though, I think.

I should also be replying via bugzilla, probably, but I'm at work and
I'm not sure I can remember my login.

Simon
___
Ohrrpgce mailing list
ohrrpgce@lists.motherhamster.org
http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org


[Ohrrpgce] Lump Technology (TM)

2007-09-18 Thread Simon Bradley
Hi,

This is not really at all relevant to Ubersetzung or anything, so I
probably should have waited, but I've been forgetting about it for
months, so I thought I'd better post now while I think about it.

A while ago, probably around Easter, I wrote a little Easter-themed
puzzle game in FreeBasic called Easter Cortex (for a mini-contest on
Retro Remakes). At the end, as time was running out, I decided I
didn't want to leave the resources all over the place, and I elected
to use Lump Technology(TM) to package everything up, adapting the code
from unlump.

This, of course, is GPLed. Which probably means that my game also
needs to be GPLed.

I have no problem with releasing my source code (other than laziness),
but I don't like the GPL. That leaves me with 3 options:

1. Deny everything. This has worked okay so far, but I've probably blown it now.

2. Release a version of the source with the GPL, then take out the
lump stuff and re-release it with a non-copyleft license.

3. Ask the original author if I can release the code under a different
license. (Or if the unlump stuff can be LGPL.)

The third one is why I am here. Although I'm not even sure who counts
as the author. I would prefer to use a license like the Apache
license, styled after the BSD license, which doesn't constrain the
future use of my code. Not that anyone sensible would reuse my code,
especially not commercially.

So anyway, what do you think?

The game is here, by the way:

http://www.reanimation.co.uk/blog/?p=18

It came second in the contest, I think. I forget. Definitely not first, though.

Regards,

Simon
___
Ohrrpgce mailing list
ohrrpgce@lists.motherhamster.org
http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org


Re: [Ohrrpgce] [Bug 431] Sound effects pausing doesn't work in music_sdl

2007-08-18 Thread Simon Bradley
On 8/18/07, [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote:
 http://gilgamesh.hamsterrepublic.com/cgi-bin/bugzilla/show_bug.cgi?id=431





 --- Comment #2 from [EMAIL PROTECTED]  2007-08-17 21:38 ---
 Er, I meant http://jcatki.no-ip.org/SDL_mixer/SDL_mixer_28.html#SEC28



I'm fairly sure that, when I first added the SDL music, pause just
didn't work (possibly only for MIDI, though, since that's all there
was at the time). Or was it that resume restarted from the beginning?
Possibly even both.

Simon
___
Ohrrpgce mailing list
ohrrpgce@lists.motherhamster.org
http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org


Re: [Ohrrpgce] SVN: teeemcee/1237 SDL_mixer.dll 1.2.8 compiled with libmad instead of SMPEG, weird frequen

2007-07-26 Thread Simon Bradley
On 7/26/07, Ralph Versteegen [EMAIL PROTECTED] wrote:
 On 7/26/07, [EMAIL PROTECTED]
 [EMAIL PROTECTED] wrote:
  teeemcee
  2007-07-26 02:36:06 -0700 (Thu, 26 Jul 2007)
  390
  SDL_mixer.dll 1.2.8 compiled with libmad instead of SMPEG, weird frequency 
  MP3 files play just the same as OGG files
 
  But since MP3 are now never played, I could compile a very with no MP3 
  support at all to reduce the size a bit. 660kb is awfully large, but its 
  smaller than the SMPEG version.
 
  I'm not aware what version of SDL_Mixer Simon uploaded - maybe there are 
  some hidden bug fixes?
  ---
  U   wip/SDL_mixer.dll
 

 While it may appear that James jumped the gun on libmad (wow, that was
 a lot of work on his part), infact it took me 3 days of tweaking
 configure, libtool and makefile scripts and environmental variables to
 get SDL_Mixer and all its dependencies to compile and link to a stand
 alone dll in Msys/Mingw (I didn't want to attempt to cross compile
 from linux - but then I wouldn't have run into all those msys/libtool
 bugs). From this experience, I learnt libtool isn't much use (at least
 not on msys) - in the end I had to call gcc manually because libtool
 disobeyed its own settings.

 TMC
 ___
 Ohrrpgce mailing list
 ohrrpgce@lists.motherhamster.org
 http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org

I originally included a slightly older version (1.2.6 I think) because
at that time the binary distribution was statically-linked with libogg
and smpeg. Upgrading to 1.2.7 meant that the ogg DLLs and the mpeg
library needed to be included separately, and they were quite big.
Also, it crashed, I seem to remember. I think the import might not
quite have matched the later DLL.

MP3s will still be played in those games that already include them.
It's only on import that we convert them (yes?). It depends if we want
to force authors to reimport or if we want to preserve
back-compatibility with unstable releases.

Simon
___
Ohrrpgce mailing list
ohrrpgce@lists.motherhamster.org
http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org


Re: [Ohrrpgce] SVN: james/1232 Convertimport WAV-OGG

2007-07-26 Thread Simon Bradley
On 7/26/07, Ralph Versteegen [EMAIL PROTECTED] wrote:
 On 7/26/07, [EMAIL PROTECTED]
 [EMAIL PROTECTED] wrote:
  james
  2007-07-25 15:28:54 -0700 (Wed, 25 Jul 2007)
  184
  Convertimport WAV-OGG
  OGG is now the only sound effect format you should expect to find in an RPG 
  file.
  ...Although if a .WAV is still in there, we certainly won't refuse to play 
  it.
  ---
  U   wip/menus.bas
 

 The same for MP3s, no?
 ___
 Ohrrpgce mailing list
 ohrrpgce@lists.motherhamster.org
 http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org

MP3s weren't supported as sound effects because sdl mixer could only
handle them as music. I think.

I suppose that means we now can import mp3s as sfx.

Simon
___
Ohrrpgce mailing list
ohrrpgce@lists.motherhamster.org
http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org


Re: [Ohrrpgce] [Bug 372] segmentation fault on 11025 hz MP3 files (music_sdl)

2007-07-24 Thread Simon Bradley
I'd agree with that. In fact we could convert the wavs to ogg, too, to
save space and simplify matters. Hmm, I wonder if we could solve the
occasional midi issues with a conversion, too?

MP3-WAV is already kind of what happens (or should happen) when the
MP3 is played back. And what has to happen to play any mp3. I believe
our slightly-older version of SDL_mixer uses SMPEG to convert the MP3
to wave data in memory so it can mix it with the other sources.

I don't think we should be forced to be backwards-compatible with
nightlies, either, otherwise what's the point of not calling them
releases? They are unstable, and subject to change. If we decide we
can't (or shouldn't) support some sound formats, then that's just
tough.

But then I am 2 versions of FB out of date, and god-knows-how-many
revisions of OHR. I think I have some free time scheduled for
December, as long as nothing overruns.

Simon

On 7/24/07, S'orlok Reaves [EMAIL PROTECTED] wrote:

 Here's my 1.8 cents (exchange rates sap me dry... but
 anyways.)

 Remember what you all are here for: programming games.
 The average home-brew developer won't care if you
 import everything into, say, bp3 (BAM-p-3... shudder)
 so long as it works for him. Same with graphics (i.e.,
 Mode-X). He JUST wants to make games, with no
 DETECTABLE loss in the graphics/sounds he imports.

 So, if I were you, I'd make it easier on yourselves
 and support only OGG, with the run-time conversion of
 MP3-OGG as James/Keith suggested.

 Best of luck!
 (- sR
 PS: You also catch conversion bugs earlier in the
 pipeline. (The developer complains conversion doesn't
 work, rather than the player complaining this sounds
 terrible.)




 --- [EMAIL PROTECTED] wrote:

 
 http://gilgamesh.hamsterrepublic.com/cgi-bin/bugzilla/show_bug.cgi?id=372
 
 
 
 
 
  --- Comment #29 from [EMAIL PROTECTED]
  2007-07-23 15:19 ---
  (In reply to comment #28)
   Um, we wouldn't transcode them on import. That
  would be stupid. We would do it
   at run time, where the impact is less.
  
 
  Import-time transcoding from MP3-OGG makes sense.
 
  Run time transcoding from MP3-WAV might work, but
  could be a performance
  problem.
 
  I actually like the idea that Keith Gable just
  suggested. At import-time,
  detect whether the external tools for MP3-OGG
  conversion are available. If so,
  transcode, if not, disallow MP3 import with an error
  message explaining that
  you need to install the external converters. This is
  my favorite idea so far.
 
 
  --
  Configure bugmail:
 
 http://gilgamesh.hamsterrepublic.com/cgi-bin/bugzilla/userprefs.cgi?tab=email
  --- You are receiving this mail because: ---
  You are the assignee for the bug, or are watching
  the assignee.
 
  ___
  Ohrrpgce mailing list
  ohrrpgce@lists.motherhamster.org
 
 http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org
 




 
 Be a better Heartthrob. Get better relationship answers from someone who 
 knows. Yahoo! Answers - Check it out.
 http://answers.yahoo.com/dir/?link=listsid=396545433
 ___
 Ohrrpgce mailing list
 ohrrpgce@lists.motherhamster.org
 http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org

___
Ohrrpgce mailing list
ohrrpgce@lists.motherhamster.org
http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org


Re: [Ohrrpgce] [Bug 408] New: Undo for Map editing

2007-07-06 Thread Simon Bradley
On 7/6/07, [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote:
 http://gilgamesh.hamsterrepublic.com/cgi-bin/bugzilla/show_bug.cgi?id=408

Summary: Undo for Map editing
Product: OHRRPGCE
Version: 2007 Voxhumana
   Platform: All
 OS/Version: All
 Status: NEW
   Severity: feature request
   Priority: P3
  Component: Maps
 AssignedTo: ohrrpgce@lists.motherhamster.org
 ReportedBy: [EMAIL PROTECTED]


 Sometime after Ubersetzung, we need to think about making an Undo feature 
 for
 the map editor. Keeping a log of recent tile replacements ought to be easy, 
 but
 undoing things like replace-all or the fill tool proposed in bug 382 will
 require some extra thought.


It's not such a massive problem now we aren't constrained by QB's
memory restrictions. We can store a copy of the entire map every time
it is changed.

Although I have exactly the same problem at work at the moment, and I
haven't got round to implementing it there yet, either, and people pay
me to do that.

Simon
___
ohrrpgce mailing list
ohrrpgce@lists.motherhamster.org
http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org


Re: [Ohrrpgce] [Bug 372] segmentation fault on 11025 hz MP3 files (music_sdl)

2007-07-04 Thread Simon Bradley
On 7/3/07, James Paige [EMAIL PROTECTED] wrote:
 On Tue, Jul 03, 2007 at 10:41:20PM +0100, Simon Bradley wrote:
  On 7/3/07, [EMAIL PROTECTED]
  [EMAIL PROTECTED] wrote:
   http://gilgamesh.hamsterrepublic.com/cgi-bin/bugzilla/show_bug.cgi?id=372
  
   --- Comment #9 from [EMAIL PROTECTED]  2007-07-03 09:32 ---
   How about this?
  
   If we can write some code that detects the rate of n MP3 file, we can work
   around this problem.
  
   If a MP3 uses an unsupported rate, music_sdl will just refuse to play it. 
   And
   no matter which backend you use, CUSTOM will provide a warning when you 
   try to
   import an unsupported MP3.
  
   That way, existing games like OHR SACHEN Multipack which already use
   troublesome MP3s will work on music_native, and at least will not crash on
   music_sdl, and the warning will discourage users from importing odd MP3 
   rates
   in the future.
  
   Sound reasonable?
  
  
  Has there been an official release with the new sound/music support
  in? I can't remember what was in the last proper release.

 No, but so many people are using nightlies already that it doesn't
 matter that there hasn't

  I'm in favour of being more prescriptive if it helps us avoid
  problems. If we try to support everything we are just setting
  ourselves up for bugs we can't fix.

 Unfortunately, It looks like mp3 support may be an all-or-nothing thing.
 I have been looking at format documentation, and detecting frequency is
 painfully difficult (well, detecting frequency is doable. detecting
 frequency CORRECTLY for ALL mp3 files is paainful)


We could secretly convert them all to .oggs on import.
___
ohrrpgce mailing list
ohrrpgce@lists.motherhamster.org
http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org


Re: [Ohrrpgce] [Bug 372] segmentation fault on 11025 hz MP3 files (music_sdl)

2007-07-03 Thread Simon Bradley
On 7/3/07, [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote:
 http://gilgamesh.hamsterrepublic.com/cgi-bin/bugzilla/show_bug.cgi?id=372





 --- Comment #9 from [EMAIL PROTECTED]  2007-07-03 09:32 ---
 How about this?

 If we can write some code that detects the rate of n MP3 file, we can work
 around this problem.

 If a MP3 uses an unsupported rate, music_sdl will just refuse to play it. And
 no matter which backend you use, CUSTOM will provide a warning when you try to
 import an unsupported MP3.

 That way, existing games like OHR SACHEN Multipack which already use
 troublesome MP3s will work on music_native, and at least will not crash on
 music_sdl, and the warning will discourage users from importing odd MP3 rates
 in the future.

 Sound reasonable?


Has there been an official release with the new sound/music support
in? I can't remember what was in the last proper release.

I'm in favour of being more prescriptive if it helps us avoid
problems. If we try to support everything we are just setting
ourselves up for bugs we can't fix.

And by we, I don't really mean me, these days. :-) My source must be
a few hundred revisions out of date by now.

Simon
___
ohrrpgce mailing list
ohrrpgce@lists.motherhamster.org
http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org


Re: [Ohrrpgce] [Bug 372] segmentation fault on 11025 hz MP3 files (music_sdl)

2007-06-28 Thread Simon Bradley
On 6/27/07, Keith Gable [EMAIL PROTECTED] wrote:
 On 6/27/07, Keith Gable [EMAIL PROTECTED] wrote:
  If 88200Hz works, I'd be willing to say that the MP3 decoder only
  supports multiples of 22050Hz.

 Actually, like. Multiples or halves of 44100Hz. I shoulda divided
 22020/2 before I said that... :(


I have a vague recollection that SDL Mixer is set up to output at
22050. It /should/ automatically convert everything to that rate, but
it sounds like it's doing a very bad job with the MP3s.

Simon
___
ohrrpgce mailing list
ohrrpgce@lists.motherhamster.org
http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org


Re: [Ohrrpgce] [Bug 399] New: Browse menu lagginess

2007-06-26 Thread Simon Bradley
On 6/26/07, [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote:
 http://gilgamesh.hamsterrepublic.com/cgi-bin/bugzilla/show_bug.cgi?id=399

Summary: Browse menu lagginess
Product: OHRRPGCE
Version: 20070??? Ubersetzung
   Platform: PC
 OS/Version: Windows XP
 Status: NEW
   Severity: minor
   Priority: P3
  Component: General (game+custom)
 AssignedTo: ohrrpgce@lists.motherhamster.org
 ReportedBy: [EMAIL PROTECTED]


 Randomly (maybe about 50% of directory views at first opening opening a menu,
 and then dying down) the browse menu lags for a considerable 5-10 seconds in
 the '--Current drive block while building the menu. This is quite unpleasant
 when running game and getting a black screen. It's strange that I would see
 this, as the block above calls drivelabel() and hasmedia() on all drives, but
 never causes any problem for me. I have a few network drives on a computer
 which is turned off, , emulated CD drives, and CD and floppy drives.


 --
 Configure bugmail: 
 http://gilgamesh.hamsterrepublic.com/cgi-bin/bugzilla/userprefs.cgi?tab=email
 --- You are receiving this mail because: ---
 You are the assignee for the bug, or are watching the assignee.

 ___
 ohrrpgce mailing list
 ohrrpgce@lists.motherhamster.org
 http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org


I have noticed that the first time the browser opens is usually slow
for me, just as it is with any kind of Explorer operation, as it spins
up my CD and DVD drives, or whatever it thinks it's doing.

Doesn't quite sound like the same thing, though.

Simon
___
ohrrpgce mailing list
ohrrpgce@lists.motherhamster.org
http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org


Re: [Ohrrpgce] [Bug 49] quest to purge the code of evil GOTOs

2007-05-25 Thread Simon Bradley
On 5/24/07, [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote:
 http://gilgamesh.hamsterrepublic.com/cgi-bin/bugzilla/show_bug.cgi?id=49





 --- Comment #3 from [EMAIL PROTECTED]  2007-05-25 06:42 ---
 The main remaining cleanup here is in game.bas, where goto is still used in
 ugly ways before the main game loop, and most notably when exiting the game.
 I'll try to get this done after ubersetzung branches.



Even though it turned out to be gosub that caused the problems,
instead of good, honest, hard-working goto. ;)

Simon
___
ohrrpgce mailing list
ohrrpgce@lists.motherhamster.org
http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org


Re: [Ohrrpgce] music backend testing

2007-04-24 Thread Simon Bradley
On 4/24/07, Keith Gable [EMAIL PROTECTED] wrote:
 On 4/23/07, Bob the Hamster [EMAIL PROTECTED] wrote:
  I would like some vigorous music backend testing to establish which one
  works on the largest number of user's computers. We could put together
  an RC1 release pretty easily (which I will probably do soon)
 
 
  But I was thinking it would be great to put together a very simple RPG,
  say with one hero, one map, and some NPCs that would test each different
  music format and each different sound format and then provide
  instructions for where the user should report their results.
 
  Is anyone up to the task of creating soundtest.rpg?
 

 Okay, uh. One thing though. What formats are officially supported and
 for what? SFX is WAV and Ogg, right? Music is WAV/Ogg/MP3/MIDI,
 correct? If I'm leaving one off, let me know.

 I can come up with music and can test each backend on Gentoo Linux
 (including music_native). Just need to know what formats.


There are also the MOD formats: XM, IT, MOD and S3M. Did we support
all of them? I forget.

I can't quite remember whether WAV was supported for music in SDL.
(I'm not sure it should be encouraged, even if it is.)

Cheers,

Simon
___
ohrrpgce mailing list
ohrrpgce@lists.motherhamster.org
http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org


Re: [Ohrrpgce] Files needed by OHRRPGCE...

2007-04-14 Thread Simon Bradley
On 4/13/07, Mike Caron [EMAIL PROTECTED] wrote:
 On 4/13/07, Keith Gable [EMAIL PROTECTED] wrote:
  On 4/13/07, Mike Caron [EMAIL PROTECTED] wrote:
   ohrrpgce.iss is a setup script for the prepackacked... uh... packages.
   You don't need to (and shouldn't) distribute it.
 
  Ahh... Then, I'll remove it from the ebuild.
 
   ohrrpgce.fnt is the default font, and is only used in Game/Custom
   before loading a game. If you use the gamename.exe technique, then you
   can omit the .fnt.
 
  This is Linux, so this won't exactly work.

 No? Although I don't recall anyone having programmed this, but what if
 you create a link entitled gamename? Does that work? It probably
 should.

  Another question then. Should I put these
  in separate places? Or is it safe to share the same files between
  GAME/CUSTOM?

 It's 100% safe to put them in the main OHR folder.


The .mas and .fnt files are not used by Game at all. They can be part of Custom.

Simon
___
ohrrpgce mailing list
[EMAIL PROTECTED]
http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org


Re: [Ohrrpgce] king gilgamesh vanquishes crashyness

2007-03-07 Thread Simon Bradley
I am a professional developer of phone games these days (although I
haven't been foolish enough to try to port OHR ;-)), and I have access
to quite a few handsets at work. It is possible I might get time to
test this on a few phones sometime.

My own phone, on the other hand, is still old and crappy.

Cheers,

Simon

On 3/7/07, Keith Gable [EMAIL PROTECTED] wrote:
 BTW - It actually lets me download it now, but I don't have 1.8MB on my
 phone's memory. So I'll get back at you next week when I get my memory card
 (actually Saturday is about when I'll have it).


  On 3/7/07, S'orlok Reaves [EMAIL PROTECTED] wrote:
 
  Sorry for the spam! I meant that one to go to Mike.
  Er... so that means the http://fmf.ohrdev.com/ is
  updated. :P
  (- SR
 
 
  --- S'orlok Reaves  [EMAIL PROTECTED] wrote:
 
  
   Mike,
 I've uploaded most of the conent for the FMF site;
   however, it doesn't seem to like displaying images,
   for some reason. If you actually load the image
   (i.e.,
   show it in its own window) then it caches and
   displays
   just fine, but otherwise, nothing will load. Any
   ideas?
  
   --Seth
  
  
  
   --- Mike Caron  [EMAIL PROTECTED] wrote:
  
On 3/6/07, Bob the Hamster
   [EMAIL PROTECTED]
wrote:
 And having crashed repeatedly with a kernel
   panic
as predicted by the
 prophet Utnapishtim, King Gilgamesh returned
   home
to Sumeria, and seeing
 the greatness of his city, he praised the works
   of
the hands of men, and
 Ishtari looked upon him and took pity, and
   rebuild
him in a new better
 ventilated case with a newer faster Intel
processor and twice as much
 RAM, and King Gilgamesh did reign long with
wisdom, justice, and
 uninterrupted server up-time
   
All hail King Gilgamesh!
   
--
Mike Caron
Final Fantasy Q
http://finalfantasyq.com
___
ohrrpgce mailing list
ohrrpgce@lists.motherhamster.org
   
  
 
 http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org
   
  
  
  
  
  
 
 
   No need to miss a message. Get email on-the-go
   with Yahoo! Mail for Mobile. Get started.
   http://mobile.yahoo.com/mail
   ___
   ohrrpgce mailing list
   ohrrpgce@lists.motherhamster.org
  
 
 http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org
  
 
 
 
 
 
 
  Sucker-punch spam with award-winning protection.
  Try the free Yahoo! Mail Beta.
 
 http://advision.webevents.yahoo.com/mailbeta/features_spam.html
  ___
  ohrrpgce mailing list
  ohrrpgce@lists.motherhamster.org
 
 http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org
 



 --
 Keith Gable
 Lead Programmer / Project Leader
 The Ignition Project http://www.ignition-project.com/

 [Ask me how you can get a free Gmail account - Now with Google Chat!]
 ___
 ohrrpgce mailing list
 ohrrpgce@lists.motherhamster.org
 http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org


___
ohrrpgce mailing list
ohrrpgce@lists.motherhamster.org
http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org


Re: [Ohrrpgce] 2x filter for freebasic

2006-12-29 Thread Simon Bradley
On 12/29/06, Reaxor Jones [EMAIL PROTECTED] wrote:
 Hi
 I've written a 2x gfx filter in freebasic
 basicly it converts a a 320x200 screen to 640x480
 and smoothes out the pixels.

 I would like to implement it into ohrrpgce in a custom
 version or whatever.

 Anyways I've been sifting thru the code and I'm not
 sure where to start modding

 If someone could point out the right spots in the
 program where it changes screen and writes to the
 screen I would be super grateful.


Hi,

The FreeBasic screen access is all done in gfx_fb.bas.

The game engine itself draws to a 320x200 array of bytes, (actually
one of four such pages) and gfx_fb takes this array and does the
actual screen handling. This keeps everything contained, and allows
for alternative graphics systems, like gfx_allegro.bas. All your
changes should be able to go into gfx_fb.bas.

Cheers,

Simon
___
ohrrpgce mailing list
ohrrpgce@lists.motherhamster.org
http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org