It's been quite a while

Make games! Discuss those games here.

Moderators: Bob the Hamster, marionline, SDHawk

User avatar
mjohnson092088
Metal Slime
Posts: 428
Joined: Sun Jan 09, 2011 9:33 pm
Location: earth.

Post by mjohnson092088 »

sheamkennedy wrote:
mjohnson092088 wrote:I don't even know where to start teaching myself for real, and not just trial and error until I got it right!
Here's how I started learning coding.
Appreciate the help bro, but I AM a biiit more advanced than that (just a bit). That being said, I'd still recommend looking at some of the Vikings of Midgard script files with the plotscripting dictionary. That's actually a bit more in-depth as to how I started to learn about it. Heck, you can even look at my own game, Final Dragon Legacy. I wouldn't say I'm great at it, but I included the file in the game for newbies to take a look at and try to learn as I did. The plotscripting.html that's included in the OHR file when you download it (or at least it was, don't know why it wouldn't be anymore!) is your best friend for at least the very basics. If someone is reading this right now and is a total scrub at this kind of thing, don't feel bad. HamsterSpeak is just a form of BASIC if I remember correctly, and very easy to follow! Also, check the wiki. The Hello World tutorial is another good way to start.

EDIT: What I mean to say is do ALL of that. At the SAME time. Looking at someone's code, and seeing all of the things spelled out for you in the dictionary is an amazing help.

That being said, I meant learning how to do things that are more advanced... Or at least, better ways to do them. I'm not begging anyone to play my game, but if you could do so and tell me where I could improve the scripting (being more efficient with less lines, etc) that would be appreciated. Don't have to post that here, I'll take a PM for that. Judging from what Mogri had shown me in the past, there's a much easier way to do the things I want to do that won't make the blood vessels in my CPU'S brainchips melt. I just don't understand coding on the same level as others, and I fear that's holding me back!
Last edited by mjohnson092088 on Thu Nov 19, 2015 5:52 pm, edited 1 time in total.
Hey, I just met you, and this is crazy... So here's some lunchmeat... Sandwich, maybe?
User avatar
sheamkennedy
Liquid Metal Slime
Posts: 1110
Joined: Mon Sep 16, 2013 9:29 pm
Location: Tama-shi, Tokyo, Japan
Contact:

Post by sheamkennedy »

Well then I think you answered your own question in a way. If you are a capable programmer then you should be able to do almost anything that you can imagine you want in your game. The issue is then how to do it most efficiently, this is what I imagine separates you from the higher level programmers.

Often I post scripting questions on here and get members telling me, "you know you could have done that code in way fewer lines if you'd done this," or "that's one way of doing things but if you do it this way you won't run in to a headache later on." I think this is then the type of feedback you're after. So I think every time you start working on a new script you should be asking the community if there is a more effective way of carrying out said task.

Also personally I tend not to play many of the games that are posted since I don't have enough time to get involved with them. I'm the type of person that usually gives the most feedback after reading a thread question, watching a video clip of the game or reading over a code segment. I'm not sure if the other members are like this. I'm just saying I'm most likely to help if you feed me small questions at a time, not tackle the whole game and give many suggestions. That being said I know a few people on here like play testing so if you do a shout out thread about playtesting your game I'm sure they'll take part and give you some of the feedback you're looking for.
⊕ P E R S O N A L M U S I C: https://open.spotify.com/album/6fEo3fCm5C3XhtFRflfANr
� C O L L A B M U S I C: https://dustpuppets.bandcamp.com/releases
TMC
Metal King Slime
Posts: 4101
Joined: Sun Apr 10, 2011 9:19 am

Post by TMC »

(Talking in general about learning new programming languages): Trial and error is a great way to test your understanding, as Sheam perfectly put it. Take a piece of example code, modify it, and confirm it does what you expect; exactly what I do when learning new language: you must test yourself, and ideally you should learn about the edge cases that the tutorial doesn't cover. For example in this way you also become familiar with what the error messages mean.

Trial and error is however a pretty bad way to figure out the correct way to write a piece code. (For example: "Do I need to add +1 here or is it already included in this variable which I'm not sure of the contents?") Compared to using trial and error in that case you'll save a lot of think by stopping to properly think through how the code is meant to work.

If you want to learn a language, you should search for tutorials for the language with good reputations. Learning a higher level programming language will expose you to higher level concepts, which will help you even when using simpler languages. It can definitely be enlightening. HamsterSpeak has a couple BASIC influences, but it really isn't based much on it. Actually, HamsterSpeak is so simple that a lot of concepts from other languages just don't apply to it. And that's bad; it hinders so many of the things like data structures, abstraction, encapsulation, high level functions and type safety that other languages are often strongly orientated for. So that's one way to improve.

Supposing you want to learn more generally how to effectively use HamsterSpeak, then there are a few different kinds of knowledge/wisdom to acquire. Yes, you should know approximately what the available commands are, but you also need to learn good habits, which you can largely learn from reading other people's code which is good (definitely not Vikings, unfortunately!), and learn what not to do, which is best learnt from experience. Good habits are things that prevent bugs, make the code easier to read and understand (like indenting, commenting, and using descriptive variable names) and structure it but splitting things up into scripts in a logical way. Organisation is critical for more complex projects. Good examples are babybob, Sidescrollers 101, and many of James' games: notice how he creates lots of small scripts that abstract something, like getting the y velocity of a bubble.

Plotdictionary.html is still included with the full and minimal OHRRPGCE downloads, but not the nightlies.

And yes, ethics tests are useless for catching malicious people. I think their only point is to ensure that you know what the expected behaviour is. That was explicitly the point of the ethics-in-research quiz my university forced me to do. (Plus now if you do something evil the company can claim they "screened" employees.)
TMC
Metal King Slime
Posts: 4101
Joined: Sun Apr 10, 2011 9:19 am

Post by TMC »

The scripts aren't included with Final Dragon Legacy. Maybe you meant one of your collab games? I'll be happy to look at your scripts (and I'll extend the offer to anyone else) and try to provide some suggestions to you point me at them. In the meantime I extracted the scripts from FDL and took a look. They're mostly cutscenes or item scripts, nothing fancy, so there's not too much to say, though.

Firstly, you should indent your code so you can see the structure. Since the scripts are very linear, almost no 'if' statements, you can almost get away with not doing it... but a very bad habit.

You've added pretty helpful comments to the code, and used informative script names, which is good. There could easily be more. Always remember that in a couple months you probably won't remember exactly what a script does, so it's best to leave yourself some clues. E.g. "walk hero(0, west, 10)" could be the hero crossing a bridge -- who knows?

I recommend using the autogenerated constants like item:X, attack:X. It makes the script much easier to understand. I notice you have have autogenerated constants that include "stat:°HP", "stat:¼VIT", "item:©Trenegr", and many more. The way to fix this is to go to the Edit Font menu and set the font type to ASCII instead of Latin-1. This causes most of the font to be stripped when translating text to and from (don't worry; this won't alter your textboxes if you export and reimport them, but it does affect how they are exported). That option wasn't available when you released that game.

Code: Select all

set timer (1,600,18,timer:game over,0,timer flag: battle && timer flag: menu && timer flag: critical)
This is wrong; you need to write "timer flag: battle, or, timer flag: menu, or, timer flag: critical" (You can also use + instead of 'or', but + might not work for some other 'flags' for other commands, so I don't want to recommend it). && checks if the two sides are both true. Anything nonzero counts as true. Thus, since those flags have nonzero values, the result is the 'true' constant, which is equal to 1.

There are some bits of code duplicated many times. Use a for loop, and put it in a separate script if that saves lines of code.
User avatar
Pepsi Ranger
Liquid Metal Slime
Posts: 1419
Joined: Thu Nov 22, 2007 6:25 am
Location: South Florida

Post by Pepsi Ranger »

mjohnson092088 wrote:The problem here is I lack many skills. High school dropout here... In fact, everything, and I mean EVERYTHING I've learned about coding and such in general was gleaned entirely from looking at the Bob the Hamster and Vikings of Midgard script files. I don't even know where to start teaching myself for real, and not just trial and error until I got it right! Addendum; Now that I think about it, I played around with Java when I was really young in the online game Graal's level editor, as well. I guess this is where you guys come in, right? It'd be cool if you could recommend some good resource material! Preferably of the layman's variety... I've asked Mogri for help before, clearly he thought I was more computer savvy than I actually am because it didn't help at all. Far beyond my understanding, that is. V
These guys are giving you pretty good piecemeal advice. But something else you may want to consider is to take a walk through a Barnes & Noble and check out the shelves devoted to software and other similar categories. I believe the Internet is chock full of resources for you, and you can probably find everything you need to know online. But the advantage in finding a book on your topic of interest is that it comes with a progression of understanding that makes it easier for you to follow along and build on the skills you've learned rather than flexing undeveloped skills out of order. Many books also come with images designed to show you what your progress might look like. It's also a quick way to decide what you need, what you're interested in, and what can actually help you at your skill level before you waste more time than necessary experimenting with something that won't ultimately help you. Some books can also teach you how to get a job utilizing your new skills.

This isn't to criticize the use of resources like Youtube tutorials or those links that take you to snapshot lessons on a topic you may or may not be ready for. I think Youtube in particular is excellent for learning a skill, especially when the person giving the video is an expert in his field and an expert in explaining and showing things. But Youtube won't always tell you what you should already know or what you need to know next. Books are designed to walk you through a topic from beginning to end, depending on its focus, rather than to offer you a piece of something that might be out of context to your background knowledge. If one book's instruction is too advanced, chances are that author has an earlier book available that covers more basic instruction. Many authors will write an entire series on a topic just to make sure you, the reader, don't miss out on anything important. And even those books that don't span the entirety of a topic (most don't in fact--most of the ones that cover the entire scope of a topic will do so in a more general way), you can find plenty that will examine a particular skill in much more detail. So, your opportunities to improve are plentiful here. By the time you need to research a particular skill more in-depth, you'll already have enough understanding of the general topic to know that more research on this particular topic is the next logical step in growing your skills.

And this is true of any topic, not just programming. The fact is, I have a Bachelor's degree from a competent university, and I've learned far more about my topic of interest by reading books post-graduation than I ever did in a classroom (or on the Internet, for that matter). Institutional education will get you only so far (especially nowadays). Independent study will get you much farther, and even though Youtube and other Internet sources are immensely helpful, books shouldn't be omitted from your study regimen. If you have time, I'd go take a look and see what your bookstore or library offers. (I prefer bookstores since you don't have to rush at an unnatural pace through whatever you bring home from them.)
Place Obligatory Signature Here
Post Reply