Playing Field: Building Placement works!

Tags

, ,

Well… My last posting was done around 2 weeks ago I guess – maybe longer ago. The reason was: I really had not the smalles idea how to manage one of my basic problems in this project:

building placement

Yes, an new detail about 6thousend is out: You will be able to have buildings in 6thousend and they will be important for your character. So what we have then is a character, plates and buildings. No more infos for now.

If you were reading my last articles, you maybe read about how I handle problems in this project:

I freeze the project till the problem is solved…

That’s the reason about being quite around 2 weeks without any new postings. What should I write not having new infos? Sure I was thinking about less people visiting my blog at the moment, but I was also thinking about this project will maybe 1-2 years in development.

I was more frustrated than strong-willed, because of my leak in programming knowledge I had to play really dirty. At last I won and you could laugh now:

I won 10 minutes ago after 2 weeks of frustration.

What we have now is the working playingfield where you could add plates with ability to place special buildings on each of the 4 cells of a plate. This is for sure not the later ingame dimensions. It’s a complete playingfield dummy to get rid on the programming and game mechanics part.

There are hundreds of smarter solutions of course and other people maybe keep an eye on frames per second, but as I wrote in earlier postings:

It works and all I want is that it works!

So it’s time now for the very first screenshot of the playingfield dummy with simulation of placing buildings:


6thousend screenshot 0004/Unity3D/Playingfield[Housing] Dummy/2012*July*23

Youtube: Playing Field: Building Placement works!

Playing Field: placing mechanism workin!

Tags

, ,

The placing mechanism works without errors now. I must say I was frightend to reach this point. It’s cool to archive, but knowing the bigger problem will come – it’s not that happy feeling again. So I have to stop my work again now and ask myself:

How to store the data I need?

It’s a fascinating plan to do such a project withouk knowing anything before. Of course computers attend me over 20 years now, but there is much stuff to learn, that is really new for me.

Playing Field: basic mechanism workin!

Tags

,

Yesterday I was writing about one week waiting for an inspiration to get my playing field working like it was planned: Developing the playing field…

This night it was done and it works. There is just one little bug nobody will notice ingame next 500 years, so it’s enough time to fix it today.
It’s really cool to lie in bed (some really nasty insect was that nice to beat me and make my left arm doublesized), don’t think about the playing field problem. It’s that quiet wordless dialog with your problem:

Don’t want to be solved? I could wait! Yeah sure, I just lie in bed watching tv – you are right!

Developing the playing field…

Tags

,

Every game needs a playing field. No one will play a game with a character hovering in blackness. Ok, maybe there is some people out – would make me frightend.

6thousend don’t have a prebuild terrain…

Last week was a combination out of ambition and frustration. I’m really not a programmer. I’m able to read, understand and kind of re-create code. Knowing this I was dumb enough to try to develop my playing field based on programming. I maybe read 100 threads, articles, hits, tips and code examples (real count). The problem: If you start working with stuff you don’t understand, you will get in big trouble later – having more stuff you don’t understand.

being clueless = 6thousend project stop

Hard fact, but it is like it is. I will not override a problem and do another part to get the next problem. So better stop for 2-3 days, maybe a week. Time to read, learn, investigate and maybe have an inspiration.

The funny thing after one week in mindless blindness :  I found the inspiration for my problem by reading a completly other thread and it was a completely other topic.

Watching on the screen, distrusting but also impressed – ohhh yeahhh… It could work that way. It’s that situation you maybe know:

Checking again and again an idea in seconds to find errors, think about if it is possible to do it that way or not.

I really like to try to glitch my own ideas. If you are not able to glitch it, it’s a really cool feeling, because you found a solution on your own. What I also learned again is: As simple an idea is, as small is the chance to glitch it.

Countdown – Development will start tomorrow…

Tags

, ,

After tons of tutorials, try and error, concepts and some temporarily headaches, I think it’s time to start the development now. Everything I need is prepared well I think. I’ll start with some artwork I think, because my last month was only numbers, codelines and wireframe visuals.

Sunday will be a good day to start – everything is quiet.

Cruba’s BZA HASTS Guide

Tags

, , , , ,

Cruba’s B.urg Z.erg A.rcade H.ack A.nd S.lash T.utorial S.eries Guide
Hack And Slash Tutorial Series by Peter Laliberte: burgzergarcade.com

This one is just for people who never did a bigger project. I just want to give you some tips to prevent frustration and put some stones out of the way that would probably stop you.

Don’t forget: Petey did this series out of nothing. It is “live development” like.

*** Tips ***

1) Windows Media Player: No picture when IntelliSense is active
Watching the tutorial series offline over common Windows Media Player, you could have same problem like me : The picture turns blue or black when MonoDevelops IntelliSense is active. I prefer vlc media player. You will not have this problem again.

