Results 1 to 9 of 9

Thread: Congrats, and a quick newbie question

Hybrid View

  1. #1

    Thumbs up Congrats, and a quick newbie question

    First of all, I want to congratulate the developers (Seth, et al) for this amazing little bit of software! I'm not really a programmer, beyond some simple HTML/PHP and BASIC back in my schooldays (not even C or java... sigh. I'm old!), but the potential in this NovaShell is really neat!

    MY 7yr old son and I have been spending the last week or so with him making some stick-figure drawings in MSPaint, then going through the tutorial and slowly making "his very own video game!" replacing the tiles and entities with our own PNG paintings. I can't quite fathom the deeper concepts in making my own custom lua scripts, but so far it's been educational for us both. So, major Kudos again, for allowing us to at least throw together a "game" of our very own. (He can't wait to 'finish' more things and add a boss battle, etc once I get the warping between maps working and he 'draws' the map tiles slowly and patiently.)

    My question is mostly "what should I beware/be aware of?" in terms of learning this here new fangled Programmin...:wheelchair:
    I know not to ask for code snippets or such, and that "play around and debug is the best way to learn",... but I wondered if you more knowledgeable types could suggest something to concentrate on first as a solid foundation (beyond these tutorials, of course), or else things to keep in mind "for later" that a total n00b might get confused by.

    Thanks in advance!
    -Maebius (& kid )

  2. #2

    Default

    Thanks! I already broke both those rules and learned the "persistance" one first-hand since we kept messign up our "level one" map.

    I'll try to fiddle with the sprites/images for things too, since I noticed that it has been acting a bit strange when I tried to import two more "enemy" dragons (from the tutorials, but using our own MS painted images, which are NOT even numbers of pixels apparently.)

    Now, to the challenge of figuring out how dink or treeworld works to damage enemies! With that, our first "game" will be ready to share with the rest of the family and write up as a possible extra curricular school project. I cant' wait!

    Hmm, just to clarify that, by powers of two, do you mean actual powers of two, or divisible by two? The stock 40x40 tiles that are used in the example, would not be true Powers of Two, the way I am reading this. They would have to be 64x64 or 32x32?? Hmm...
    Last edited by Maebius; 11-16-2011 at 01:24 PM.

  3. #3
    Administrator Seth's Avatar
    Join Date
    Jul 2002
    Location
    Japan
    Posts
    4,636

    Default

    Hey, that's really cool that you're working on a game with your kid, Maebius. Sorry Novashell is so tricky to use.. I have kids too and fantasize about a really easy to use game making app for iPad I want to make.. someday.
    Seth A. Robinson
    Robinson Technologies

  4. #4

    Thumbs up

    Ahh, that is starting to make sense. Thanks to both of you.
    From a practical 'logic' I understand what you mean about the collisions. Now to figure out the syntax and technical side of this LUA scripting. Slow going, but almost there.
    I'll post a zip of the "level one" once I manage to get the combat working.

    My son wants to have two actions (since it's a top-down tile map like Dink/zelda). One is the basic "punch" like Dink/TreeWorld seems to use. He ALSO of course wants the space/jum,p key to be "special attack" like wind/fire/earth/ice that does extra damage ( I'll tackle things like mana/Spellpoints or cooldown timers for that someday later).

    edit: I'm guessing you'd use similar functions, just use different numbers as parameters for that 'collision' onDamage(#,#,#,#) function.

    Loving the ease of this so far though, even just to run around and make maze-maps!!!

  5. #5

    Default

    Slowly working through to re-learn the sort of thinking that is required for "programming", and had a few questions. (Don't feel bad about the complexity, it's pretty easy for the basic, I just need to leanr proper LUA scripting, which is not your fault.)

    In the DinkTest I was trying to use that as a "template" for the attacking, because I still am a bit confused about the seperate Entity used for "slash" in TreeWorld. Sorry for noobness.

    I've tried to copy over the functions, but so far I think I am missing something. If I upload the world, would it be possible to see what I may have done wrong, or incorrectly? Running around works great, and we added some more "ninja enemies", but I can't quite seem to get them to die by spamming the Attack key (ctrl). I know there's no animation to attack yet, but that might come later, as the image XML example on crayon is still a bit over my head.
    I don't really want the game sample "fixed" other than possibly pointing out where I went wrong. Learning how to do it myself would be great, but I hit a wall this week, and am still stumped.

    Dougs_Dragons_Copy.novazipDougs_Dragons_Copy_Win.zip

    Ideally, the kid wants something like the SLASH from Treeworld, but surrounding the player (as top-down) so it's like a shadowy ring (ie: A sword slash, or fire aura, or whatever the image winds up looking like), since Facing of the player is tricky for me.
    Last edited by Maebius; 11-25-2011 at 08:56 PM. Reason: added attachments

  6. #6
    Administrator Seth's Avatar
    Join Date
    Jul 2002
    Location
    Japan
    Posts
    4,636

    Default

    Hey Maebius (and kid!),

    Got a chance to look, here is what I found:

    1. When I hit control to attack, seemed like nothing was happening. So I added a LogMsg("Doing attack"); to the top of ProcessAttack() so I could hit ~ and see in the log that the function was actually running.

    2. It wasn't. So there's the problem.. so why not? Well, in the script, it does properly run this:

    Code:
    function OnActionButton(bKeyDown)
    
    	if (bKeyDown) then
    	m_bAttack = true;
    	end
    	return true; 	
    end
    But that doesn't really do anything except set m_bAttack to true .. which you need to notice in the Update() function to do the "real attack". It's good to do it this way because you always know exactly in which order things like swinging, jumping, will happen, rather than doing them when the key is actually hit.

    So to make it actually call ProcessAttack() I changed player.lua's update to look like this: (I only added stuff to the bottom)

    Code:
    //this is run every logic tick, normally we don't need to do this, but the player is a special case
    function Update(step)
    	
    	AssignPlayerToCameraIfNeeded(this);  //make us the official player and have the camera track us,
    	//if we're not already, and if another entity doesn't already have this role
    		
    	//this function is in player_utils.lua
    	local facing = ConvertKeysToFacing(m_bLeft, m_bRight, m_bUp, m_bDown); 
    	
    	if (facing != C_FACING_NONE) then
    		//they are pressing towards a direction
    		this:SetFacingTarget(facing); //turn towards the direction of the keys we pressed
    		this:GetBrainManager():SetStateByName("Walk");
    	else
    		this:GetBrainManager():SetStateByName("Idle");
    	end	
    	
    //Seth's new stuff below here!
    
    	if (m_bAttack) then
    	//looks like they hit the attack button, let's do that now.
    	m_bAttack = false; //so we don't keep attacking until they hit the button again
    	ProcessAttack();
    	end
    end
    After that, my LogMsg() function was hit and it actually does something. It makes a swing noise and gives an error about the visual not being there.. but you knew that would happen.
    Seth A. Robinson
    Robinson Technologies

Similar Threads

  1. Quick question about movement
    By trap93 in forum Novashell Game Creation System
    Replies: 1
    Last Post: 12-31-2009, 12:42 AM
  2. OnCollisionEnd() - One final quick question!
    By Pleng in forum Novashell Game Creation System
    Replies: 4
    Last Post: 05-15-2009, 06:41 AM
  3. Newbie question about printf();
    By NovaLaw in forum ClanLib: Help
    Replies: 7
    Last Post: 05-14-2009, 09:55 PM
  4. newbie Question
    By Kagg in forum ClanLib: Help
    Replies: 5
    Last Post: 10-15-2008, 02:04 PM
  5. Yo, Seth quick question man.
    By in forum RTsoft Tavern
    Replies: 3
    Last Post: 07-14-2004, 03:53 PM

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •