Eat. Sleep. Code: The Computer Programming Thread, Ver. 010

Pretty awesome man, keep up the good work.

I love video games. In the next few months, Iā€™m gonna be dropping by in here cause I need coding info cause my info is scattered all over the place. So much so, I need to start from step 1, but I know how to do step 4 and 5 (does that make sense? I dunno).

I need books. Books books booksā€¦
BUT NOT YET!!

Nice work. That reminds me, I worked on a Tetris Attack-style game that I havenā€™t touched for years. I should grab that old code and do something with it.

thanks guys, when I started I thought this would be a straight forward project but enough of a challenge to sink my teeth in, itā€™s actually been a lot harder than I imagined. I thought it would get easier the nearer completion but itā€™s been the opposite

What type of troubles are you running into?

Iā€™ll send you a PM

If you donā€™t mind me joining that pm convo, i have little experience with making games but who knows, maybe i can help and if not i can learn something :smile:

Add me to that PM too.

This is where I am now lol

https://fbcdn-sphotos-h-a.akamaihd.net/hphotos-ak-xap1/v/t1.0-9/s526x395/10389467_10152900192426368_4497305568557845328_n.jpg?oh=c812418ee1bacb6b5be87ee3e313c0a8&oe=5507D1D8&gda=1429798243_0b017c675df4cbfd41dd0b936615922c

Iā€™m currently a UX/UI designer, but started off as a developer. Over the years I got more into the design side because my sites, while extremely functional, werenā€™t up to my aesthetic standards. After finishing school, I planned on finding something that allowed me to code and design.

Boy was I wrong.

Hiring managers look at you as if youā€™re insane when they see code and design on the same resume. Some assume itā€™s just HTML/JS/JQuery, but when asked and I tell them I had a background in C++, wrote my own version of MS Paint in Java, etc they had no idea what to do with me.

Eventually, I just chose to start looking on the design side since companies treat their dev teams like garbage (overall).

Memories. :s

I remember learning linked lists and that was me the entire time.

Anyone interested in software engineering 343 Industries just uploaded their Sprint series for the making of Halo5 onto youtube
Video links here - Halo Thread: Games, TV, Movies and Books

So instead of including interesting and potentially helpful info in the thread now no one can see it.

#1 This thread isnā€™t the help Don code thread, so I didnā€™t want to clutter the thread with multiple posts.
#2 I have no idea who you are
#3 If there was something worth sharing I would have shared it publically.

So instead of posting something relevant to anything current now weā€™re taking shots at posts from 2 months ago.



if(hanasu.lateAsFuck())
    hanasu.STFU();
//else
    // There is no else.


What does you guys think about an MKvSF game:

I think it could happen.

Regarding projectiles:


IF Projectile == mortalKombatCharacter AND streetFighterCharacter OR streetFighterCharacter AND streetFighterCharacter
BEGIN
Projectile(Cancel)
ELSE
Projectile(!Cancel)
END

No fatalities unless fatalities are turned on at the menu screen. The MK fatalaties such as Scorpionā€™s ā€œToastyā€ would be like a Super or Ultra. Shang Tsungā€™s Ultra and Super would be like U.Rugalā€™s soul Super in Capcom VS Snk 2ā€¦any other ideas?

EDIT: the code is VB

Does anyone know how to print out values from an object in the console?

Iā€™m trying to debug my game, I thought it might be really helpful if I could display the content of the 2D array.

The array contains block objects, a block has various values, the one I require is the colour value which tells me what texture has been applied to the block. These colour values range from 1 to 8.



//java code
public static void SystemOutArray(){
	try{ //try catch
		for(int row = 0; row < blockArray.length; row++){ //row of the table
			for(intcol = 0; col < blockArray[row].length; col++){ //column of the table
				System.out.print(blockArray[row][col].getColourValue() + "	"); //get colour value of block stored within the array print each value and separate by a single tab
			}
		System.out.println(); //at the end of the row start a new line
		}
	}catch(Exception e){System.out.println("Array is empty");} //if error catch error and print message
}



This code only produces the ā€œArray is emptyā€ message

If I remove the getColourValue() I have the contents of the array displayed in my console however because there are block objects, blocks are represented as a random string of characters eg. ā€œcom.mygame.blockgame.Block@75998f71ā€, empty spaces are correctly displayed as ā€œnullā€.

Someone can probably be more helpful but if in your catch you have something like:



// ....snipped...
}
catch (Exception e)
{
    System.out.println("Error message: " + e.getMessage());
}


you get a more accurate message than ā€˜array is empty.ā€™ Off the top of my head Iā€™m donā€™t know why that method isnā€™t returning what you want it to but that exception message should hopefully point you in a direction to look. If you donā€™t get anything useful out of that let us know.

Atleast Iā€™m pretty sure thatā€™s right. I havenā€™t written java for a couple months ^^;

Yeah youā€™ll want to to the e.printStackTrace or something similar, so you can see what the actual error message is. Must be a null pointer issue or something

Nice this will be handy :cookie:
It comes back ā€œError message: nullā€.

I added the following within the for loop but I still get the same error



if(blockArray[row][col].getColourValue() != null){
	System.out.print(blockArray[row][col].getColourValue() + "	");
}
if(blockArray[row][col].getColourValue() == null){
	System.out.print("null" + "	");
}


Is ColorValue a data type that can be converted to string?