Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Geek Culture / Hack N Slash Sample

Author
Message
old_School
15
Years of Service
User Offline
Joined: 29th Aug 2009
Location:
Posted: 17th Jan 2013 21:09 Edited at: 17th Jan 2013 21:10
As many of you know, I'm retiring from UOK Software as their primary developer and they are converting to an IOS based software company. So all my lovely work and VB applications will set and likely go to waste lol So I've decided to share the source or rather the basic source code and concepts. These methods are not perfect but they ideas/concepts can be applied to any language. I hope you enjoy and find them helpful.

Hack N Slash Tut:
http://youtu.be/NJMzBJeom7Q
Indicium
16
Years of Service
User Offline
Joined: 26th May 2008
Location:
Posted: 18th Jan 2013 00:38
Wow.


They see me coding, they hating. http://indi-indicium.blogspot.co.uk/

Attachments

Login to view attachments
Insert Name Here
18
Years of Service
User Offline
Joined: 20th Mar 2007
Location: Worcester, England
Posted: 18th Jan 2013 01:42 Edited at: 18th Jan 2013 01:46
Didn't VanB do a really good side-scrolling fighting game tutorial in the newsletter a while back? Can't remember if it was him but I'm pretty sure it was... anyway yeah guys, go and read that it was fab.

Edit: Found it! It was a platform game tutorial. Quite a long time ago so my memory's a bit vague but I found it really useful, as inexperienced as I was then.

TheComet
17
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 18th Jan 2013 16:37
Quote: "Wow."


Indeed.

Looking back at old_school's profile, I managed to find this gem.



Along with the comment "This was originally over a 1000 lines of code".

Doesn't VB have arrays? What happens if I wanted 1000 bad guys?

TheComet

http://blankflankstudios.tumblr.com/
Quote: ""
- Randomness 128
Van B
Moderator
22
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 18th Jan 2013 16:47
Yeah, picture boxes could be an array - like enemy[0] - enemy[2], then instead of coding each one individually, just step through the array.

Please Old_School, don't refer to these examples as engines, you'll only get flak for it - and stop saying that they're for intermediate programmers, you'll only offend intermediate programmers.

I got a fever, and the only prescription, is more memes.
Seppuku Arts
Moderator
20
Years of Service
User Offline
Joined: 18th Aug 2004
Location: Cambridgeshire, England
Posted: 18th Jan 2013 17:35
Yes, arrays are pretty much ideal in game code, any game engines are best coded in a modular way (and professional game engines are done that way), having people avoid arrays is one way of getting people into bad habits. I used to do it in Dark Basic Pro, but once I learned to use arrays it actually cut out a lot of unnecessary work and unnecessary lines of code. Modular code makes it more accessible because you can use the same code again and again but with different data.

Classes can help too, though not a necessity, depends if you prefer Object Orientated Programming or Procedural Programming, though the advantage of a class is all the data inside of that class can be replicated and can even be used as an array, so 'enemy[steve].die()' or 'enemy[steve].health = 300'. Just some thoughts.

TheComet
17
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 18th Jan 2013 17:42
And don't forget inheritance with classes! That's the best invention since sliced bread, you save sooo much code.

But as we all know, the programmer's capability is of course directly proportional to the lines of code written. I've heard of jobs where you are paid per line of code you write. If old_school is in such a position, then I understand why his code looks like that.

TheComet

http://blankflankstudios.tumblr.com/
Quote: ""
- Randomness 128
TheComet
17
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 19th Jan 2013 00:43
Right, I gave the video a serious look.

old_school's intentions of helping programmers are admirable, I don't see a lot of programmers actually step up to their microphone and produce a tutorial video. The video was structured, and it was comprehensible.

While the source code reaches near preposterous levels of atrocity and certainly won't serve as a good example of how to code properly, a structure is there and it gets the basic job done. You didn't go deep into explaining how the code works, but you gave a good overview of your program and how it works, and you explained how a basic 2D game works quite comprehensibly.

The only other part that made me cringe (apart from seeing the code) was some incorrect usage of terminology.

A "game engine" is a highly dynamic externally configurable piece of software that abstracts an underlying API in order to solve a very specific task with less complexity. What you're doing is not making a "game engine", you're just programming a game.

"cords" should be "coords", since it is derived from the word "coordinates".

"sub" should be referred to as a "subroutine". There's no problem with writing "sub" in your program, but it's incorrect to call it how you type it. It's the equivalent of saying "use a dim for your map tiles".

There's a lot to be improved upon here.

TheComet

http://blankflankstudios.tumblr.com/
Quote: ""
- Randomness 128
Quik
16
Years of Service
User Offline
Joined: 3rd Jul 2008
Location: Equestria!
Posted: 19th Jan 2013 02:20
finally a constructive and good post from The Comet (no offense)

That is the only valuable - for real valuable post in this thread



Whose eyes are those eyes?
Seppuku Arts
Moderator
20
Years of Service
User Offline
Joined: 18th Aug 2004
Location: Cambridgeshire, England
Posted: 19th Jan 2013 08:22
I am sure it's useful feedback.

I don't think there's anything wrong with old_school trying to help people by creating tutorials and I think The Comet is making a fair point, it's a damn good idea - for a start it'd help people get into VB looking at it from a game perspective (not many VB tutorials I know of do that) without forcing your into a particular SDK, which could later be transferred into other video games using your chosen SDK, I followed something similar when learning C#, except the game was a text adventure...it got me thinking about classes in the right way for games and some really useful ways of structuring my code for a video game.

To expand on what I've already said.

The main problem I would highlight is the coding habits. I can see arrays being essential and classes as a useful (but not necessary) suggestion. I am responsible for the same bad coding habits, I used to do it all the time in DBP. You'll see in any good game tutorials the same habits are avoided, for example 3D Buzz's collection. I think the important thing is to have modular code because at least then you can build it into an engine, it saves coding, it reduces your lines and it means you can focus on the content rather than diving in and repeating code for each situation, which is time consuming and inefficient. I think that would definitely help improve any gaming related tutorials for old_school.

His methods may work fine for many types of applications, because you may have 'Menu1', 'Menu2' etc. and heck with games like Ant Farm it'd prolly work as well as it uses a similar structure. However, for games in general I think 'modular' would be the important thing to think about because of how games need to be structured.

In fact, old_school, this tutorial series might be a useful inspiration. It's for C#, but if you understand how the code is working, it'll be easy to translate into VB because in many ways the two programs are similar. I found the series to be extremely useful.

Login to post a reply

Server time is: 2025-05-20 17:52:10
Your offset time is: 2025-05-20 17:52:10