2019-05-06 03:45:06

Hi. Im trying to convert some bgt map code into c# code, I thinc Im on the right wai. But wen I compile it, I get nothing. no sound, no movement. Can anyone explain me what im doing wrong? the code is below:
https://www.dropbox.com/s/hceidypf53rzx03/code.rar?dl=0
thanx

Sorry for my english

Thumbs up

2019-05-06 04:29:04

A few things:
First, don't use a dictionary for your map. Either use a 2D array:
public int[,] map;
Or locate a library that supports a matrix class. Try to not use strings for maps; do your best to use integers as these are incredibly fast and cheap. You can identify the type of tile in the map by just a single easy-to-remember integer identifier. Second, you call into the Microsoft.Xna.Framework namespace. Is this XNA or MonoGame? Also, change the names of functions, classes, namespaces, variables, enumeration files, ... to more informative names.
Second issue: you aren't loading anything in the LoadContent() method and yoru not unloading anything in the UnloadContent method other than the sprites. That is probably why its not working.

"On two occasions I have been asked [by members of Parliament!]: 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out ?' I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question."    — Charles Babbage.

Thumbs up

2019-05-06 18:25:32

@Ethin yea im using monogame. I don't using load content because I thinc it is only for graphical purposes, the initialice metod is for non graphical things. But well, thanx for the tips. I gona try.

Sorry for my english

Thumbs up