Author Topic: Gamebook design  (Read 5575 times)

kaboekieman

  • Jr. Member
  • **
  • Posts: 55
Gamebook design
« on: February 09, 2012, 04:15:37 PM »
Hi Malkom and the rest of this great community,
A few months ago I was wondering if a simple database could be made with HAC (I want to make an interactive book (android game) where you can find objects, such as keys to help you open doors in this adventure game) I also was wondering if HAC has support for multiple resolutions (to optimise this apk file for use on a phone and tablet). I saw there was an update on revision number for HAC and was hoping it was now possible to do this? I hope someone can answer me on this.

I find java to be really complicated to learn for me and if it is possible to make this 'point and click text adventure' with HAC I will be more then happy to give HAC my full support.

Thanks in advance, Jeroen Wolf (from Amsterdam, the Netherlands)

Malkom

  • Administrator
  • Sr. Member
  • *****
  • Posts: 287
Re: Gamebook design
« Reply #1 on: February 09, 2012, 08:34:36 PM »
Hi Malkom and the rest of this great community,
A few months ago I was wondering if a simple database could be made with HAC (I want to make an interactive book (android game) where you can find objects, such as keys to help you open doors in this adventure game) I also was wondering if HAC has support for multiple resolutions (to optimise this apk file for use on a phone and tablet). I saw there was an update on revision number for HAC and was hoping it was now possible to do this? I hope someone can answer me on this.

I find java to be really complicated to learn for me and if it is possible to make this 'point and click text adventure' with HAC I will be more then happy to give HAC my full support.

Thanks in advance, Jeroen Wolf (from Amsterdam, the Netherlands)

Hi Jeroen

Its really nice to have you back in the forums again.

HAC doesn't have settings for multiple resolutions in the way that a computer connected to a monitor usually has.

It still has the same 3 settings of Unscaled, To Fit and Stretch as mentioned in this post:-

http://www.hypernextandroid.com/forum/index.php?topic=54.0



However there are two functions for returning the width and height of the screen in pixels so it should be possible to load images matching the resolution of the device to maintain the best image quality.

There is an example project called Solar System that loads an image into a card - perhaps you could experiment with that - so when an app starts up it finds the screen size and then loads the appropriate size image into the card.
I guess you could try this using emulators with different screen sizes - to match phone and tablets.

As for point and click - the Solar System project is a bit like a book - click on a planet and it opens another card displaying that planet and some info.

I hope this helps.

Malkom



 
I am sorry but I do not have time to answer questions by PM or email.
If you post your questions in this forum then it might help others.

kaboekieman

  • Jr. Member
  • **
  • Posts: 55
Re: Gamebook design
« Reply #2 on: February 09, 2012, 09:14:49 PM »
Wow Malkom, thx for that quick reply... When I wrote you/this forum a couple of months ago you also wrote back soon and gave good pointers too... excellent  :)
What you said about the resolution should work with my app... I think this will be an excellent way to do it. I will look into the solar app. I think my first step will be to make a couple of pages with a few images and try it on my samsung galaxy s2 and get a hold on a nice ;) tablet... Then (and this will be the hardest task) I will try to implement a sort of database .... and hope simple command will work with it (if then functions).

thanks again Malkom and if there is or if there will be any apps made with HAC that uses the database structure I need (or looks like it) I will be really interested in any help (via source code  ::) if your willig to share it with me). Even if it's only a step in a certain direction I will be very greatfull.

Jeroen

Malkom

  • Administrator
  • Sr. Member
  • *****
  • Posts: 287
Re: Gamebook design
« Reply #3 on: February 10, 2012, 11:05:52 AM »
Wow Malkom, thx for that quick reply... When I wrote you/this forum a couple of months ago you also wrote back soon and gave good pointers too... excellent  :)
What you said about the resolution should work with my app... I think this will be an excellent way to do it. I will look into the solar app. I think my first step will be to make a couple of pages with a few images and try it on my samsung galaxy s2 and get a hold on a nice ;) tablet... Then (and this will be the hardest task) I will try to implement a sort of database .... and hope simple command will work with it (if then functions).

thanks again Malkom and if there is or if there will be any apps made with HAC that uses the database structure I need (or looks like it) I will be really interested in any help (via source code  ::) if your willig to share it with me). Even if it's only a step in a certain direction I will be very greatfull.

Jeroen

Hi Jeroen

Looking at your app from a few directions is a good plan and helps you get around any limitations or problems.

Its also possible to set up a tablet type emulator. For example, the Android SDK has options to set up Galaxy Tab, Motorola Xoom emulators and a few others as well for trying different screen resolutions etc. If your app doesn't use animation then an emulator is a good option until you get another tablet.

HAC doesn't yet support the Android MySQL database but its high priority for us as many people have asked for it.

It sounds like you might need such a relational database but if not there is also the traditional flat file model where you store your keys and their attributes in arrays then save it in a file, or several files.

Our HyperNext Studio software development system has an example project with some bits of for more a book database that uses arrays. If you are in a hurry then you could look at that until our MySQL is ready.
Anyhow, I'll try to get an example project put together and posted.

Malkom
 


 
« Last Edit: February 10, 2012, 11:15:47 AM by Malkom »
I am sorry but I do not have time to answer questions by PM or email.
If you post your questions in this forum then it might help others.

kaboekieman

  • Jr. Member
  • **
  • Posts: 55
Re: Gamebook design
« Reply #4 on: February 10, 2012, 12:29:32 PM »
Wow thanks Malkom,
A flat file will work fine with my project so the sample/example will be great if you can make this. I have a few programming skills, so basic commands don't sound unfamiliar with me.. (made a few website with php and implemented several MySQL databases). Well thanks for all your help and just wanted to let you know that I have purchased the full version of HAC :)
« Last Edit: February 10, 2012, 01:29:49 PM by kaboekieman »

Malkom

  • Administrator
  • Sr. Member
  • *****
  • Posts: 287
Re: Gamebook design
« Reply #5 on: February 10, 2012, 03:24:03 PM »
Hi Jeroen

Thank you so much for just buying, its really appreciated :)

Its great that you are already a programmer and also know about databases, so now its just learning how HyperNext works and what it can do (and can't do).

I'll get the HyperNext Studio book database converted this weekend so it works in HAC.
I've just noticed an omission in HyperNext's Array functionality - it needs a function for rapidly finding a key or value - currently one has to iterate over the array. This will be in the next update.

Anyhow, we hope you have fun with HAC :)
Malkom



« Last Edit: February 10, 2012, 03:54:52 PM by Malkom »
I am sorry but I do not have time to answer questions by PM or email.
If you post your questions in this forum then it might help others.

kaboekieman

  • Jr. Member
  • **
  • Posts: 55
Re: Gamebook design
« Reply #6 on: February 12, 2012, 05:53:57 PM »
I will start making the pages soon malkom. and if i have made some progress i will let the ommunity know via this forum. hope the next version of hac has the `database` or array functionality. when working with php i used arays a lot so this will be fine. To record the array a fltfile should work with hac,  like a txt file? Well as you mentioned i will experiment with the use if hac and if i am more experienced i will have more knowledge what you can and cannot be done do with hac. then i will be also in the position to let you know what a good addition will be in the next versionof hac. well thx again and talk soon :-)

Malkom

  • Administrator
  • Sr. Member
  • *****
  • Posts: 287
Re: Gamebook design
« Reply #7 on: February 13, 2012, 04:22:33 PM »
Hi Jeroen

Here is a link to the updated Books example (really for tablets only as the screen size and number of controls make it hard to read on a small screen phone) :-

http://www.hypernextandroid.com/binaries/BooksHN.zip


Regarding arrays - the PreSchool Sums project uses arrays and that might help you get started with them.

Once the MySQL is working then we will make a version of the Books project as that will be easy for beginners to MySQL to understand.

Thank you for all the ideas and all the best for your Interactive Book.
 
Malkom

I am sorry but I do not have time to answer questions by PM or email.
If you post your questions in this forum then it might help others.

kaboekieman

  • Jr. Member
  • **
  • Posts: 55
Re: Gamebook design
« Reply #8 on: February 15, 2012, 07:12:11 AM »
Super malkom....thx for the example. I will examine, test and tweak it the next couple of days :) I realy appriciate it

Malkom

  • Administrator
  • Sr. Member
  • *****
  • Posts: 287
Re: Gamebook design
« Reply #9 on: March 11, 2012, 12:13:53 PM »
just and update:

Added 4 new array functions to forthcoming v1.13 so removing the need to iterate when searching for an array cell value.

They allow searching for rows and columns:-

ArrayFindRowFN,   ArrayFindAllRowsFN

ArrayFindColumnFN,  ArrayFindAllColumnsFN

The Array project has been updated to show their use(in v1.13).

Malkom

« Last Edit: March 11, 2012, 12:20:05 PM by Malkom »
I am sorry but I do not have time to answer questions by PM or email.
If you post your questions in this forum then it might help others.

kaboekieman

  • Jr. Member
  • **
  • Posts: 55
Re: Gamebook design
« Reply #10 on: March 19, 2012, 03:40:06 PM »
cool thx.... i just downloaded 1.13 and will try these new additions...
good work Malkom :)

p.s. I have read the ability to store certain setting/variables when shutting down an app... Is it true to assume that now I will also be in the position to store the page number the user was before he/she quit the App? And the user (when booting the App) will start as that page number?


Malkom

  • Administrator
  • Sr. Member
  • *****
  • Posts: 287
Re: Gamebook design
« Reply #11 on: March 20, 2012, 07:46:53 AM »
p.s. I have read the ability to store certain setting/variables when shutting down an app... Is it true to assume that now I will also be in the position to store the page number the user was before he/she quit the App? And the user (when booting the App) will start as that page number?

Yes, you could store it in either a Global or Local a variable and put your GotoCard command in the Home card's open script.
I guess for your needs that a Global variable is more appropriate.

@ in card 1 (Home card)
Global pageNumber

@ perhaps do some stuff - checks etc
...


GotoCard pageNumber



I am sorry but I do not have time to answer questions by PM or email.
If you post your questions in this forum then it might help others.

kaboekieman

  • Jr. Member
  • **
  • Posts: 55
Re: Gamebook design
« Reply #12 on: March 20, 2012, 11:26:49 AM »
thx malkom, it's just like PHP in a way ;)
also the inventory could be strored this way... :)

 

anything