2) Don’t mess up your work
I’m saving c# scripts after every change or new line that is done. Longer or hard to follow tutorials you will forget to save your work maybe. I also do backups of the whole Unity project 1-4 times per day. Being really new you maybe will do more errors and it’s hard if you have no saved point to return.

3) Overview
You should trim values. 1.0467664 is not good to keep the overview and for your project 1.046 or 1.05 will  have the same effect.

4) Stick exactly to the code shown in the video
It’s just an advice: Do the code exactly like shown in the videos. The reason for doing additional work? You will always be able to identify scripts, parts and codelines without guessing or being unsure.

5) Fix codelines or parts, when you see changes in videos
Sometimes there was made fixes or rearrangements behind the scenes. It’s useful to compare code from time to time. I compare any code in any new video.

6) Try to reach the “from the scratch” series and you’ll be safe
If you reach tutorial 148 and later 243 a-u, many errors and not well working stuff will be gone by magic. Just try to reach this milestones.

7) Errors, Null Reference – everything stoped!
Be sure your code definately have no typos. Be sure: A single semicolon too much or forget it means the whole thing will stop and force you to fix errors before going on.

8) It’s not like in the video! I did exactly the same!
Be sure you did something wrong. Check the whole video again if needed. Somethimes it’s really fast, you miss a single action that is important for the whole thing.

9) Character Generator (CharacterGenerator.cs) – Override spending points
When you work on this part, you will get crazy spending all points again and again for testing. You could just override spending the points. Of course be sure before, that the functionality is given. Now you just need to enter name to go on.

// override points detection, earlier tutorials
//    if(_toon.Name == “” || pointsleft > 0)                <<– original
if(_toon.Name == “”)                                                <<– without checking points

// override points detection, later version
//    if(PC.Instance.Name != “” && pointsleft < 1)     <<– original
if(PC.Instance.Name != “”)                                       <<– without checking points

*** Traps ***

1) The “My model is just big like a pea or huge like a mountain!” issue
Importing and dropping a model in your scene in Unity 3D, maybe you have this problem. The scale comes from the program the model was made in. If you work with Blender, when you export to fbx you will see a scale bar.

I think the default is 1. You could adjust it there. Anyways: When you import a model in Unity 3D and click is in your Project window, the first you see in Inspector is “Scale Factor”. Just raise the factor (example 0.01 too small, adjust to 1). Unity 3D will ask you to apply this rescaling. Just click apply.

2) The “249HumanAnimated model flying axe and shield!” issue
If you download the model, the reason for it is simple: You downloaded a version without correct hand and arm rig (skeleton for it missing). Nothing to do against – but u know you don’t do something wrong.

Get my free animated/textured model for you / fbx here:
https://6thousend.wordpress.com/crubas-downloads/

3) My mouscalls(mouseover, hover) functions don’t work
If you have objects that don’t do mousecalls, check if another object’s sphere collider maybe covers your object. Any mousecall command will not work then.

4) We do not have a target for the camera! Still not! Still not! St……
You will see this warning all the time! Don’t Worrie about it and just ignore it when your Hack And Slash Camera is working. It’s just something called to the wrong time in my eyes. Should go away after “243 from scratch”.

5) Tutorial 36 – I don’t get Debug results “willpower = willpower”!
Problem: Before the last step, you get debug results as shown in the video. After that last step, you don’t get the debug result “willpower = willpower”.

The problem part will be deleted and rearranged by Petey in the following video: 37 Unity3d Tutorial – Instantiating Our Character 55. So don’t care if you have same problem like me.

6) Tutorial 50  – In the air! Mob Class / y value changed from 6 to 1
In 42/43 Tutorial videos (Player Spawn Point) the y is set to 6 for visual effects with a (maybe) ragdoll falling on the floor – so the model is in the air. In this video(#50) the y is set to 1 – so human model and slug mob are on the floor again.

7) Tutorial 59 – Error when targeting mobs
Be sure the mob health is not 0.

8) Tutorial 263 – Déjà-vu… I did that before!
After 12 minutes around, the video is repeating the actions that were done before.

That’s it!

MonoDevelop Tips, Traps, Popular Errors

Tags

,

Cruba’s B.urg Z.erg A.rcade H.ack A.nd S.lash T.utorial S.eries Guide
Hack And Slash Tutorials by Peter Laliberte: burgzergarcade.com

This one is just for people who are not knowing MonoDevelop and are completely amateurs in programming, coding, MonoDevelop.

When you start Burg Zerg Arcade Hack And Slash Tutorial Series, you will use MonoDevelop for coding the C# scripts.

*** Tips ***

1) Saving in MonoDevelop – undo/redo
Saving does not delete the stored undo and redo queue like in other programms. Keep that in mind, because it’s a really cool feature.

2) Search in files
You could search a phrase in your whole solution over
top menu -> search in files

3) Rename variables in all files
You could right click a variable and do Refactor -> Rename. It will rename the variable in any position in any file. Warning: If you want to change 2 variables names, don’t rename one to same name than the other and refactor then. You will just get anything renamed in one.

Example:

public float minHeight = 8f;
public float maxHeight = 12f;

minHeight and maxHeight MonoDevelop just make the difference by name. So if you want to rename maxHeight to minHeight and minHeight to whatever, you must refactor(rename) minHeight first, because MonoDevelop will not make another difference than by name.

4) Comment out more than one line without //

/*     <<– starts commenting out
disabledcode
disabledcode
disabledcode
disabledcode
disabledcode
*/      <<–ends commenting out

5) Tab multiple codelines left or right for better overview

Mark all codelines and hit tab key to move code to the right:

code to move ->
code to move ->
code to move ->
code to move ->
code to move ->

Mark all codelines and Hold down Shift, hit Tab to move code to the left.

<- code to move
<- code to move
<- code to move
<- code to move
<- code to move

6) Defining regions for much better overview
You could define zones easily to shrink code to a single info line.

#region Here is a coderegion
code
code
code
code
code
#endregion

Klick – to minimize that region and it looks like this:
+     Here is a coderegion …

7) Mark codelines to have overview in bigger scripts
You could mark any codeline in any script. Useful whan more than one script is discussed not to lose tha overview. Just click in the plain field at the beginning of a line – you will get a red dot and line marked red.

Use it to mark codelines fast, to prevent forgetting something or to make it easier to find special lines in different scripts again. MonoDevelop saves the markings individual for any script.

*** Traps ***

1) The default color theme has a visual problem with _ followed by //
Comments behind codelines make underscores _ invisible. It is just invisible. It is still active and does not make errors. Example:

private Color[] _defaultColors;                                            <<– visible _
private Color[]  defaultColors;     // here is my comment     <<– invisivble _

To fix this visual problem go to top menubar of MonoDevelop:
Tools -> Options -> Syntax Highligting

Any other theme expect “Default” should be ok. The theme used in the video tutorial series is “GEdit – GEdit like style”.

*** Popular Errors ***

A list of errors and wrong typeing I also did and sometimes will drive you crazy. MonoDevelop don’t use bold writing, so I will do it to make the errors more visible for you:
Codeword instead of codeWord
(watch out case sensitivity)

codeWord instead of _codeWord
(forgot prefix/underscore _. Petey use it to sign private variables)

missing semicolon at the end of lines;
(don’t forget semicolon at the end of lines if needed)

The big problem with forgetting semicolon is: You don’t get an error message for the line where the semicolon is missing, you get it much much later and don’t really know what you did wrong, because the line MonoDevelop tells you is definately correct and you will get crazy for hours maybe. Example:

public static string[] femaleModels = { ” Female A”, ” Female B” } <<–
you forgot the semicolon here at the end (line 1!)
        
//    public static PlayerCharacter pc;
    
    // index 0 = mainmenu
    // index 1 = character creation screen
    // index 2 = character customization screen
    // index 3 = tutorial level
    public static string[] levelNames = {    <<–
error message 9 lines later but the codeline is correct!

forgot the last / in paths
public const string PATH = “Character/Model/Prefab/Human/Male”;    <<– wrong
public const string PATH = “Character/Model/Prefab/Human/Male/”;  <<– correct

***More popular typos***

: instead of ;
; instead of :

() instead of []
[] instead of ()

< instead of >
> instead of <

0 instead of null

= instead of ==

case; instead of case:
(case is the only one I know since I started that need colon instead of semicolon)

forgot <>
instance = go.GetComponentPC();        <<– wrong
instance = go.GetComponent<PC>();   <<– correct
(if you forget something like this you could get much errors)

Last word in lists – no comma! Example:

public enum State {
Idle,
Init,
Setup,
Run        <<– no , !
}

That’s it…

Too many variations make unhappy

Tags

,

An actual psychological study result says: The more variations you have, the unhappier you get – compared to the choice of less variations. That’s an important fact for me in view of ingame variations and decisions a player could make. Don’t mix “variations” with “groups and subgroups”.

100 variations of one marmalade makes us unhappy.

To define it more precisley: 100 variations of one marmalade from one company we speak about. What works is 100 marmalades in useful subgroups:

5 countrys split the variations to 20. Normal and light split the choice to 10. Of course you still have to choose from 100 marmalade variations but subgroups are the key. Following this result, 500 variations with subgroups would make more happy than 100 variations without subgroups.

I’ll have to think about that – will it affect the game concept?

Timetable: Coding vs. Artwork

Tags

,

Planning the whole project months ago, I also was thinking about kind of a timetable. What parts would need more, which ones less time. My guess was totally wrong. It was something around 50 artwork, 50 coding – really balanced. I’m not a coder/programmer, the better I am in artwork normally.

Theory came true:

The artwork stuff will take around 70%…

I’m not shocked in any way, because I hate coding/programming and love artwork. The hardest part will be the modelling and animation.

Design a site like this with WordPress.com
Get started