Archive

Author Archive

super simple level editor

December 13th, 2011 No comments

Phil and I were talking about level editing, and how to load them, and I realized that I already made a very primitive level editor in processing as well as a simple obj-C method to load those files. The file format assumes that you want to populate an array and that the array contains only zeros, each line of the level file looks like this scheme:

X<blank>Y<blank>ID<\n>

so you find in each line where in X and Y space to put the ID.

So here is the processing project:fleeItLevelEditor.pde and the method to load those files looks somewhat like this:


-(void) makeLevel:(int) level{
  int levelMap[100][100];
  int i,j;
  for(i=0;i&lt;100;i++)
    for(j=0;j&lt;100;j++)
      levelMap[i][j]=0;
  NSString *S=[[NSString alloc] initWithContentsOfFile:[[NSBundle mainBundle] pathForResource:[NSString stringWithFormat:@"Level_%i",level] ofType:@"txt"] encoding:NSASCIIStringEncoding error:NULL];
  NSArray *T=[S componentsSeparatedByString:@"\n"];
  for(NSString *L in T){
    NSArray *E = [L componentsSeparatedByString:@" "];
    int x,y,w;
    x=[[E objectAtIndex:0] intValue];
    y=[[E objectAtIndex:1] intValue];
    w=[[E objectAtIndex:2] intValue];
    NSLog(@"set element at pos:%i y:%i to:%i",x,y,w);
    levelMap[x][y]=w;
  }
}

Cheers Arend

 

Categories: Uncategorized Tags:

Lecture 27 and 28

December 13th, 2011 No comments

The last two lectures, about finalizing and promoting your games, and contemplations about future endeavors, also the twitter example,

the lecture 27:Lecture 27 the pdf file:Lecture 27

the lecture 28:Lecture 28 the pdf file: Lecture 28

and the project :TweenTest

Cheers Arend

 

Categories: Uncategorized Tags:

Lecture 24 and 25

December 3rd, 2011 No comments

Since Lecture 24 was a Q&A session and a brief intro to a game, I add 24 to this one.

Please fill out this form:

https://sirsonline.msu.edu until 16th of December and next week we will do the feedback forms I got from the department.

We will also have a new Tutorium/Workshop on Sunday 4th 1.30 again at the BEACON center, just gather around 1.30 at one of the entrances of BPS and I will pick you up,

here is lecture 25:Lecture 26 the pdf:Lecture 26 and the example:showCG

Cheers Arend

 

Categories: Uncategorized Tags:

Lecture 24

November 29th, 2011 No comments

UITableView, UITableViewCell, and UITableViewController and all of that together! The nice thing is that once you understand how UITableViews work you also understand the model-view-controller paradigm. The other thing I learned this time is that the Apples documentation became significantly better compared to the last time I checked. Anyways here is the lecture:Lecture 24 the pdf:Lecture 24 and I don’t know which of the project I prepared and which we did in class so here are both:tableViewDemo and:myTableViewDemo

Cheers Arend

Categories: Uncategorized Tags:

Lecture 23

November 18th, 2011 No comments

Views that require delegates (but cheat a little on the ViewController concept): QuickTimeVideo and CoreLocationService. And we talked about ethics and ethics considerations when dealing with computer games.

The lecture is here:Lecture 23 and the pdf here:Lecture 23

And we looked at two examples. Nr.1:moviePlayer and Nr.2:locationDemo

Cheers Arend

 

Categories: Uncategorized Tags:

Lecture 22

November 17th, 2011 No comments

PickerView, Tab and Nav bar controller

 

This lecture was all about the basic idea that the viewController (aka delegate) provides the data for a view, instead of initializing a view with a bunch of data sets.

Here is the lecture:lecture 22 and the pdf:lecture 22

and believe it or not, we had three examples: colorPicker, navBarDemo,pickerViewDemo

Cheers Arend

Categories: Uncategorized Tags:

Lecture 21

November 11th, 2011 No comments

this lecture was about notifications, alert views, timers, and a little ranting about model-view-controller paradigm… anyways here is the lecture:lecture 21 the pdfs:lecture 21

And we had three code examples A:notificationTest B:notificationExample C:alertViewTest

Also Phil went through all the other examples and compiled a summary of all snippets of code which might come in handy:491 Code Examples

Thanks Phil, and Cheers Arend

Categories: Uncategorized Tags:

Lecture 20

November 9th, 2011 No comments

Today we dealt with buttons to trigger events, and ways to get and display text. And because I got through the topics quite fast we also talked about copyright issues and apples review process.

The lecture is here:lecture 20 the pdf here:lecture 20 and the example code here:webTextViewExample

And Phil was so kind to send us the youtube links we were extensively discussing during class:

watch?v=_h6dD674stw

watch until end

 

Cheers Arend

 

Categories: Uncategorized Tags:

Lecture 19

November 5th, 2011 No comments

This time we introduced gestures, animation basics, transitions and UILabels… nothing too spectacular but super important.

Here is the lecture:lecture 19 the pdf:lecture 19 and the project:gestureExample

And we are going to have our tutorium on Sunday 1.30pm to 4pm at BPS building in BEACON, since the doors are going to be closed I meet you at 1.30 (and yes I will check later as well) at the entrance,

Cheers Arend

Categories: Uncategorized Tags:

Lecture 18

November 1st, 2011 No comments

Todays lecture has a very simple message: Views are everything!

At least this is true for iDevices. The problem is that they are so fundamental that I really need to get this concept across, so we will do views views views …

Here is the lecture:lecture 18 the pfd:lecture 18 and there is a demo project today: firstWindow

 

Cheers Arend

 

Categories: Uncategorized Tags: