This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2011-11-26 18:22:24

Malakhon
New Scratcher
Registered: 2011-11-26
Posts: 1

Hi, I am new (and have questions)

Greetings,

I've never been able to learn a programming language. I've often tried to learn Visual Basic (going back to version 4). I think my mind simply does not work the way traditional programming languages are structured (C comes to mind) so I am excited about what I've read about Scratch.

A few questions before I purchase
http://www.amazon.com/gp/product/1598635360/ref=ox_sc_act_title_1?ie=UTF8&m=ATVPDKIKX0DER

Scratch Programming for Teens (I am not a Teen, but I think I will enjoy this book if the software can support what I want to do).

Before I ask my question I will tell you the first project I have in mind. It is based in part on "Castles I" by Interplay, a game that came out in the early 1990s.

The player will take the role of a King in the high middle ages, in an ages of Chivalry, Jousts, Damsels in Distress that sort of thing.

The Core Game:
The game play will be 'turn based'. The player will click through a Steward, Bishop and Marshalls screen to decide their economic, religious (social) and military policies. The player will buy land (or cede it to nobles), modify taxes, recruit troops and assign them to various provinces.

Once the player is satisfied they will click 'end turn' and the game will process the results adding/subtracting values from variables I've set up. I believe this is do-able in Scratch.

The Event Game:
This is the part I need your help understanding if I can do it or not. I would like the game to randomly select an event and present it to the player. The player will then choose A, B, or C (or sometimes D) as a way to handle the event.

As an example:
"Majesty, bandits have been harassing the merchants in (Randomoly selected Player owned province), reducing our ability to tax them."
A) We are too stretched as it is to assign more guards to patrol those roads.
B) Dispatch 25 Men-at-Arms at once
C) Dispatch 50 Men-At-Arms and a Knight
D) Dispatch 100 men-at-Arms led by Sir Arilor

The game will then modify the morale variable of that province, and the merchant guild faction based on our sending troops, and deduct these troops from my available troop variables.
The game will then attach a 'flag' of some kind to the player, so that I know this event has fired.

The reason this is important is I need some way to know if an event has triggered and then pick events that may be good follow-ups.

Imagine I wrote 100 events (similar to the one above, about plagues, royal marriages, tournaments, etc).

I have a starting table that looks like this:
  On End of Turn pick a random event by choosing a random number from 1- to the max number of the table (in this case it happens to be 100) and return that event to the player. I may want to add a 'no event' event since some times nothing special is happening.

      1-20: No Event (go to next turn)
      21-50: Bandit Event #12
      41-50: Wizard Event #72
      51-75: Epic Event #73
      76-89: Horse Lords Event #26
      90-98:  Stone Mason Revolt Event #7
       99-00: Rare Event #22

Let's say that Bandit Event #12 was the on I explained above and the player picked C as part of that. I want to assign Event12C flag to the player, so that I know he has done the event and what is answer is. Then I want to update my random event table so that
Multiple Follow Up Events could be added:

   1-20: No Event (go to next turn)
      21-25: Bandit King Event #14
       26-40: Bandit Showdown Event #15
      41-50: Wizard Event #72
      51-75: Epic Event #73
      76-89: Horse Lords Event #26
      90-98:  Stone Mason Revolt Event #7
       99-00: Rare Event #22

Adding event 14 and 15 and modifying the table.

So my questions are:
1. Is any of that do-able?
2. Will Scratch support dynamic random event generation (like what I described)?
3. If the player wants to 'save' their game and close the application, can I output the variables to a text file, and then let them load their game from that text file?

Offline

 

#2 2011-11-26 19:05:00

BOBBYBOB3
Scratcher
Registered: 2011-11-25
Posts: 500+

Re: Hi, I am new (and have questions)

First of all, scratch is free. The other thing I can say is, this game won't be able to fit into only 10 megabytes. Sorry if I've put you down, but all I'm trying to do is tell the truth. I may be a new scratcher, but I still know stuff about scratch.
                                                                                   BOBBYBOB3.  smile


http://i89.photobucket.com/albums/k219/jackdelamare/JPIV/JPIV-Userbar2.png after seven years of development fails I'm impatient... IT MUST COME

Offline

 

#3 2011-11-26 19:10:06

BOBBYBOB3
Scratcher
Registered: 2011-11-25
Posts: 500+

Re: Hi, I am new (and have questions)

By the way, I'm not a teen either. I'm only 8. I just learned all this stuff. Of course, I have a lot of trouble with scratch. Don't expect great games from me until a little later. I'm turning 9 soon, but come on! It's not like my age effects my work!
                                                                                      BOBBYBOB3.  smile


http://i89.photobucket.com/albums/k219/jackdelamare/JPIV/JPIV-Userbar2.png after seven years of development fails I'm impatient... IT MUST COME

Offline

 

#4 2011-11-26 19:24:05

peaceluver222
Scratcher
Registered: 2010-12-20
Posts: 7

Re: Hi, I am new (and have questions)

I'm not a teen either, i'm 11.


peaceluver222  smile

Offline

 

#5 2011-11-26 20:29:16

cheddargirl
Scratch Team
Registered: 2008-09-15
Posts: 1000+

Re: Hi, I am new (and have questions)

Hi Malakhon, welcome to the Scratch website!  smile 

Instead of rushing to buy a book, you might just want to download the Scratch software and take a look at the Support Page first.

What you're doing does sound doable, although, I would imagine that turn-based games are somewhat a bit daunting for most users to design in Scratch! From what you're describing, it sounds that it's possible to have the random event being controlled by lists, and the random event picking controlled by the block
[blocks]<pick random( 1 )to( 100[/blocks] .
I'd suggest exploring the variable blocks first in Scratch to get a feel for how lists and variables work in Scratch before diving into game creation right away. One of the Scratch Team members, Paddle2See, created a project tutorial explaining how lists work (http://scratch.mit.edu/projects/Paddle2See/260208).

As for the saving part, there's no need to export. When you save a project file in Scratch, the values of the variables are already saved. For example, if you have a variable called A, and if A has a value of 6 when you stop and save the project, the value of A when you open the project and start is again will remain as 6 (unless you design the project to reset variables whenever the project is started).

Hope this helps.  smile

One more thing: What BOBBYBOB3 says about the 10 MB limit, that just refers to the uploading limit on the website. If you ever plan on uploading your game to the Scratch website, make sure to keep track of the project size (the website will not accept any projects over 10 MB), otherwise, if you plan on just playing the game on the computer, the project can be as big as you want.  wink


http://i.imgur.com/8QRYx.png
Everything is better when you add a little cheddar, because when you have cheese your life is at ease  smile

Offline

 

#6 2011-11-27 00:46:23

jji7skyline
Scratcher
Registered: 2010-03-08
Posts: 1000+

Re: Hi, I am new (and have questions)

Welcome! I'm sure you'll find Scratch inspiring.  smile

And don't buy any books before you actually try something. I'm sure the online tutorials are much more helpful than any book but that's just my opinion  wink

Have fun!  big_smile


I don't know why you say goodbye, I say hello!  big_smile

Offline

 

#7 2011-11-27 03:22:41

blob8108
Scratcher
Registered: 2007-06-25
Posts: 1000+

Re: Hi, I am new (and have questions)

jji7skyline wrote:

And don't buy any books before you actually try something. I'm sure the online tutorials are much more helpful than any book but that's just my opinion  wink

I agree with this — the best way to learn Scratch is probably just to download it and have a play! (:


Things I've made: kurt | scratchblocks2 | this cake

Offline

 

#8 2011-11-27 13:53:34

ProgrammingPro01
Scratcher
Registered: 2011-07-30
Posts: 1000+

Re: Hi, I am new (and have questions)

Well Scratch isn't that hard to learn.  hmm


Bye 1.4!
http://www.reactiongifs.com/wp-content/uploads/2013/04/sobbing.gifhttp://25.media.tumblr.com/tumblr_mbfh6bIamQ1qky11ho1_500.png

Offline

 

#9 2011-11-27 15:21:45

henley
Scratcher
Registered: 2008-06-21
Posts: 1000+

Re: Hi, I am new (and have questions)

Malakhon wrote:

Greetings,

I've never been able to learn a programming language. I've often tried to learn Visual Basic (going back to version 4). I think my mind simply does not work the way traditional programming languages are structured (C comes to mind) so I am excited about what I've read about Scratch. You should try Python. And stick with it no matter what, because it’s actually pretty easy.

A few questions before I purchase
http://www.amazon.com/gp/product/1598635360/ref=ox_sc_act_title_1?ie=UTF8&m=ATVPDKIKX0DER

Scratch Programming for Teens (I am not a Teen, but I think I will enjoy this book if the software can support what I want to do). Don’t purchase the book. It’s easier just to learn the software yourself. You can also get better that way and figure out your own new techniques. Not to mention that the book will be invalid (on the most part) when Scratch 2.0 comes out.

Before I ask my question I will tell you the first project I have in mind. It is based in part on "Castles I" by Interplay, a game that came out in the early 1990s. You can’t ‘base’ it off of a game that already exists. Unless that game was made in Scratch

The player will take the role of a King in the high middle ages, in an ages of Chivalry, Jousts, Damsels in Distress that sort of thing. You aren’t mentioning wether or not it’s a platformer, rpg, etc.

The Core Game:
The game play will be 'turn based'. The player will click through a Steward, Bishop and Marshalls screen to decide their economic, religious (social) and military policies. The player will buy land (or cede it to nobles), modify taxes, recruit troops and assign them to various provinces.  This would be very hard for anyone to program, but it’s possible as long as the project doesn’t go over 10MB

Once the player is satisfied they will click 'end turn' and the game will process the results adding/subtracting values from variables I've set up. I believe this is do-able in Scratch. Yes

The Event Game:
This is the part I need your help understanding if I can do it or not. I would like the game to randomly select an event and present it to the player. The player will then choose A, B, or C (or sometimes D) as a way to handle the event. this is possible

As an example:
"Majesty, bandits have been harassing the merchants in (Randomoly selected Player owned province), reducing our ability to tax them."
A) We are too stretched as it is to assign more guards to patrol those roads.
B) Dispatch 25 Men-at-Arms at once
C) Dispatch 50 Men-At-Arms and a Knight
D) Dispatch 100 men-at-Arms led by Sir Arilor No need for an example. I got it.

The game will then modify the morale variable of that province, and the merchant guild faction based on our sending troops, and deduct these troops from my available troop variables. ...

The game will then attach a 'flag' of some kind to the player, so that I know this event has fired. ...

The reason this is important is I need some way to know if an event has triggered and then pick events that may be good follow-ups. Variables.

Imagine I wrote 100 events (similar to the one above, about plagues, royal marriages, tournaments, etc). Imagining...

I have a starting table that looks like this:
  On End of Turn pick a random event by choosing a random number from 1- to the max number of the table (in this case it happens to be 100) and return that event to the player. I may want to add a 'no event' event since some times nothing special is happening. Why not just download Scratch and see for yourself if all this is possible?

      1-20: No Event (go to next turn)
      21-50: Bandit Event #12
      41-50: Wizard Event #72
      51-75: Epic Event #73
      76-89: Horse Lords Event #26
      90-98:  Stone Mason Revolt Event #7
       99-00: Rare Event #22

Let's say that Bandit Event #12 was the on I explained above and the player picked C as part of that. I want to assign Event12C flag to the player, so that I know he has done the event and what is answer is. Then I want to update my random event table so that
Multiple Follow Up Events could be added:

   1-20: No Event (go to next turn)
      21-25: Bandit King Event #14
       26-40: Bandit Showdown Event #15
      41-50: Wizard Event #72
      51-75: Epic Event #73
      76-89: Horse Lords Event #26
      90-98:  Stone Mason Revolt Event #7
       99-00: Rare Event #22

Adding event 14 and 15 and modifying the table.

So my questions are:
1. Is any of that do-able? Sort of. You can do it all, but you would have to be really good with Scratch, and there might be too much lag because the project would be so big.
2. Will Scratch support dynamic random event generation (like what I described)? It could. You would have to use a random number, then make an event happen based on which number was chosen
3. If the player wants to 'save' their game and close the application, can I output the variables to a text file, and then let them load their game from that text file? [color=red]You can save, but if you (offline) quit Scratch or (online) switch to a different window, etc., nothing will be saved this feature will hopefully be available when Scratch 2.0 comes out which should be around summertime 2012.

Hope it helps.


"I've worked so hard for you and you give me nothing in return. Do you need help... Or do I?"

Offline

 

#10 2011-11-28 13:39:34

Happypieman
Scratcher
Registered: 2010-09-28
Posts: 100+

Re: Hi, I am new (and have questions)

about your game, honestly i was thinking of the same idea yesterday. Would you like to collab? I can do a lot of the programming, and you could do the graphics (if you want to) plus give me some more ideas. Obviously, you could also program.


2012--The biggest troll ever.

Offline

 

#11 2011-11-28 13:46:51

Happypieman
Scratcher
Registered: 2010-09-28
Posts: 100+

Re: Hi, I am new (and have questions)

Malakhon wrote:

I have a starting table that looks like this:
  On End of Turn pick a random event by choosing a random number from 1- to the max number of the table (in this case it happens to be 100) and return that event to the player. I may want to add a 'no event' event since some times nothing special is happening.

      1-20: No Event (go to next turn)
      21-50: Bandit Event #12
      41-50: Wizard Event #72
      51-75: Epic Event #73
      76-89: Horse Lords Event #26
      90-98:  Stone Mason Revolt Event #7
       99-00: Rare Event #22

So my questions are:
1. Is any of that do-able?
2. Will Scratch support dynamic random event generation (like what I described)?
3. If the player wants to 'save' their game and close the application, can I output the variables to a text file, and then let them load their game from that text file?

Question 2: Yes, but it would be a very very very long lag. Honestly, the last time I tried to do event generation on a City sim I was working on (never was released, never will) it crashed scratch every time I  opened it.  sad  so you may want to look at how big your scripts are, and even think of dividing them up... don't make the same mistake I did, City Sim 2.0 was going to be awesome, until it died. If you wanted to check out the original (which is NOTHING like the deceaced follow-up, go here:  http://scratch.mit.edu/projects/Happypieman/1732964


2012--The biggest troll ever.

Offline

 

Board footer